diff --git a/.github/ISSUE_TEMPLATE/ar_bug_report-md.md b/.github/ISSUE_TEMPLATE/ar_bug_report.md similarity index 72% rename from .github/ISSUE_TEMPLATE/ar_bug_report-md.md rename to .github/ISSUE_TEMPLATE/ar_bug_report.md index e2f64b88b8..0d4aee9397 100644 --- a/.github/ISSUE_TEMPLATE/ar_bug_report-md.md +++ b/.github/ISSUE_TEMPLATE/ar_bug_report.md @@ -1,17 +1,8 @@ --- name: ar_bug_report.md about: Create a bug for a an issue found in the Automated Review -title: '' -labels: '' -assignees: '' - ---- - ---- -name: Automated Review Bug report -about: Create a report when a failure occurs in main branch -title: '' -labels: 'Automated_Review' +title: 'AR Bug Report' +labels: 'needs-triage,kind/bug,kind/automation' assignees: '' --- diff --git a/.github/ISSUE_TEMPLATE/rfc-feature.md b/.github/ISSUE_TEMPLATE/rfc-feature.md deleted file mode 100644 index 31a195f803..0000000000 --- a/.github/ISSUE_TEMPLATE/rfc-feature.md +++ /dev/null @@ -1,73 +0,0 @@ ---- -name: RFC Feature request -about: Create Feature RFC for this project -title: Proposed RFC Feature =description= -labels: 'rfc-feature' -assignees: '' - ---- - -# O3DE RFC Feature Template - -### When using this template, you do not have to fill out every question below. The questions are there for guidance. - -This RFC feature template should be used for any feature that is not a bug or a substantial reorganization of the O3DE product. - -If you submit a pull request to implement a new feature without going through the RFC process, it may be closed with a polite request to submit an RFC first. - -A hastily proposed RFC can hurt its chances of acceptance. Low-quality proposals, proposals for previously-rejected features, or those that don't fit into the near-term roadmap may be quickly rejected, demotivating the unprepared contributor. Laying some groundwork ahead of the RFC can make the process smoother. - -Although there is no single way to prepare for submitting an RFC, it is generally a good idea to pursue feedback from other project developers beforehand to ascertain that the RFC may be desirable; having a consistent impact on the project requires concerted effort toward consensus-building. - -The most common preparations for writing and submitting an RFC include: -- Talking the idea over on our Discord server. -- Discussing the topic on our GitHub RFCs discussions page. -- Occasionally posting "pre-RFCs" on the GitHub RFCs discussion page. -You may file issues in the RFCs repo for discussion, but these are not actively looked at by the teams. - -As a rule of thumb, receiving encouraging feedback from long-standing project developers, and particularly members of the relevant sub-team, is a good indication that the RFC is worth pursuing. - -# ----- DELETE EVERYTHING FROM THE TOP TO THE SUMMARY LINE BELOW WHEN USING TEMPLATE ----- # - -### Summary: -Single paragraph explanation of the feature - -### What is the relevance of this feature? -Why is this important? What are the use cases? What will it do once completed? - -### Feature design description: -- Explain the design of the feature with enough detail that someone familiar with the environment and framework can understand the concept and explain it to others. -- It should include at least one end-to-end example of how a developer will use it along with specific details, including outlying use cases. - -- If there is any new terminology, it should be defined here. - -### Technical design description: -- Explain the technical portion of the work in enough detail that members can implement the feature. - -- Explain any API or process changes required to implement this feature - -- This section should relate to the feature design description by reference and explain in greater detail how it makes the feature design examples work. - -- This should also provide detailed information on compatibility with different hardware platforms. - - -### What are the advantages of the feature? -- Explain the advantages for someone to use this feature - -### What are the disadvantages of the feature? -- Explain any disadvantages for someone to use this feature - -### How will this be implemented or integrated into the O3DE environment? -- Explain how a developer will integrate this into the codebase of O3DE and provide any specific library or technical stack requirements. - -### Are there any alternatives to this feature? -- Provide any other designs that have been considered. Explain what the impact might be of not doing this. -- If there is any prior art or approaches with other frameworks in the same domain, explain how they may have solved this problem or implemented this feature. - -### How will users learn this feature? -- Detail how it can be best presented and how it is used as an extension or a standalone tool used with O3DE. -- Explain if and how it may change how individuals would use the platform and if any documentation must be changed or reorganized. -- Explain how it would be taught to new and existing O3DE users. - -### Are there any open questions? -- What are some of the open questions and potential scenarios that should be considered? diff --git a/.github/ISSUE_TEMPLATE/rfc-suggestion.md b/.github/ISSUE_TEMPLATE/rfc-suggestion.md deleted file mode 100644 index 7c51bbc918..0000000000 --- a/.github/ISSUE_TEMPLATE/rfc-suggestion.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -name: RFC Suggestion request -about: Create Suggestion RFC for this project -title: Proposed RFC Suggestion =description= -labels: 'rfc-suggestion' -assignees: '' - ---- - -# O3DE Suggestion RFC Template - -### When using this template, you do not have to fill out every question below. The questions are there for guidance. - -This RFC template should be used for any suggestion that is not based upon code or content related to the O3DE product itself. This template is for proposing new process models, approaches, or ideas to improve the O3DE community. - -A hastily proposed RFC can hurt its chances of acceptance. Low-quality proposals, proposals for previously rejected features, or those that do not have any substantive value to the project may be quickly rejected, demotivating the unprepared contributor. Laying some groundwork with others in the community ahead of the RFC can make the process much smoother. - -Although there is no single way to prepare for submitting an RFC, it is generally a good idea to pursue feedback from other project members beforehand. Keep in mind that you want other members to contribute and back your suggestion, which can drastically improve the chances of implementation. - -The most common preparations for writing and submitting an RFC include: -- Talking the idea over on our Discord server. -- Creating a discussion on our GitHub RFCs discussions page. -- Occasionally posting "pre-RFCs" on the GitHub RFCs discussion page. -You may file issues in the RFCs repo for discussion, but these are not actively looked at by the teams. - -As a rule of thumb, receiving encouraging feedback from long-standing community members is a good indication that the RFC is worth pursuing. - -# ----- DELETE EVERYTHING FROM THE TOP TO THE SUMMARY LINE BELOW WHEN USING TEMPLATE ----- # - -### Summary: -Single paragraph explanation of the suggestion - -### What is the motivation for this suggestion? -Why is this important? -What are the use cases for this suggestion? -What should the outcome be if this suggestion is implemented? - -### Suggestion design description: -- Explain the suggestion with enough detail that someone familiar with the process and environment of the project can understand the suggestion and explain it to others. -- It should include at least one end-to-end example of how the community will use it along with the specific details with outlying use cases. - -- If there is any new terminology, it should be defined here. - -### What are the advantages of the suggestion? -- Explain the advantages of using this suggestion - -### What are the disadvantages of the suggestion? -- Explain any disadvantages or trade-offs to using this suggestion - -### How will this be work within the O3DE project? -- Explain how this suggestion will be work within the O3DE project. - -### Are there any alternatives to this suggestion? -- Provide any other alternative ways that have been considered. -- Explain what the impact might be of not implementing this suggestion. -- If there are other similar suggestions previously used, list them and explain which parts may have solved some or all of this problem. - -### What is the strategy for adoption? -- Explain how new and existing users will adopt this suggestion. -- Point out any efforts needed if it requires coordination with multiple SIGs or other projects. -- Explain how it would be taught to new and existing O3DE users. diff --git a/AutomatedTesting/Gem/Code/enabled_gems.cmake b/AutomatedTesting/Gem/Code/enabled_gems.cmake index b712fec7ab..dd68e379dd 100644 --- a/AutomatedTesting/Gem/Code/enabled_gems.cmake +++ b/AutomatedTesting/Gem/Code/enabled_gems.cmake @@ -47,8 +47,7 @@ set(ENABLED_GEMS LmbrCentral LyShine HttpRequestor - Atom_AtomBridge - PythonCoverage + Atom AWSCore AWSClientAuth AWSMetrics 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 902666ba10..e7c115d4dd 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 @@ -15,10 +15,7 @@ import ly_test_tools.log.log_monitor # fixture imports from AWS.Windows.resource_mappings.resource_mappings import resource_mappings -from AWS.Windows.cdk.cdk_utils import Cdk -from AWS.common.aws_utils import AwsUtils -from assetpipeline.ap_fixtures.asset_processor_fixture import asset_processor as asset_processor -from AWS.common.aws_credentials import aws_credentials +from assetpipeline.ap_fixtures.asset_processor_fixture import asset_processor from .aws_metrics_utils import aws_metrics_utils AWS_METRICS_FEATURE_NAME = 'AWSMetrics' @@ -28,7 +25,7 @@ logger = logging.getLogger(__name__) def setup(launcher: ly_test_tools.launchers.Launcher, - cdk: Cdk, + cdk: pytest.fixture, asset_processor: asset_processor, resource_mappings: resource_mappings, context_variable: str = '') -> typing.Tuple[ly_test_tools.log.log_monitor.LogMonitor, str, str]: @@ -119,7 +116,7 @@ class TestAWSMetricsWindows(object): asset_processor: pytest.fixture, workspace: pytest.fixture, aws_utils: pytest.fixture, - aws_credentials: aws_credentials, + aws_credentials: pytest.fixture, resource_mappings: pytest.fixture, cdk: pytest.fixture, aws_metrics_utils: aws_metrics_utils, @@ -162,7 +159,7 @@ class TestAWSMetricsWindows(object): level: str, launcher: ly_test_tools.launchers.Launcher, cdk: pytest.fixture, - aws_credentials: aws_credentials, + aws_credentials: pytest.fixture, asset_processor: pytest.fixture, resource_mappings: pytest.fixture, workspace: pytest.fixture): @@ -187,7 +184,7 @@ class TestAWSMetricsWindows(object): level: str, launcher: ly_test_tools.launchers.Launcher, cdk: pytest.fixture, - aws_credentials: aws_credentials, + aws_credentials: pytest.fixture, asset_processor: pytest.fixture, resource_mappings: pytest.fixture, aws_utils: pytest.fixture, diff --git a/AutomatedTesting/Gem/PythonTests/AWS/Windows/core/__init__.py b/AutomatedTesting/Gem/PythonTests/AWS/Windows/core/__init__.py new file mode 100644 index 0000000000..e200fa77d0 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/AWS/Windows/core/__init__.py @@ -0,0 +1,5 @@ +""" +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 +""" 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 new file mode 100644 index 0000000000..935d8aa283 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/AWS/Windows/core/test_aws_resource_interaction.py @@ -0,0 +1,186 @@ +""" +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 os +import logging +import time + +import pytest +import ly_test_tools +import ly_test_tools.log.log_monitor +import ly_test_tools.environment.process_utils as process_utils +import ly_test_tools.o3de.asset_processor_utils as asset_processor_utils + +from botocore.exceptions import ClientError +from AWS.Windows.resource_mappings.resource_mappings import resource_mappings +from assetpipeline.ap_fixtures.asset_processor_fixture import asset_processor + +AWS_CORE_FEATURE_NAME = 'AWSCore' +AWS_RESOURCE_MAPPING_FILE_NAME = 'default_aws_resource_mappings.json' + +process_utils.kill_processes_named("o3de", ignore_extensions=True) # Kill ProjectManager windows + +GAME_LOG_NAME = 'Game.log' + +logger = logging.getLogger(__name__) + + +def setup(launcher: pytest.fixture, cdk: pytest.fixture, resource_mappings: pytest.fixture, asset_processor: pytest.fixture): + asset_processor_utils.kill_asset_processor() + logger.info(f'Cdk stack names:\n{cdk.list()}') + stacks = cdk.deploy(additonal_params=['--all']) + resource_mappings.populate_output_keys(stacks) + asset_processor.start() + asset_processor.wait_for_idle() + + file_to_monitor = os.path.join(launcher.workspace.paths.project_log(), GAME_LOG_NAME) + log_monitor = ly_test_tools.log.log_monitor.LogMonitor(launcher=launcher, log_file_path=file_to_monitor) + + return log_monitor + + +@pytest.mark.SUITE_periodic +@pytest.mark.usefixtures('automatic_process_killer') +@pytest.mark.usefixtures('asset_processor') +@pytest.mark.usefixtures('cdk') +@pytest.mark.parametrize('feature_name', [AWS_CORE_FEATURE_NAME]) +@pytest.mark.parametrize('region_name', ['us-west-2']) +@pytest.mark.parametrize('assume_role_arn', ['arn:aws:iam::645075835648:role/o3de-automation-tests']) +@pytest.mark.parametrize('session_name', ['o3de-Automation-session']) +@pytest.mark.usefixtures('workspace') +@pytest.mark.parametrize('project', ['AutomatedTesting']) +@pytest.mark.parametrize('level', ['AWS/Core']) +@pytest.mark.usefixtures('resource_mappings') +@pytest.mark.parametrize('resource_mappings_filename', [AWS_RESOURCE_MAPPING_FILE_NAME]) +@pytest.mark.usefixtures('aws_credentials') +@pytest.mark.parametrize('profile_name', ['AWSAutomationTest']) +class TestAWSCoreAWSResourceInteraction(object): + """ + Test class to verify AWSCore can downloading a file from S3. + """ + def test_download_from_s3(self, + level: str, + launcher: pytest.fixture, + cdk: pytest.fixture, + workspace: pytest.fixture, + asset_processor: pytest.fixture, + resource_mappings: pytest.fixture + ): + """ + Setup: Deploys cdk and updates resource mapping file. + Tests: Getting AWS credentials for no signed in user. + Verification: Log monitor looks for success download. The existence and contents of the file are also verified. + """ + + log_monitor = setup(launcher, cdk, resource_mappings, asset_processor) + + launcher.args = ['+LoadLevel', level] + launcher.args.extend(['-rhi=null']) + + user_dir = os.path.join(workspace.paths.project(), 'user') + download_dir = os.path.join(user_dir, 's3_download') + if not os.path.exists(download_dir): + os.makedirs(download_dir) + + with launcher.start(launch_ap=False): + result = log_monitor.monitor_log_for_lines( + 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.'], + unexpected_lines=['(Script) - [S3] Head object error: No response body.', + '(Script) - [S3] Get object error: Request validation failed, output file directory doesn\'t exist.'], + halt_on_unexpected=True + ) + + assert result, "Expected lines weren't found." + + download_path = os.path.join(download_dir, 'output.txt') + + file_was_downloaded = os.path.exists(download_path) + # clean up the file directories. + if file_was_downloaded: + os.remove(download_path) + os.rmdir(download_dir) + + assert file_was_downloaded, 'The expected file wasn\'t successfully downloaded' + + def test_invoke_lambda(self, + level: str, + launcher: pytest.fixture, + cdk: pytest.fixture, + resource_mappings: pytest.fixture, + workspace: pytest.fixture, + asset_processor: pytest.fixture + ): + """ + Setup: Deploys the CDK. + Tests: Runs the test level. + Verification: Searches the logs for the expected output from the example lambda. + """ + + log_monitor = setup(launcher, cdk, resource_mappings, asset_processor) + + 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) - [Lambda] Completed Invoke', + '(Script) - [Lambda] Invoke success: {"statusCode": 200, "body": {}}'], + unexpected_lines=['(Script) - Request validation failed, output file miss full path.', + '(Script) - '], + halt_on_unexpected=True + ) + + assert result + + def test_get_dynamodb_value(self, + level: str, + launcher: pytest.fixture, + cdk: pytest.fixture, + resource_mappings: pytest.fixture, + workspace: pytest.fixture, + asset_processor: pytest.fixture, + aws_utils: pytest.fixture, + ): + """ + Setup: Deploys the CDK application + Test: Runs a launcher with a level that loads a scriptcanvas that pulls a DynamoDB table value. + Verification: The value is output in the logs and verified by the test. + """ + + def write_test_table_data(): + client = aws_utils.client('dynamodb') + table_name = resource_mappings.get_resource_name_id("AWSCore.ExampleDynamoTableOutput") + try: + client.put_item( + TableName=table_name, + Item={ + 'id': { + 'S': 'Item1' + } + } + ) + logger.info(f'Loaded data into table {table_name}') + except ClientError: + logger.exception(f'Failed to load data into table {table_name}') + raise + + log_monitor = setup(launcher, cdk, resource_mappings, asset_processor) + write_test_table_data() + + 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) - [DynamoDB] Results finished'], + unexpected_lines=['(Script) - Request validation failed, output file miss full path.', + '(Script) - '], + halt_on_unexpected=True + ) + + assert result diff --git a/AutomatedTesting/Gem/PythonTests/AWS/common/aws_credentials.py b/AutomatedTesting/Gem/PythonTests/AWS/common/aws_credentials.py index 61523599a8..f74ae888d5 100644 --- a/AutomatedTesting/Gem/PythonTests/AWS/common/aws_credentials.py +++ b/AutomatedTesting/Gem/PythonTests/AWS/common/aws_credentials.py @@ -107,24 +107,3 @@ class AwsCredentials: else: self._credentials[self._profile_name][attribute_name] = attribute_value - -@pytest.fixture(scope='function') -def aws_credentials(request: pytest.fixture, aws_utils: pytest.fixture, profile_name: str): - """ - Fixture for setting up temporary AWS credentials from assume role. - - :param request: _pytest.fixtures.SubRequest class that handles getting - a pytest fixture from a pytest function/fixture. - :param aws_utils: aws_utils fixture. - :param profile_name: Named AWS profile to store temporary credentials. - """ - aws_credentials_obj = AwsCredentials(profile_name) - original_access_key, original_secret_access_key, original_token = aws_credentials_obj.get_aws_credentials() - aws_credentials_obj.set_aws_credentials_by_session(aws_utils.assume_session()) - - def teardown(): - # Reset to the named profile using the original AWS credentials - aws_credentials_obj.set_aws_credentials(original_access_key, original_secret_access_key, original_token) - request.addfinalizer(teardown) - - return aws_credentials_obj diff --git a/AutomatedTesting/Gem/PythonTests/AWS/conftest.py b/AutomatedTesting/Gem/PythonTests/AWS/conftest.py index 15217d4620..f6425dbab4 100644 --- a/AutomatedTesting/Gem/PythonTests/AWS/conftest.py +++ b/AutomatedTesting/Gem/PythonTests/AWS/conftest.py @@ -6,6 +6,7 @@ SPDX-License-Identifier: Apache-2.0 OR MIT import pytest import logging from AWS.common.aws_utils import AwsUtils +from AWS.common.aws_credentials import AwsCredentials from AWS.Windows.cdk.cdk_utils import Cdk logger = logging.getLogger(__name__) @@ -81,3 +82,26 @@ def cdk( request.addfinalizer(teardown) return pytest.cdk_obj + + + +@pytest.fixture(scope='function') +def aws_credentials(request: pytest.fixture, aws_utils: pytest.fixture, profile_name: str): + """ + Fixture for setting up temporary AWS credentials from assume role. + + :param request: _pytest.fixtures.SubRequest class that handles getting + a pytest fixture from a pytest function/fixture. + :param aws_utils: aws_utils fixture. + :param profile_name: Named AWS profile to store temporary credentials. + """ + aws_credentials_obj = AwsCredentials(profile_name) + original_access_key, original_secret_access_key, original_token = aws_credentials_obj.get_aws_credentials() + aws_credentials_obj.set_aws_credentials_by_session(aws_utils.assume_session()) + + def teardown(): + # Reset to the named profile using the original AWS credentials + aws_credentials_obj.set_aws_credentials(original_access_key, original_secret_access_key, original_token) + request.addfinalizer(teardown) + + return aws_credentials_obj diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/CMakeLists.txt index f05aff6db3..baf8e9733e 100644 --- a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/CMakeLists.txt +++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/CMakeLists.txt @@ -103,6 +103,19 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS) AZ::AssetBundlerBatch ) + ly_add_pytest( + NAME AssetPipelineTests.AssetBundler_SandBox + TEST_SUITE sandbox + PATH ${CMAKE_CURRENT_LIST_DIR}/asset_bundler_batch_tests.py + PYTEST_MARKS "SUITE_sandbox" # run only sandbox tests in this file + EXCLUDE_TEST_RUN_TARGET_FROM_IDE + TEST_SERIAL + TIMEOUT 1500 + RUNTIME_DEPENDENCIES + AZ::AssetProcessor + AZ::AssetBundlerBatch + ) + ly_add_pytest( NAME AssetPipelineTests.AssetBuilder PATH ${CMAKE_CURRENT_LIST_DIR}/asset_builder_tests.py 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 926f1cc602..1a5ece92e1 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 @@ -730,6 +730,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object): @pytest.mark.BAT @pytest.mark.assetpipeline + @pytest.mark.SUITE_sandbox @pytest.mark.test_case_id("C16877174") @pytest.mark.test_case_id("C16877175") @pytest.mark.test_case_id("C16877178") diff --git a/AutomatedTesting/Gem/PythonTests/atom_renderer/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/atom_renderer/CMakeLists.txt index ec150bd186..b851260639 100644 --- a/AutomatedTesting/Gem/PythonTests/atom_renderer/CMakeLists.txt +++ b/AutomatedTesting/Gem/PythonTests/atom_renderer/CMakeLists.txt @@ -38,7 +38,7 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_BUILD_TESTS_SUPPORTED AND AutomatedT TEST_SUITE main TEST_REQUIRES gpu TEST_SERIAL - TIMEOUT 400 + TIMEOUT 800 PATH ${CMAKE_CURRENT_LIST_DIR}/test_Atom_GPUTests.py RUNTIME_DEPENDENCIES AssetProcessor diff --git a/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_GPUTests.py b/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_GPUTests.py index cb5ae709d1..05eff871c1 100644 --- a/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_GPUTests.py +++ b/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_GPUTests.py @@ -17,7 +17,7 @@ import editor_python_test_tools.hydra_test_utils as hydra logger = logging.getLogger(__name__) DEFAULT_SUBFOLDER_PATH = 'user/PythonTests/Automated/Screenshots' -EDITOR_TIMEOUT = 300 +EDITOR_TIMEOUT = 600 TEST_DIRECTORY = os.path.join(os.path.dirname(__file__), "atom_hydra_scripts") @@ -77,7 +77,6 @@ class TestAllComponentsIndepthTests(object): unexpected_lines=unexpected_lines, halt_on_unexpected=True, cfg_args=[level], - auto_test_mode=False, null_renderer=False, ) diff --git a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_EditMenuOptions.py b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_EditMenuOptions.py index 26110cd954..c157c995c4 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_EditMenuOptions.py +++ b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_EditMenuOptions.py @@ -60,24 +60,7 @@ class TestEditMenuOptions(EditorTestHelper): ("Modify", "Transform Mode", "Rotate"), ("Modify", "Transform Mode", "Scale"), ("Editor Settings", "Global Preferences"), - ("Editor Settings", "Graphics Settings"), ("Editor Settings", "Editor Settings Manager"), - ("Editor Settings", "Graphics Performance", "PC", "Very High"), - ("Editor Settings", "Graphics Performance", "PC", "High"), - ("Editor Settings", "Graphics Performance", "PC", "Medium"), - ("Editor Settings", "Graphics Performance", "PC", "Low"), - ("Editor Settings", "Graphics Performance", "OSX Metal", "Very High"), - ("Editor Settings", "Graphics Performance", "OSX Metal", "High"), - ("Editor Settings", "Graphics Performance", "OSX Metal", "Medium"), - ("Editor Settings", "Graphics Performance", "OSX Metal", "Low"), - ("Editor Settings", "Graphics Performance", "Android", "Very High"), - ("Editor Settings", "Graphics Performance", "Android", "High"), - ("Editor Settings", "Graphics Performance", "Android", "Medium"), - ("Editor Settings", "Graphics Performance", "Android", "Low"), - ("Editor Settings", "Graphics Performance", "iOS", "Very High"), - ("Editor Settings", "Graphics Performance", "iOS", "High"), - ("Editor Settings", "Graphics Performance", "iOS", "Medium"), - ("Editor Settings", "Graphics Performance", "iOS", "Low"), ("Editor Settings", "Keyboard Customization", "Customize Keyboard"), ("Editor Settings", "Keyboard Customization", "Export Keyboard Settings"), ("Editor Settings", "Keyboard Customization", "Import Keyboard Settings"), diff --git a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_ViewMenuOptions.py b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_ViewMenuOptions.py index 7ed08867a9..3f3885a028 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_ViewMenuOptions.py +++ b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_ViewMenuOptions.py @@ -49,7 +49,6 @@ class TestViewMenuOptions(EditorTestHelper): ("Viewport", "Center on Selection"), ("Viewport", "Go to Location"), ("Viewport", "Remember Location"), - ("Viewport", "Change Move Speed"), ("Viewport", "Switch Camera"), ("Viewport", "Show/Hide Helpers"), ("Refresh Style",), diff --git a/AutomatedTesting/Gem/PythonTests/editor/test_Menus.py b/AutomatedTesting/Gem/PythonTests/editor/test_Menus.py index b45a087c79..cc5385f4ba 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/test_Menus.py +++ b/AutomatedTesting/Gem/PythonTests/editor/test_Menus.py @@ -55,12 +55,7 @@ class TestMenus(object): "Rotate Action triggered", "Scale Action triggered", "Global Preferences Action triggered", - "Graphics Settings Action triggered", "Editor Settings Manager Action triggered", - "Very High Action triggered", - "High Action triggered", - "Medium Action triggered", - "Low Action triggered", "Customize Keyboard Action triggered", "Export Keyboard Settings Action triggered", "Import Keyboard Settings Action triggered", @@ -89,7 +84,6 @@ class TestMenus(object): "Center on Selection Action triggered", "Go to Location Action triggered", "Remember Location Action triggered", - "Change Move Speed Action triggered", "Switch Camera Action triggered", "Show/Hide Helpers Action triggered", "Refresh Style Action triggered", diff --git a/AutomatedTesting/Gem/PythonTests/smoke/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/smoke/CMakeLists.txt index af9fc142e2..73af69b93a 100644 --- a/AutomatedTesting/Gem/PythonTests/smoke/CMakeLists.txt +++ b/AutomatedTesting/Gem/PythonTests/smoke/CMakeLists.txt @@ -51,4 +51,18 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS) AutomatedTesting.GameLauncher AutomatedTesting.Assets ) + + ly_add_pytest( + NAME AutomatedTesting::GameLauncherWithGPU + TEST_SUITE sandbox + TEST_REQUIRES gpu + PATH ${CMAKE_CURRENT_LIST_DIR}/test_GameLauncher_EnterExitGameMode_Works.py + TIMEOUT 100 + RUNTIME_DEPENDENCIES + AZ::AssetProcessor + AZ::PythonBindingsExample + Legacy::Editor + AutomatedTesting.GameLauncher + AutomatedTesting.Assets + ) endif() diff --git a/AutomatedTesting/Gem/Resources/CryEngineLogoLauncher.bmp b/AutomatedTesting/Gem/Resources/CryEngineLogoLauncher.bmp deleted file mode 100644 index fe0adc54a4..0000000000 --- a/AutomatedTesting/Gem/Resources/CryEngineLogoLauncher.bmp +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cf6d56fe4c367d39bd78500dd34332fcad57ad41241768b52781dbdb60ddd972 -size 347568 diff --git a/AutomatedTesting/Gem/Resources/GameSDK.ico b/AutomatedTesting/Gem/Resources/GameSDK.ico index cb935cd926..0be1f28b6c 100644 --- a/AutomatedTesting/Gem/Resources/GameSDK.ico +++ b/AutomatedTesting/Gem/Resources/GameSDK.ico @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:61efd8df621780af995fc1250918df5e00364ff00f849bef67702cd4b0a152e1 -size 65537 +oid sha256:41239f8345fa91fe546442208461ad3cd17c7a7a7047af45018b97363bfea204 +size 109783 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadAppIcon152x152.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadAppIcon152x152.png index b0dd493c11..ad18894411 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadAppIcon152x152.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadAppIcon152x152.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e4901093fa6190bf37291b0fb6de23fba1be8ebbd742775a8565a4106722fbb6 -size 31942 +oid sha256:ebfc95bd4c0cbcc53d0ef9d314d26e09a347a22dabbf210597f405d9ed8646bf +size 7729 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadAppIcon76x76.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadAppIcon76x76.png index 21aa62e96b..888d8cf785 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadAppIcon76x76.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadAppIcon76x76.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e4ae97c4f44910121a61686862c8342ce598db4cdf9d46b29e96d3cb9e43bd06 -size 22158 +oid sha256:99cb7da9282cfcfa64598455827f27ca6791d45ca0d2c3c2dc090d82468dac03 +size 4447 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadProAppIcon167x167.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadProAppIcon167x167.png index 6b696a84b2..86aa72016a 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadProAppIcon167x167.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadProAppIcon167x167.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:061e2d0ce8dc852dd298c80f2aed5fee8ea4b87511c00662aa2d00922c0ba3c2 -size 30162 +oid sha256:101568e946f1d4cea86d666187bbf71116bbf62e6eaf6d80bc3c5e2e184bdb15 +size 7938 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadSettingsIcon29x29.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadSettingsIcon29x29.png index f3dfa05839..79331c29b1 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadSettingsIcon29x29.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadSettingsIcon29x29.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0fb4b4b77620d99dae7473b7bd8affe14630419835bd5719167ed200e657fa4f -size 17504 +oid sha256:cf930ffd4efb0b7b627e05aac6e0f56252ea206623e8b5d097d803aa315cdfb8 +size 1812 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadSettingsIcon58x58.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadSettingsIcon58x58.png index 5325b805fd..27c4aaef2e 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadSettingsIcon58x58.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadSettingsIcon58x58.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8aa9b1194f3244025578225a6a87cbc2dd12c70955ff615c8af640ea7f1334f1 -size 19619 +oid sha256:ba5fea53b349e254b4625035a308d5731cb06f6d0adc278874d14db2627962cb +size 3424 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadSpotlightIcon40x40.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadSpotlightIcon40x40.png index 98d8455838..df1630a95a 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadSpotlightIcon40x40.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadSpotlightIcon40x40.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0c25ffb1af8160b3202977de8c32aaa235e22c643ffd8004e4546c96868ef3b9 -size 18317 +oid sha256:cf087f357cd439d14651073ac079542c60f0648a30dced2a8d19912124b3f8b6 +size 2310 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadSpotlightIcon80x80.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadSpotlightIcon80x80.png index 7482f6c892..4b7f5d6318 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadSpotlightIcon80x80.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadSpotlightIcon80x80.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2db961b8f922a552d8ad374fdb56029efd4049a6cde10399b3d961242c82ce53 -size 22571 +oid sha256:421ad4db14c28ed18666158f9ec30747c5b8c757405c1efb32442978911b0c06 +size 4437 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneAppIcon120x120.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneAppIcon120x120.png index da987b86f9..674c6da124 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneAppIcon120x120.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneAppIcon120x120.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f39d897a57d4da0a70ede7c91339660b28e9d8c57b3e7d749807b13baa4b85f3 -size 28559 +oid sha256:0d0044ebf7e0a5dd23ed64a1289c705d8f6c3c41a62d65e5a1371058855b8cec +size 6546 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneAppIcon180x180.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneAppIcon180x180.png index 205e025c36..c0c10c2390 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneAppIcon180x180.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneAppIcon180x180.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:263b75d58328499eef1f8fa2e64c30706f546badcc0c4464a043b231da93cd0d -size 34969 +oid sha256:3b8717c5f2109dfce1bf7b017278059d4915b524a6eb7e83cfb1926e54ed6869 +size 7383 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneSettingsIcon58x58.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneSettingsIcon58x58.png index 0deb4f4f35..27c4aaef2e 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneSettingsIcon58x58.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneSettingsIcon58x58.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:33522ad8a8e826b22dd9ad214f56e63e24bf55c00bd8c845925d848b855dfb48 -size 19619 +oid sha256:ba5fea53b349e254b4625035a308d5731cb06f6d0adc278874d14db2627962cb +size 3424 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneSettingsIcon87x87.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneSettingsIcon87x87.png index 78591751d7..9093e13867 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneSettingsIcon87x87.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneSettingsIcon87x87.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f405c9f3d908d038aea26049e533b0d10955adfac370c7b3b80209997ea706d0 -size 24407 +oid sha256:a32908a839a6cb0ca2a76d6aa60376ba8a14b4428f06c13149ec277514eb5676 +size 4533 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneSpotlightIcon120x120.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneSpotlightIcon120x120.png index 034dcb9fed..674c6da124 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneSpotlightIcon120x120.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneSpotlightIcon120x120.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d110f6e151799a2327bcdf5ef94d6fc82b114783a8cc973a8915896679ba4a80 -size 28559 +oid sha256:0d0044ebf7e0a5dd23ed64a1289c705d8f6c3c41a62d65e5a1371058855b8cec +size 6546 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneSpotlightIcon80x80.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneSpotlightIcon80x80.png index f0fa89149c..4b7f5d6318 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneSpotlightIcon80x80.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneSpotlightIcon80x80.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:db8f00568fad4e49b05249aaa7a48c9fbf85c8b7a78489c83dc9b8161778bcef -size 22571 +oid sha256:421ad4db14c28ed18666158f9ec30747c5b8c757405c1efb32442978911b0c06 +size 4437 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadAppIcon152x152.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadAppIcon152x152.png index b0dd493c11..ad18894411 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadAppIcon152x152.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadAppIcon152x152.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e4901093fa6190bf37291b0fb6de23fba1be8ebbd742775a8565a4106722fbb6 -size 31942 +oid sha256:ebfc95bd4c0cbcc53d0ef9d314d26e09a347a22dabbf210597f405d9ed8646bf +size 7729 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadAppIcon76x76.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadAppIcon76x76.png index 21aa62e96b..888d8cf785 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadAppIcon76x76.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadAppIcon76x76.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e4ae97c4f44910121a61686862c8342ce598db4cdf9d46b29e96d3cb9e43bd06 -size 22158 +oid sha256:99cb7da9282cfcfa64598455827f27ca6791d45ca0d2c3c2dc090d82468dac03 +size 4447 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadProAppIcon167x167.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadProAppIcon167x167.png index 6b696a84b2..86aa72016a 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadProAppIcon167x167.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadProAppIcon167x167.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:061e2d0ce8dc852dd298c80f2aed5fee8ea4b87511c00662aa2d00922c0ba3c2 -size 30162 +oid sha256:101568e946f1d4cea86d666187bbf71116bbf62e6eaf6d80bc3c5e2e184bdb15 +size 7938 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadSettingsIcon29x29.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadSettingsIcon29x29.png index f3dfa05839..79331c29b1 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadSettingsIcon29x29.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadSettingsIcon29x29.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0fb4b4b77620d99dae7473b7bd8affe14630419835bd5719167ed200e657fa4f -size 17504 +oid sha256:cf930ffd4efb0b7b627e05aac6e0f56252ea206623e8b5d097d803aa315cdfb8 +size 1812 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadSettingsIcon58x58.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadSettingsIcon58x58.png index 5325b805fd..27c4aaef2e 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadSettingsIcon58x58.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadSettingsIcon58x58.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8aa9b1194f3244025578225a6a87cbc2dd12c70955ff615c8af640ea7f1334f1 -size 19619 +oid sha256:ba5fea53b349e254b4625035a308d5731cb06f6d0adc278874d14db2627962cb +size 3424 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadSpotlightIcon40x40.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadSpotlightIcon40x40.png index 98d8455838..df1630a95a 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadSpotlightIcon40x40.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadSpotlightIcon40x40.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0c25ffb1af8160b3202977de8c32aaa235e22c643ffd8004e4546c96868ef3b9 -size 18317 +oid sha256:cf087f357cd439d14651073ac079542c60f0648a30dced2a8d19912124b3f8b6 +size 2310 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadSpotlightIcon80x80.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadSpotlightIcon80x80.png index 7482f6c892..4b7f5d6318 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadSpotlightIcon80x80.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadSpotlightIcon80x80.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2db961b8f922a552d8ad374fdb56029efd4049a6cde10399b3d961242c82ce53 -size 22571 +oid sha256:421ad4db14c28ed18666158f9ec30747c5b8c757405c1efb32442978911b0c06 +size 4437 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneAppIcon120x120.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneAppIcon120x120.png index da987b86f9..674c6da124 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneAppIcon120x120.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneAppIcon120x120.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f39d897a57d4da0a70ede7c91339660b28e9d8c57b3e7d749807b13baa4b85f3 -size 28559 +oid sha256:0d0044ebf7e0a5dd23ed64a1289c705d8f6c3c41a62d65e5a1371058855b8cec +size 6546 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneAppIcon180x180.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneAppIcon180x180.png index 205e025c36..c0c10c2390 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneAppIcon180x180.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneAppIcon180x180.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:263b75d58328499eef1f8fa2e64c30706f546badcc0c4464a043b231da93cd0d -size 34969 +oid sha256:3b8717c5f2109dfce1bf7b017278059d4915b524a6eb7e83cfb1926e54ed6869 +size 7383 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneSettingsIcon58x58.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneSettingsIcon58x58.png index 0deb4f4f35..27c4aaef2e 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneSettingsIcon58x58.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneSettingsIcon58x58.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:33522ad8a8e826b22dd9ad214f56e63e24bf55c00bd8c845925d848b855dfb48 -size 19619 +oid sha256:ba5fea53b349e254b4625035a308d5731cb06f6d0adc278874d14db2627962cb +size 3424 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneSettingsIcon87x87.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneSettingsIcon87x87.png index 78591751d7..9093e13867 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneSettingsIcon87x87.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneSettingsIcon87x87.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f405c9f3d908d038aea26049e533b0d10955adfac370c7b3b80209997ea706d0 -size 24407 +oid sha256:a32908a839a6cb0ca2a76d6aa60376ba8a14b4428f06c13149ec277514eb5676 +size 4533 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneSpotlightIcon120x120.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneSpotlightIcon120x120.png index 034dcb9fed..674c6da124 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneSpotlightIcon120x120.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneSpotlightIcon120x120.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d110f6e151799a2327bcdf5ef94d6fc82b114783a8cc973a8915896679ba4a80 -size 28559 +oid sha256:0d0044ebf7e0a5dd23ed64a1289c705d8f6c3c41a62d65e5a1371058855b8cec +size 6546 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneSpotlightIcon80x80.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneSpotlightIcon80x80.png index f0fa89149c..4b7f5d6318 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneSpotlightIcon80x80.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneSpotlightIcon80x80.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:db8f00568fad4e49b05249aaa7a48c9fbf85c8b7a78489c83dc9b8161778bcef -size 22571 +oid sha256:421ad4db14c28ed18666158f9ec30747c5b8c757405c1efb32442978911b0c06 +size 4437 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/Contents.json b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/Contents.json index 5ea213954f..f836f07ee7 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/Contents.json +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/Contents.json @@ -1,41 +1,5 @@ { "images" : [ - { - "extent" : "full-screen", - "filename" : "iPhoneLaunchImage1242x2688.png", - "idiom" : "iphone", - "minimum-system-version" : "12.0", - "orientation" : "portrait", - "scale" : "3x", - "subtype" : "2688h" - }, - { - "extent" : "full-screen", - "filename" : "iPhoneLaunchImage2688x1242.png", - "idiom" : "iphone", - "minimum-system-version" : "12.0", - "orientation" : "landscape", - "scale" : "3x", - "subtype" : "2688h" - }, - { - "extent" : "full-screen", - "filename" : "iPhoneLaunchImage828x1792.png", - "idiom" : "iphone", - "minimum-system-version" : "12.0", - "orientation" : "portrait", - "scale" : "2x", - "subtype" : "1792h" - }, - { - "extent" : "full-screen", - "filename" : "iPhoneLaunchImage1792x828.png", - "idiom" : "iphone", - "minimum-system-version" : "12.0", - "orientation" : "landscape", - "scale" : "2x", - "subtype" : "1792h" - }, { "extent" : "full-screen", "idiom" : "iphone", @@ -202,4 +166,4 @@ "version" : 1, "author" : "xcode" } -} +} \ No newline at end of file diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1024x768.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1024x768.png index 1249ef3703..9f586d6af3 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1024x768.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1024x768.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:31afa7ed44c5d9844c8d6ce08beccac482c3f43590869a3d190d06e2df377ccc -size 137472 +oid sha256:a4018d9df45b4a04d4cf24a40fe01aa7e30e44a9fdd8ad9a41b0d87791786c12 +size 30442 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1536x2048.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1536x2048.png index cdb6d5a82a..c978631c22 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1536x2048.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1536x2048.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0aac8ef9899442820bec0df8bf6434a46cc787d57c5d6d38a04727b8dc310048 -size 338281 +oid sha256:2eea06cb8ad05acefe9664551af5645d52d9763b82473b1fd4a2b2b6f62e96d3 +size 53550 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage2048x1536.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage2048x1536.png index 954d3084c8..a52e832a42 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage2048x1536.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage2048x1536.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c07495891f15b138ba09f142777b0f43217bf8be05cbb74ba938319f3425980c -size 321125 +oid sha256:90991aca91ab7222fdb85c03947cff38f549a6492551e7447e0c8f55022aae48 +size 52467 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage768x1024.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage768x1024.png index 021319fbc3..3e441fab3b 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage768x1024.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage768x1024.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d6bf6acb92421a453a36fc143ab6cefda14d631ea5e6dbf95c6e252a445fcbac -size 144797 +oid sha256:6c8439a64d18dbff17dd67f6405bf49f99695e9b22fc2cc541dc72c6e3167307 +size 30564 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage1242x2688.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage1242x2688.png deleted file mode 100644 index e190d2b585..0000000000 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage1242x2688.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fc79117e25cc7533ccf6724453e3f44a01b4eaaecded6fa826abe897456f36ee -size 405896 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage1792x828.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage1792x828.png deleted file mode 100644 index 5601f081de..0000000000 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage1792x828.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6c7191be3bdae09dc621012a26b0c1b9c15de1d567cf65ff1079e00f8636a32a -size 220720 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage2688x1242.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage2688x1242.png deleted file mode 100644 index 844b23fdd9..0000000000 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage2688x1242.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:dfbd362f9cb5f285c23807a032af98150cf5409c514445122683736a3c65008c -size 364976 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x1136.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x1136.png index a15fd777fa..e662e9675c 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x1136.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x1136.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e9ad650fda925b1c076a67d1ef70315fe4f14db888c9fd36ee4eba1d18c1e7d1 -size 166749 +oid sha256:f752615184160d7a78f28d9eef354c86e544f11eb1dde9f651d7acd315b3f2e6 +size 35934 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x960.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x960.png index 2855f4069d..2753529fc2 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x960.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x960.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:16f6e9d7bd15fc528d934c252213de8792812e708b1810191c5f1767f7165852 -size 142331 +oid sha256:1a43f1d893e85aa99d335a657ec0f6c13a741db976c033451ab9a2328b8a5970 +size 35559 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage828x1792.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage828x1792.png deleted file mode 100644 index 9ebb93e39c..0000000000 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage828x1792.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b0252b068b232f521ac6eca4a708fad6eaf257d0a66aa03f4f865f6a0b219cfc -size 236433 diff --git a/AutomatedTesting/Gem/Resources/LegacyLogoLauncher.bmp b/AutomatedTesting/Gem/Resources/LegacyLogoLauncher.bmp new file mode 100644 index 0000000000..7a35cddd49 --- /dev/null +++ b/AutomatedTesting/Gem/Resources/LegacyLogoLauncher.bmp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c8433178baebafe984ca23d9325d3c71b5a177fc3b3b869afbb01a583542fbe +size 462842 diff --git a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/Contents.json b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/Contents.json index bfa8bcf478..2b63c0ee15 100644 --- a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/Contents.json @@ -33,7 +33,7 @@ { "size" : "128x128", "idiom" : "mac", - "filename" : "icon_128 _2x.png", + "filename" : "icon_128_2x.png", "scale" : "2x" }, { @@ -45,7 +45,7 @@ { "size" : "256x256", "idiom" : "mac", - "filename" : "icon_256 _2x.png", + "filename" : "icon_256_2x.png", "scale" : "2x" }, { diff --git a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_128 _2x.png b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_128 _2x.png deleted file mode 100644 index 5970ea34ba..0000000000 --- a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_128 _2x.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e38257b6917cdf5d73e90e6009f10c8736d62b20c4e785085305075c7e6320e2 -size 32037 diff --git a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_128.png b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_128.png index 9e30e09547..5a73a4a54d 100644 --- a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_128.png +++ b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_128.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9f41a37d2347a617e93bd97adaf6d4c161c471ca3ef7e04b98c65ddda52396dc -size 27833 +oid sha256:f3c651ca45a83d0f68bdaa466826a29b2ca6f674e225d90e68b7dbadc2ba582d +size 6620 diff --git a/Templates/DefaultProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128 _2x.png b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_128_2x.png similarity index 100% rename from Templates/DefaultProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128 _2x.png rename to AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_128_2x.png diff --git a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_16.png b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_16.png index aeb29abd0a..a7ec66841f 100644 --- a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_16.png +++ b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_16.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b07984494059bf827bc485cbea06d12e0283811face1a18799495f9ba7ae8af1 -size 20779 +oid sha256:f7d5b15add5104d91a03df7d86898f4bc415d095d11c23555b24440497371948 +size 1061 diff --git a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_16_2x.png b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_16_2x.png index 445a389d61..474378c926 100644 --- a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_16_2x.png +++ b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_16_2x.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e645142d284de40aafb7a4a858f3df92b6a5ba9b03fa5f1a2d3cb25211597926 -size 21857 +oid sha256:148fdae6493d7b7e1bb6cc6aae1861e0469838f54dcb3c15cc157a548c707fec +size 1910 diff --git a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_256 _2x.png b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_256 _2x.png deleted file mode 100644 index 0904cf7ce8..0000000000 --- a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_256 _2x.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:07631f41b8dea80713d2463f81a713a9a93798975b6fb50afbeeb13d26c57fa2 -size 48899 diff --git a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_256.png b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_256.png index 5970ea34ba..d30f2d3686 100644 --- a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_256.png +++ b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_256.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e38257b6917cdf5d73e90e6009f10c8736d62b20c4e785085305075c7e6320e2 -size 32037 +oid sha256:094620c172320b062f9a1f8cc758ef4bbee11bc0a6049f46ad6b42f9bf613c92 +size 9679 diff --git a/Templates/DefaultProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256 _2x.png b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_256_2x.png similarity index 100% rename from Templates/DefaultProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256 _2x.png rename to AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_256_2x.png diff --git a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_32.png b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_32.png index 445a389d61..474378c926 100644 --- a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_32.png +++ b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_32.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e645142d284de40aafb7a4a858f3df92b6a5ba9b03fa5f1a2d3cb25211597926 -size 21857 +oid sha256:148fdae6493d7b7e1bb6cc6aae1861e0469838f54dcb3c15cc157a548c707fec +size 1910 diff --git a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_32_2x.png b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_32_2x.png index 1fad9bda96..3359e99cd4 100644 --- a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_32_2x.png +++ b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_32_2x.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ad83faf98b49f4e37112baedeae726f4f8d71bcdd1961d9cdad31f043f8ca666 -size 24003 +oid sha256:749bcd29d73e5ef2d1ef8b2d878626d0bca09c6b0d5f1c9dc6cefe7b9082c8cc +size 3758 diff --git a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_512.png b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_512.png index e1517dddb6..f9ff1c15e3 100644 --- a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_512.png +++ b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_512.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:68529a6c11d5ffa7ecd9d5bbb11ceea28e6852bd45946b525af09602c9a1e1bf -size 48899 +oid sha256:934502e242ff7a2e34e21eed1424b5e0953e701761d158520b3297944132328e +size 18716 diff --git a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_512_2x.png b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_512_2x.png index b425cb685f..a736c7f6b8 100644 --- a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_512_2x.png +++ b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_512_2x.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8a70003840b418848b2ce6c18ed7cbbfcd6fcf76598a6601dca8b98d9b6c1a2f -size 114706 +oid sha256:5719043940db268dccd2e20bd9d6aa13131890d43edf002a173714ae33890422 +size 29510 diff --git a/AutomatedTesting/Levels/AWS/Core/Core.ly b/AutomatedTesting/Levels/AWS/Core/Core.ly new file mode 100644 index 0000000000..8b01ee7abe --- /dev/null +++ b/AutomatedTesting/Levels/AWS/Core/Core.ly @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5242a9b598bc329ef2af2b114092e4e50c7c398cdde4605a0717b0b3ce66d797 +size 10030 diff --git a/AutomatedTesting/Levels/AWS/Core/filelist.xml b/AutomatedTesting/Levels/AWS/Core/filelist.xml new file mode 100644 index 0000000000..9d1fcd2e83 --- /dev/null +++ b/AutomatedTesting/Levels/AWS/Core/filelist.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/AutomatedTesting/Levels/AWS/Core/level.pak b/AutomatedTesting/Levels/AWS/Core/level.pak new file mode 100644 index 0000000000..01b79da84e --- /dev/null +++ b/AutomatedTesting/Levels/AWS/Core/level.pak @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4ba2f409fc974c72b8ee8b660d200ed1d013ee8408419b0e91d6d487e71e4997 +size 3774 diff --git a/AutomatedTesting/Levels/AWS/Core/tags.txt b/AutomatedTesting/Levels/AWS/Core/tags.txt new file mode 100644 index 0000000000..0d6c1880e7 --- /dev/null +++ b/AutomatedTesting/Levels/AWS/Core/tags.txt @@ -0,0 +1,12 @@ +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 diff --git a/AutomatedTesting/ScriptCanvas/dynamodbdemo.scriptcanvas b/AutomatedTesting/ScriptCanvas/dynamodbdemo.scriptcanvas new file mode 100644 index 0000000000..52654666f8 --- /dev/null +++ b/AutomatedTesting/ScriptCanvas/dynamodbdemo.scriptcanvas @@ -0,0 +1,3478 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/AutomatedTesting/ScriptCanvas/lambdademo.scriptcanvas b/AutomatedTesting/ScriptCanvas/lambdademo.scriptcanvas new file mode 100644 index 0000000000..d1ad940ccf --- /dev/null +++ b/AutomatedTesting/ScriptCanvas/lambdademo.scriptcanvas @@ -0,0 +1,2484 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/AutomatedTesting/ScriptCanvas/s3demo.scriptcanvas b/AutomatedTesting/ScriptCanvas/s3demo.scriptcanvas new file mode 100644 index 0000000000..c87c647d60 --- /dev/null +++ b/AutomatedTesting/ScriptCanvas/s3demo.scriptcanvas @@ -0,0 +1,5358 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000..ba7f134922 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,14 @@ +# Contributing + +Welcome to the Open 3D Engine! To learn more about contributing to the [O3DE code repo](README.md), check out the [Contributor's Guide](https://github.com/o3de/community/blob/main/CONTRIBUTING.md). + +The [O3DE community repo](https://github.com/o3de/community) contains information about how to get started, how the community organizes, and more. + +To contribute, please review our [Code of Conduct](https://github.com/o3de/o3de/blob/development/CODE_OF_CONDUCT.md) first. + +## Making contributions with the Developer Certificate of Origin (DCO) + +When contributing, your pull requests will require that you have agreed to our DCO found here: [Devloper Certificate of Origin](https://developercertificate.org/) + +You can do this by using the -s option in git. +Example: ```git commit -s -m 'my commit message'``` \ No newline at end of file diff --git a/Code/Editor/CMakeLists.txt b/Code/Editor/CMakeLists.txt index 8a5f35fb92..13985cfb5e 100644 --- a/Code/Editor/CMakeLists.txt +++ b/Code/Editor/CMakeLists.txt @@ -111,7 +111,6 @@ ly_add_target( AZ::AzCore AZ::AzToolsFramework Gem::LmbrCentral.Static - Legacy::NewsShared AZ::AWSNativeSDKInit AZ::AtomCore Gem::Atom_RPI.Edit @@ -139,7 +138,6 @@ ly_add_source_properties( ly_add_source_properties( SOURCES Core/LevelEditorMenuHandler.cpp - GraphicsSettingsDialog.cpp MainWindow.cpp PROPERTY COMPILE_DEFINITIONS VALUES ${LY_PAL_TOOLS_DEFINES} diff --git a/Code/Editor/Core/LevelEditorMenuHandler.cpp b/Code/Editor/Core/LevelEditorMenuHandler.cpp index ab1229dc6b..600691bdd6 100644 --- a/Code/Editor/Core/LevelEditorMenuHandler.cpp +++ b/Code/Editor/Core/LevelEditorMenuHandler.cpp @@ -497,9 +497,15 @@ void LevelEditorMenuHandler::PopulateEditMenu(ActionManager::MenuWrapper& editMe // Hide Selection editMenu.AddAction(AzToolsFramework::HideSelection); - // Unhide All + // Show All editMenu.AddAction(AzToolsFramework::ShowAll); + // Lock Selection + editMenu.AddAction(AzToolsFramework::LockSelection); + + // UnLock All + editMenu.AddAction(AzToolsFramework::UnlockAll); + /* * The following block of code is part of the feature "Isolation Mode" and is temporarily * disabled for 1.10 release. @@ -552,49 +558,9 @@ void LevelEditorMenuHandler::PopulateEditMenu(ActionManager::MenuWrapper& editMe // Global Preferences... editorSettingsMenu.AddAction(ID_TOOLS_PREFERENCES); - // Graphics Settings... - editorSettingsMenu.AddAction(ID_GRAPHICS_SETTINGS); - // Editor Settings Manager AddOpenViewPaneAction(editorSettingsMenu, LyViewPane::EditorSettingsManager); - // Graphics Performance - auto graphicPerformanceSubMenu = editorSettingsMenu.AddMenu(QObject::tr("Graphics Performance")); - - auto pcMenu = graphicPerformanceSubMenu.AddMenu(tr("PC")); - pcMenu.AddAction(ID_GAME_PC_ENABLEVERYHIGHSPEC); - pcMenu.AddAction(ID_GAME_PC_ENABLEHIGHSPEC); - pcMenu.AddAction(ID_GAME_PC_ENABLEMEDIUMSPEC); - pcMenu.AddAction(ID_GAME_PC_ENABLELOWSPEC); - - auto osxmetalMenu = graphicPerformanceSubMenu.AddMenu(tr("OSX Metal")); - osxmetalMenu.AddAction(ID_GAME_OSXMETAL_ENABLEVERYHIGHSPEC); - osxmetalMenu.AddAction(ID_GAME_OSXMETAL_ENABLEHIGHSPEC); - osxmetalMenu.AddAction(ID_GAME_OSXMETAL_ENABLEMEDIUMSPEC); - osxmetalMenu.AddAction(ID_GAME_OSXMETAL_ENABLELOWSPEC); - - auto androidMenu = graphicPerformanceSubMenu.AddMenu(tr("Android")); - androidMenu.AddAction(ID_GAME_ANDROID_ENABLEVERYHIGHSPEC); - androidMenu.AddAction(ID_GAME_ANDROID_ENABLEHIGHSPEC); - androidMenu.AddAction(ID_GAME_ANDROID_ENABLEMEDIUMSPEC); - androidMenu.AddAction(ID_GAME_ANDROID_ENABLELOWSPEC); - - auto iosMenu = graphicPerformanceSubMenu.AddMenu(tr("iOS")); - iosMenu.AddAction(ID_GAME_IOS_ENABLEVERYHIGHSPEC); - iosMenu.AddAction(ID_GAME_IOS_ENABLEHIGHSPEC); - iosMenu.AddAction(ID_GAME_IOS_ENABLEMEDIUMSPEC); - iosMenu.AddAction(ID_GAME_IOS_ENABLELOWSPEC); - -#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)\ - auto publicname##Menu = graphicPerformanceSubMenu.AddMenu(tr(PublicAuxName2));\ - publicname##Menu.AddAction(ID_GAME_##CODENAME##_ENABLEHIGHSPEC);\ - publicname##Menu.AddAction(ID_GAME_##CODENAME##_ENABLEMEDIUMSPEC);\ - publicname##Menu.AddAction(ID_GAME_##CODENAME##_ENABLELOWSPEC); - AZ_TOOLS_EXPAND_FOR_RESTRICTED_PLATFORMS -#undef AZ_RESTRICTED_PLATFORM_EXPANSION -#endif - // Keyboard Customization auto keyboardCustomizationMenu = editorSettingsMenu.AddMenu(tr("Keyboard Customization")); keyboardCustomizationMenu.AddAction(ID_TOOLS_CUSTOMIZEKEYBOARD); diff --git a/Code/Editor/CryEdit.cpp b/Code/Editor/CryEdit.cpp index 8efd4bc5b3..b0dddc94ae 100644 --- a/Code/Editor/CryEdit.cpp +++ b/Code/Editor/CryEdit.cpp @@ -111,7 +111,6 @@ AZ_POP_DISABLE_WARNING #include "ToolBox.h" #include "LevelInfo.h" #include "EditorPreferencesDialog.h" -#include "GraphicsSettingsDialog.h" #include "AnimationContext.h" #include "GotoPositionDlg.h" @@ -440,7 +439,6 @@ void CCryEditApp::RegisterActionHandlers() ON_COMMAND(ID_CLEAR_REGISTRY, OnClearRegistryData) ON_COMMAND(ID_VALIDATELEVEL, OnValidatelevel) ON_COMMAND(ID_TOOLS_PREFERENCES, OnToolsPreferences) - ON_COMMAND(ID_GRAPHICS_SETTINGS, OnGraphicsSettings) ON_COMMAND(ID_SWITCHCAMERA_DEFAULTCAMERA, OnSwitchToDefaultCamera) ON_COMMAND(ID_SWITCHCAMERA_SEQUENCECAMERA, OnSwitchToSequenceCamera) ON_COMMAND(ID_SWITCHCAMERA_SELECTEDCAMERA, OnSwitchToSelectedcamera) @@ -453,14 +451,6 @@ void CCryEditApp::RegisterActionHandlers() ON_COMMAND(ID_OPEN_TRACKVIEW, OnOpenTrackView) ON_COMMAND(ID_OPEN_UICANVASEDITOR, OnOpenUICanvasEditor) - ON_COMMAND_RANGE(ID_GAME_PC_ENABLELOWSPEC, ID_GAME_PC_ENABLEVERYHIGHSPEC, OnChangeGameSpec) - - ON_COMMAND_RANGE(ID_GAME_OSXMETAL_ENABLELOWSPEC, ID_GAME_OSXMETAL_ENABLEVERYHIGHSPEC, OnChangeGameSpec) - - ON_COMMAND_RANGE(ID_GAME_ANDROID_ENABLELOWSPEC, ID_GAME_ANDROID_ENABLEVERYHIGHSPEC, OnChangeGameSpec) - - ON_COMMAND_RANGE(ID_GAME_IOS_ENABLELOWSPEC, ID_GAME_IOS_ENABLEVERYHIGHSPEC, OnChangeGameSpec) - #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)\ ON_COMMAND_RANGE(ID_GAME_##CODENAME##_ENABLELOWSPEC, ID_GAME_##CODENAME##_ENABLEHIGHSPEC, OnChangeGameSpec) @@ -3674,13 +3664,6 @@ void CCryEditApp::OnToolsPreferences() dlg.exec(); } -////////////////////////////////////////////////////////////////////////// -void CCryEditApp::OnGraphicsSettings() -{ - GraphicsSettingsDialog dlg(MainWindow::instance()); - dlg.exec(); -} - ////////////////////////////////////////////////////////////////////////// void CCryEditApp::OnSwitchToDefaultCamera() { @@ -3815,91 +3798,6 @@ void CCryEditApp::OnOpenUICanvasEditor() QtViewPaneManager::instance()->OpenPane(LyViewPane::UiEditor); } -////////////////////////////////////////////////////////////////////////// -void CCryEditApp::SetGameSpecCheck(ESystemConfigSpec spec, ESystemConfigPlatform platform, int &nCheck, bool &enable) -{ - if (GetIEditor()->GetEditorConfigSpec() == spec && GetIEditor()->GetEditorConfigPlatform() == platform) - { - nCheck = 1; - } - enable = spec <= GetIEditor()->GetSystem()->GetMaxConfigSpec(); -} - -////////////////////////////////////////////////////////////////////////// -void CCryEditApp::OnUpdateGameSpec(QAction* action) -{ - Q_ASSERT(action->isCheckable()); - int nCheck = 0; - bool enable = true; - switch (action->data().toInt()) - { - case ID_GAME_PC_ENABLELOWSPEC: - SetGameSpecCheck(CONFIG_LOW_SPEC, CONFIG_PC, nCheck, enable); - break; - case ID_GAME_PC_ENABLEMEDIUMSPEC: - SetGameSpecCheck(CONFIG_MEDIUM_SPEC, CONFIG_PC, nCheck, enable); - break; - case ID_GAME_PC_ENABLEHIGHSPEC: - SetGameSpecCheck(CONFIG_HIGH_SPEC, CONFIG_PC, nCheck, enable); - break; - case ID_GAME_PC_ENABLEVERYHIGHSPEC: - SetGameSpecCheck(CONFIG_VERYHIGH_SPEC, CONFIG_PC, nCheck, enable); - break; - case ID_GAME_OSXMETAL_ENABLELOWSPEC: - SetGameSpecCheck(CONFIG_LOW_SPEC, CONFIG_OSX_METAL, nCheck, enable); - break; - case ID_GAME_OSXMETAL_ENABLEMEDIUMSPEC: - SetGameSpecCheck(CONFIG_MEDIUM_SPEC, CONFIG_OSX_METAL, nCheck, enable); - break; - case ID_GAME_OSXMETAL_ENABLEHIGHSPEC: - SetGameSpecCheck(CONFIG_HIGH_SPEC, CONFIG_OSX_METAL, nCheck, enable); - break; - case ID_GAME_OSXMETAL_ENABLEVERYHIGHSPEC: - SetGameSpecCheck(CONFIG_VERYHIGH_SPEC, CONFIG_OSX_METAL, nCheck, enable); - break; - case ID_GAME_ANDROID_ENABLELOWSPEC: - SetGameSpecCheck(CONFIG_LOW_SPEC, CONFIG_ANDROID, nCheck, enable); - break; - case ID_GAME_ANDROID_ENABLEMEDIUMSPEC: - SetGameSpecCheck(CONFIG_MEDIUM_SPEC, CONFIG_ANDROID, nCheck, enable); - break; - case ID_GAME_ANDROID_ENABLEHIGHSPEC: - SetGameSpecCheck(CONFIG_HIGH_SPEC, CONFIG_ANDROID, nCheck, enable); - break; - case ID_GAME_ANDROID_ENABLEVERYHIGHSPEC: - SetGameSpecCheck(CONFIG_VERYHIGH_SPEC, CONFIG_ANDROID, nCheck, enable); - break; - case ID_GAME_IOS_ENABLELOWSPEC: - SetGameSpecCheck(CONFIG_LOW_SPEC, CONFIG_IOS, nCheck, enable); - break; - case ID_GAME_IOS_ENABLEMEDIUMSPEC: - SetGameSpecCheck(CONFIG_MEDIUM_SPEC, CONFIG_IOS, nCheck, enable); - break; - case ID_GAME_IOS_ENABLEHIGHSPEC: - SetGameSpecCheck(CONFIG_HIGH_SPEC, CONFIG_IOS, nCheck, enable); - break; - case ID_GAME_IOS_ENABLEVERYHIGHSPEC: - SetGameSpecCheck(CONFIG_VERYHIGH_SPEC, CONFIG_IOS, nCheck, enable); - break; -#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)\ - case ID_GAME_##CODENAME##_ENABLELOWSPEC:\ - SetGameSpecCheck(CONFIG_LOW_SPEC, CONFIG_##CODENAME, nCheck, enable);\ - break;\ - case ID_GAME_##CODENAME##_ENABLEMEDIUMSPEC:\ - SetGameSpecCheck(CONFIG_MEDIUM_SPEC, CONFIG_##CODENAME, nCheck, enable);\ - break;\ - case ID_GAME_##CODENAME##_ENABLEHIGHSPEC:\ - SetGameSpecCheck(CONFIG_HIGH_SPEC, CONFIG_##CODENAME, nCheck, enable);\ - break; - AZ_TOOLS_EXPAND_FOR_RESTRICTED_PLATFORMS -#undef AZ_RESTRICTED_PLATFORM_EXPANSION -#endif - } - action->setChecked(nCheck); - action->setEnabled(enable); -} - ////////////////////////////////////////////////////////////////////////// RecentFileList* CCryEditApp::GetRecentFileList() { diff --git a/Code/Editor/CryEdit.h b/Code/Editor/CryEdit.h index 0628289897..5de8aa5e6c 100644 --- a/Code/Editor/CryEdit.h +++ b/Code/Editor/CryEdit.h @@ -403,7 +403,6 @@ private: void OnClearRegistryData(); void OnValidatelevel(); void OnToolsPreferences(); - void OnGraphicsSettings(); void OnSwitchToDefaultCamera(); void OnUpdateSwitchToDefaultCamera(QAction* action); void OnSwitchToSequenceCamera(); @@ -416,9 +415,6 @@ private: void OnOpenTrackView(); void OnOpenAudioControlsEditor(); void OnOpenUICanvasEditor(); - void OnChangeGameSpec(UINT nID); - void SetGameSpecCheck(ESystemConfigSpec spec, ESystemConfigPlatform platform, int &nCheck, bool &enable); - void OnUpdateGameSpec(QAction* action); void OnOpenQuickAccessBar(); public: diff --git a/Code/Editor/CryEditPy.cpp b/Code/Editor/CryEditPy.cpp index 02833a84e0..2e414da277 100644 --- a/Code/Editor/CryEditPy.cpp +++ b/Code/Editor/CryEditPy.cpp @@ -407,78 +407,6 @@ inline namespace Commands } } -////////////////////////////////////////////////////////////////////////// -void CCryEditApp::OnChangeGameSpec(UINT nID) -{ - switch (nID) - { - case ID_GAME_PC_ENABLELOWSPEC: - Commands::PySetConfigSpec(CONFIG_LOW_SPEC, CONFIG_PC); - break; - case ID_GAME_PC_ENABLEMEDIUMSPEC: - Commands::PySetConfigSpec(CONFIG_MEDIUM_SPEC, CONFIG_PC); - break; - case ID_GAME_PC_ENABLEHIGHSPEC: - Commands::PySetConfigSpec(CONFIG_HIGH_SPEC, CONFIG_PC); - break; - case ID_GAME_PC_ENABLEVERYHIGHSPEC: - Commands::PySetConfigSpec(CONFIG_VERYHIGH_SPEC, CONFIG_PC); - break; - case ID_GAME_OSXMETAL_ENABLELOWSPEC: - Commands::PySetConfigSpec(CONFIG_LOW_SPEC, CONFIG_OSX_METAL); - break; - case ID_GAME_OSXMETAL_ENABLEMEDIUMSPEC: - Commands::PySetConfigSpec(CONFIG_MEDIUM_SPEC, CONFIG_OSX_METAL); - break; - case ID_GAME_OSXMETAL_ENABLEHIGHSPEC: - Commands::PySetConfigSpec(CONFIG_HIGH_SPEC, CONFIG_OSX_METAL); - break; - case ID_GAME_OSXMETAL_ENABLEVERYHIGHSPEC: - Commands::PySetConfigSpec(CONFIG_VERYHIGH_SPEC, CONFIG_OSX_METAL); - break; - case ID_GAME_ANDROID_ENABLELOWSPEC: - Commands::PySetConfigSpec(CONFIG_LOW_SPEC, CONFIG_ANDROID); - break; - case ID_GAME_ANDROID_ENABLEMEDIUMSPEC: - Commands::PySetConfigSpec(CONFIG_MEDIUM_SPEC, CONFIG_ANDROID); - break; - case ID_GAME_ANDROID_ENABLEHIGHSPEC: - Commands::PySetConfigSpec(CONFIG_HIGH_SPEC, CONFIG_ANDROID); - break; - case ID_GAME_ANDROID_ENABLEVERYHIGHSPEC: - Commands::PySetConfigSpec(CONFIG_VERYHIGH_SPEC, CONFIG_ANDROID); - break; - case ID_GAME_IOS_ENABLELOWSPEC: - Commands::PySetConfigSpec(CONFIG_LOW_SPEC, CONFIG_IOS); - break; - case ID_GAME_IOS_ENABLEMEDIUMSPEC: - Commands::PySetConfigSpec(CONFIG_MEDIUM_SPEC, CONFIG_IOS); - break; - case ID_GAME_IOS_ENABLEHIGHSPEC: - Commands::PySetConfigSpec(CONFIG_HIGH_SPEC, CONFIG_IOS); - break; - case ID_GAME_IOS_ENABLEVERYHIGHSPEC: - Commands::PySetConfigSpec(CONFIG_VERYHIGH_SPEC, CONFIG_IOS); - break; -#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)\ - case ID_GAME_##CODENAME##_ENABLELOWSPEC:\ - Commands::PySetConfigSpec(CONFIG_LOW_SPEC, CONFIG_##CODENAME);\ - break;\ - case ID_GAME_##CODENAME##_ENABLEMEDIUMSPEC:\ - Commands::PySetConfigSpec(CONFIG_MEDIUM_SPEC, CONFIG_##CODENAME);\ - break;\ - case ID_GAME_##CODENAME##_ENABLEHIGHSPEC:\ - Commands::PySetConfigSpec(CONFIG_HIGH_SPEC, CONFIG_##CODENAME);\ - break; - AZ_TOOLS_EXPAND_FOR_RESTRICTED_PLATFORMS -#undef AZ_RESTRICTED_PLATFORM_EXPANSION -#endif - } -} - - - namespace AzToolsFramework { void CryEditPythonHandler::Reflect(AZ::ReflectContext* context) diff --git a/Code/Editor/EditorViewportWidget.cpp b/Code/Editor/EditorViewportWidget.cpp index 1cfc3b6dd0..3f86260f8d 100644 --- a/Code/Editor/EditorViewportWidget.cpp +++ b/Code/Editor/EditorViewportWidget.cpp @@ -458,25 +458,7 @@ void EditorViewportWidget::Update() SetFOV(cameraState.m_fovOrZoom); m_Camera.SetZRange(cameraState.m_nearClip, cameraState.m_farClip); } - else if (!ed_useNewCameraSystem) - { - m_renderViewport->GetViewportContext()->SetCameraTransform(LYTransformToAZTransform(m_Camera.GetMatrix())); - } - // Don't override the game mode FOV - if (!GetIEditor()->IsInGameMode()) - { - AZ::Matrix4x4 clipMatrix; - AZ::MakePerspectiveFovMatrixRH( - clipMatrix, - GetFOV(), - aznumeric_cast(width()) / aznumeric_cast(height()), - m_Camera.GetNearPlane(), - m_Camera.GetFarPlane(), - true - ); - m_renderViewport->GetViewportContext()->SetCameraProjectionMatrix(clipMatrix); - } // Reset the camera update flag now that we're finished updating our viewport context m_updateCameraPositionNextTick = false; @@ -632,7 +614,6 @@ void EditorViewportWidget::SetViewEntity(const AZ::EntityId& viewEntityId, bool void EditorViewportWidget::ResetToViewSourceType(const ViewSourceType& viewSourceType) { LockCameraMovement(true); - m_pCameraFOVVariable = nullptr; m_viewEntityId.SetInvalid(); m_cameraObjectId = GUID_NULL; m_viewSourceType = viewSourceType; @@ -714,7 +695,7 @@ void EditorViewportWidget::OnEditorNotifyEvent(EEditorNotifyEvent event) if (m_renderViewport) { - m_renderViewport->GetControllerList()->SetEnabled(false); + m_renderViewport->SetInputProcessingEnabled(false); } } break; @@ -738,7 +719,7 @@ void EditorViewportWidget::OnEditorNotifyEvent(EEditorNotifyEvent event) if (m_renderViewport) { - m_renderViewport->GetControllerList()->SetEnabled(true); + m_renderViewport->SetInputProcessingEnabled(true); } break; @@ -2547,13 +2528,26 @@ void EditorViewportWidget::CenterOnSliceInstance() ////////////////////////////////////////////////////////////////////////// void EditorViewportWidget::SetFOV(float fov) { - if (m_pCameraFOVVariable) + if (m_viewEntityId.IsValid()) { - m_pCameraFOVVariable->Set(fov); + Camera::CameraRequestBus::Event(m_viewEntityId, &Camera::CameraComponentRequests::SetFov, AZ::RadToDeg(fov)); } else { m_camFOV = fov; + // Set the active camera's FOV + { + AZ::Matrix4x4 clipMatrix; + AZ::MakePerspectiveFovMatrixRH( + clipMatrix, + GetFOV(), + aznumeric_cast(width()) / aznumeric_cast(height()), + m_Camera.GetNearPlane(), + m_Camera.GetFarPlane(), + true + ); + m_renderViewport->GetViewportContext()->SetCameraProjectionMatrix(clipMatrix); + } } if (m_viewPane) @@ -2580,13 +2574,7 @@ float EditorViewportWidget::GetFOV() const } } - if (m_pCameraFOVVariable) - { - float fov; - m_pCameraFOVVariable->Get(fov); - return fov; - } - else if (m_viewEntityId.IsValid()) + if (m_viewEntityId.IsValid()) { float fov = AZ::RadToDeg(m_camFOV); Camera::CameraRequestBus::EventResult(fov, m_viewEntityId, &Camera::CameraComponentRequests::GetFov); @@ -2970,7 +2958,12 @@ void EditorViewportWidget::RestoreViewportAfterGameMode() { Matrix34 preGameModeViewTM = m_preGameModeViewTM; - QString text = QString("You are exiting Game Mode. Would you like to restore the camera in the viewport to where it was before you entered Game Mode?

This option can always be changed in the General Preferences tab of the Editor Settings, by toggling the \"%1\" option.

").arg(EditorPreferencesGeneralRestoreViewportCameraSettingName); + QString text = + QString( + tr("When leaving \" Game Mode \" the engine will automatically restore your camera position to the default position before you " + "had entered Game mode.

If you dislike this setting you can always change this anytime in the global " + "preferences.

")) + .arg(EditorPreferencesGeneralRestoreViewportCameraSettingName); QString restoreOnExitGameModePopupDisabledRegKey("Editor/AutoHide/ViewportCameraRestoreOnExitGameMode"); // Read the popup disabled registry value @@ -2985,6 +2978,7 @@ void EditorViewportWidget::RestoreViewportAfterGameMode() messageBox.setDefaultButton(QMessageBox::Yes); QCheckBox* checkBox = new QCheckBox(QStringLiteral("Do not show this message again")); + checkBox->setChecked(true); messageBox.setCheckBox(checkBox); // Unconstrain the system cursor and make it visible before we show the dialog box, otherwise the user can't see the cursor. diff --git a/Code/Editor/EditorViewportWidget.h b/Code/Editor/EditorViewportWidget.h index a395ef50a4..69015dcc79 100644 --- a/Code/Editor/EditorViewportWidget.h +++ b/Code/Editor/EditorViewportWidget.h @@ -506,7 +506,6 @@ protected: CPredefinedAspectRatios m_predefinedAspectRatios; - IVariable* m_pCameraFOVVariable = nullptr; bool m_bCursorHidden = false; void OnMenuResolutionCustom(); diff --git a/Code/Editor/GraphicsSettingsDialog.cpp b/Code/Editor/GraphicsSettingsDialog.cpp deleted file mode 100644 index dbd7a7fc1a..0000000000 --- a/Code/Editor/GraphicsSettingsDialog.cpp +++ /dev/null @@ -1,1392 +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 "ProjectDefines.h" -#include "EditorDefs.h" - -#include "GraphicsSettingsDialog.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -// AzFramework -#include -#include -#include -#include - -// Editor -#include "Util/AutoDirectoryRestoreFileDialog.h" - -AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING -#include "ui_graphicssettingsdialog.h" -AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING - -QString groupNames[] = -{ - "Game Effects", - "Light", - "Object Detail", - "Particles", - "Physics", - "Post Processing", - "Quality", - "Shading", - "Shadows", - "Sound", - "Texture", - "Texture Resolution", - "Volumetric Effects", - "Water", - "Miscellaneous" -}; - -GraphicsSettingsDialog::GraphicsSettingsDialog(QWidget* parent /* = nullptr */) - : QDialog(parent) - , m_ui(new Ui::GraphicsSettingsDialog()) -{ - //Update qlabel color when disabled - setStyleSheet("QLabel::disabled{color: gray;}"); - - // Start initialization the dialog - m_ui->setupUi(this); - setWindowTitle("Graphics Settings"); - m_ui->m_applyButton->setDefault(true); - m_headerView = new GraphicsSettingsHeaderView(this, Qt::Horizontal); - m_headerView->setMouseTracking(true); - m_ui->m_graphicsSettingsTreeView->setHeader(m_headerView); - ///////////////////////////////////////////// - - m_currentPlatform = GetISystem()->GetConfigPlatform(); - m_currentSpecIndex = 0; - m_dirtyCVarCount = 0; - - m_showCustomSpec = true; - ShowCustomSpecOption(false); - - // Show categories, disable apply button - m_showCategories = true; - m_ui->m_applyButton->setEnabled(false); - - m_graphicsSettingsModel = new GraphicsSettingsModel(this); - m_ui->m_graphicsSettingsTreeView->setModel(m_graphicsSettingsModel); - - m_cfgFiles[CONFIG_PC].push_back("pc_low.cfg"); - m_cfgFiles[CONFIG_PC].push_back("pc_medium.cfg"); - m_cfgFiles[CONFIG_PC].push_back("pc_high.cfg"); - m_cfgFiles[CONFIG_PC].push_back("pc_veryhigh.cfg"); - m_cfgFiles[CONFIG_OSX_METAL].push_back("osx_metal_low.cfg"); - m_cfgFiles[CONFIG_OSX_METAL].push_back("osx_metal_medium.cfg"); - m_cfgFiles[CONFIG_OSX_METAL].push_back("osx_metal_high.cfg"); - m_cfgFiles[CONFIG_OSX_METAL].push_back("osx_metal_veryhigh.cfg"); - m_cfgFiles[CONFIG_ANDROID].push_back("android_low.cfg"); - m_cfgFiles[CONFIG_ANDROID].push_back("android_medium.cfg"); - m_cfgFiles[CONFIG_ANDROID].push_back("android_high.cfg"); - m_cfgFiles[CONFIG_ANDROID].push_back("android_veryhigh.cfg"); - m_cfgFiles[CONFIG_IOS].push_back("ios_low.cfg"); - m_cfgFiles[CONFIG_IOS].push_back("ios_medium.cfg"); - m_cfgFiles[CONFIG_IOS].push_back("ios_high.cfg"); - m_cfgFiles[CONFIG_IOS].push_back("ios_veryhigh.cfg"); -#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)\ - m_cfgFiles[CONFIG_##CODENAME].push_back(#publicname "_low.cfg");\ - m_cfgFiles[CONFIG_##CODENAME].push_back(#publicname "_medium.cfg");\ - m_cfgFiles[CONFIG_##CODENAME].push_back(#publicname "_high.cfg"); - AZ_TOOLS_EXPAND_FOR_RESTRICTED_PLATFORMS -#undef AZ_RESTRICTED_PLATFORM_EXPANSION -#endif - // Since the layout order is set by the .ui file we need to match the order here so that tabbing works correctly. - m_cvarGroupOrder.push_back("Config/CVarGroups/sys_spec_gameeffects.cfg"); - m_cvarGroupOrder.push_back("Config/CVarGroups/sys_spec_light.cfg"); - m_cvarGroupOrder.push_back("Config/CVarGroups/sys_spec_objectdetail.cfg"); - m_cvarGroupOrder.push_back("Config/CVarGroups/sys_spec_particles.cfg"); - m_cvarGroupOrder.push_back("Config/CVarGroups/sys_spec_physics.cfg"); - m_cvarGroupOrder.push_back("Config/CVarGroups/sys_spec_postprocessing.cfg"); - m_cvarGroupOrder.push_back("Config/CVarGroups/sys_spec_quality.cfg"); - m_cvarGroupOrder.push_back("Config/CVarGroups/sys_spec_shading.cfg"); - m_cvarGroupOrder.push_back("Config/CVarGroups/sys_spec_shadows.cfg"); - m_cvarGroupOrder.push_back("Config/CVarGroups/sys_spec_sound.cfg"); - m_cvarGroupOrder.push_back("Config/CVarGroups/sys_spec_texture.cfg"); - m_cvarGroupOrder.push_back("Config/CVarGroups/sys_spec_textureresolution.cfg"); - m_cvarGroupOrder.push_back("Config/CVarGroups/sys_spec_volumetriceffects.cfg"); - m_cvarGroupOrder.push_back("Config/CVarGroups/sys_spec_water.cfg"); - m_cvarGroupOrder.push_back("miscellaneous"); - - m_platformStrings.push_back(AZStd::make_pair("PC", CONFIG_PC)); - m_platformStrings.push_back(AZStd::make_pair("OSX Metal", CONFIG_OSX_METAL)); - m_platformStrings.push_back(AZStd::make_pair("Android", CONFIG_ANDROID)); - m_platformStrings.push_back(AZStd::make_pair("iOS", CONFIG_IOS)); -#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)\ - m_platformStrings.push_back(AZStd::make_pair(PublicAuxName2, CONFIG_##CODENAME)); - AZ_TOOLS_EXPAND_FOR_RESTRICTED_PLATFORMS -#undef AZ_RESTRICTED_PLATFORM_EXPANSION -#endif - m_platformStrings.push_back(AZStd::make_pair("Custom", CONFIG_INVALID_PLATFORM)); - - for (auto& platformString : m_platformStrings) - { - QString platform = platformString.first.c_str(); - m_ui->m_platformEntry->addItem(platform); - } - - QSettings settings("O3DE", "O3DE"); - settings.beginGroup("GraphicsSettingsDialog"); - - if (settings.contains("Platform")) - { - QString platformName = settings.value("Platform").toString(); - AZStd::string azPlatform = platformName.toUtf8().data(); - m_currentPlatform = GetConfigPlatformFromName(azPlatform); - if (m_currentPlatform == CONFIG_INVALID_PLATFORM) - { - ShowCustomSpecOption(true); - } - } - - settings.endGroup(); - - SetPlatformEntry(m_currentPlatform); - - BuildUI(); - - connect(m_ui->m_graphicsSettingsTreeView, &QTreeView::collapsed, this, [&](const QModelIndex& index) { SetCollapsed(index, true); }); - connect(m_ui->m_graphicsSettingsTreeView, &QTreeView::expanded, this, [&](const QModelIndex& index) { SetCollapsed(index, false); }); - - AzQtComponents::StyleManager::setStyleSheet(this, "style:GraphicsSettingsDialog.qss"); -} - -GraphicsSettingsDialog::~GraphicsSettingsDialog() -{ - QSettings settings("O3DE", "O3DE"); - settings.beginGroup("GraphicsSettingsDialog"); - - auto platformCheck = [this](AZStd::pair& stringConfigPair) { return stringConfigPair.second == m_currentPlatform; }; - auto platformStringsIterator = AZStd::find_if(m_platformStrings.begin(), m_platformStrings.end(), platformCheck); - if (platformStringsIterator != m_platformStrings.end()) - { - settings.setValue("Platform", platformStringsIterator->first.c_str()); - } - else - { - settings.remove("Platform"); - } - - settings.beginGroup("cvarGroup"); - - for (auto& collapseIterator : m_uiCollapseGroup) - { - settings.setValue(collapseIterator->m_groupName, collapseIterator->m_isCollapsed); - } - - settings.endGroup(); - settings.endGroup(); - settings.sync(); - - for (CollapseGroup* group : m_uiCollapseGroup) - { - // Destructor of CollapseGroup will set the members - // pointing to nullptr. The actually destruction of the - // widgets will be done on destruction of m_ui - delete group; - } - - for (ParameterWidget* widget : m_parameterWidgets) - { - // Destructor of ParameterWidget will set the members - // pointing to nullptr. The actually destruction of the - // widgets will be done on destruction of m_ui - delete widget; - } - - // Delete m_ui will destruct all the UI elements with in the ui file - // Since m_ui is a QScopedPointer which will cleanup itself on the end - // of the scope. -} - -void GraphicsSettingsDialog::SetSettingsTree(int numColumns) -{ - m_graphicsSettingsModel->clear(); - m_uiCollapseGroup.clear(); - m_graphicsSettingsModel->setColumnCount(numColumns); - - for (int i = 1; i < numColumns; ++i) - { - m_ui->m_graphicsSettingsTreeView->header()->setSectionResizeMode(i, QHeaderView::Stretch); - } - - m_ui->m_graphicsSettingsTreeView->setColumnWidth(0, 200); - m_ui->m_graphicsSettingsTreeView->header()->setMinimumSectionSize(100); - - m_graphicsSettingsModel->setHeaderData(0, Qt::Horizontal, "Properties"); - - auto parentItem = m_graphicsSettingsModel->invisibleRootItem(); - - for (int i = 0; i < aznumeric_cast(GraphicsSettings::numSettings); ++i) - { - QStandardItem* row = new QStandardItem(); - row->setData(groupNames[i], Qt::DisplayRole); - parentItem->appendRow(row); - SetCollapsedLayout(groupNames[i].replace(" ", ""), row); - } - m_numColumns = numColumns; - - m_cvarGroupData["Config/CVarGroups/sys_spec_gameeffects.cfg"].m_treeRowItem = m_graphicsSettingsModel->item(aznumeric_cast(GraphicsSettings::GameEffects)); - m_cvarGroupData["Config/CVarGroups/sys_spec_light.cfg"].m_treeRowItem = m_graphicsSettingsModel->item(aznumeric_cast(GraphicsSettings::Light)); - m_cvarGroupData["Config/CVarGroups/sys_spec_objectdetail.cfg"].m_treeRowItem = m_graphicsSettingsModel->item(aznumeric_cast(GraphicsSettings::ObjectDetail)); - m_cvarGroupData["Config/CVarGroups/sys_spec_particles.cfg"].m_treeRowItem = m_graphicsSettingsModel->item(aznumeric_cast(GraphicsSettings::Particles)); - m_cvarGroupData["Config/CVarGroups/sys_spec_physics.cfg"].m_treeRowItem = m_graphicsSettingsModel->item(aznumeric_cast(GraphicsSettings::Physics)); - m_cvarGroupData["Config/CVarGroups/sys_spec_postprocessing.cfg"].m_treeRowItem = m_graphicsSettingsModel->item(aznumeric_cast(GraphicsSettings::PostProcessing)); - m_cvarGroupData["Config/CVarGroups/sys_spec_quality.cfg"].m_treeRowItem = m_graphicsSettingsModel->item(aznumeric_cast(GraphicsSettings::Quality)); - m_cvarGroupData["Config/CVarGroups/sys_spec_shading.cfg"].m_treeRowItem = m_graphicsSettingsModel->item(aznumeric_cast(GraphicsSettings::Shading)); - m_cvarGroupData["Config/CVarGroups/sys_spec_shadows.cfg"].m_treeRowItem = m_graphicsSettingsModel->item(aznumeric_cast(GraphicsSettings::Shadows)); - m_cvarGroupData["Config/CVarGroups/sys_spec_sound.cfg"].m_treeRowItem = m_graphicsSettingsModel->item(aznumeric_cast(GraphicsSettings::Sound)); - m_cvarGroupData["Config/CVarGroups/sys_spec_texture.cfg"].m_treeRowItem = m_graphicsSettingsModel->item(aznumeric_cast(GraphicsSettings::Texture)); - m_cvarGroupData["Config/CVarGroups/sys_spec_textureresolution.cfg"].m_treeRowItem = m_graphicsSettingsModel->item(aznumeric_cast(GraphicsSettings::TextureResolution)); - m_cvarGroupData["Config/CVarGroups/sys_spec_volumetriceffects.cfg"].m_treeRowItem = m_graphicsSettingsModel->item(aznumeric_cast(GraphicsSettings::VolumetricEffects)); - m_cvarGroupData["Config/CVarGroups/sys_spec_water.cfg"].m_treeRowItem = m_graphicsSettingsModel->item(aznumeric_cast(GraphicsSettings::Water)); - m_cvarGroupData["miscellaneous"].m_treeRowItem = m_graphicsSettingsModel->item(aznumeric_cast(GraphicsSettings::Miscellaneous)); -} - -void GraphicsSettingsDialog::OnLoadConfigurationEntry(const char* strKey, const char* strValue, const char* strGroup) -{ - AZStd::string key = strKey; - ICVar* cvar = gEnv->pConsole->GetCVar(strKey); - - if (cvar) - { - AZStd::transform(key.begin(), key.end(), key.begin(), tolower); - if (azstricmp(key.c_str(), "sys_spec_full") == 0 || key.find("sys_spec_") == key.npos) - { - int type = cvar->GetType(); - AZStd::any val; - if (type == CVAR_INT) - { - val = atoi(strValue); - } - else if (type == CVAR_FLOAT) - { - val = static_cast(atof(strValue)); - } - else - { - val = AZStd::string(strValue); - } - - // Platform cfg file (ex. pc_veryhigh.cfg) - if (strGroup[0] == '\0') - { - // New cvar loaded into map - if (m_cVarTracker.find(key) == m_cVarTracker.end()) - { - m_cVarTracker[key].type = type; - m_cVarTracker[key].cvarGroup = "miscellaneous"; - AZStd::any empty; - if (type == CVAR_INT) - { - empty = 0; - } - else if (type == CVAR_FLOAT) - { - empty = 0.0f; - } - else - { - empty = AZStd::string(""); - } - m_cVarTracker[key].fileVals.resize(m_numSpecLevels, CVarFileStatus(empty, empty, empty)); - } - - m_cVarTracker[key].fileVals[m_currentSpecIndex].editedValue = val; - m_cVarTracker[key].fileVals[m_currentSpecIndex].overwrittenValue = val; - } - // default group in sys_spec cfg file - else if (azstricmp(strGroup, "default") == 0) - { - CVarFileStatus defaultVal(val, val, val); - if (m_cVarTracker.find(key) == m_cVarTracker.end()) - { - // New cvar loaded into map - CVarInfo& currentCVar = m_cVarTracker[key]; - currentCVar.type = cvar->GetType(); - currentCVar.fileVals.resize(m_numSpecLevels, defaultVal); - } - else - { - // Reset values, if there's a platform override it always follows the sys_spec_*.cfg files. - // Resetting avoids the issue where some spec levels are never set because of an extra platform - // override load happening earlier just to store the value of sys_spec_full. - for (int specLevel = 0; specLevel < m_numSpecLevels; ++specLevel) - { - m_cVarTracker[key].fileVals[specLevel] = defaultVal; - } - } - // Overwrite miscellaneous if mentioned in platform config file - m_cVarTracker[key].cvarGroup = m_currentConfigFilename; - } - // specific index in sys_spec cfg file - else - { - int group = 0; - - if (azsscanf(strGroup, "%d", &group) == 1) - { - auto sysSpecFull = m_cVarTracker.find("sys_spec_full"); - if (sysSpecFull != m_cVarTracker.end()) - { - CVarFileStatus indexAssignment(val, val, val); - for (int specLevel = 0; specLevel < m_numSpecLevels; ++specLevel) - { - // Only apply cvar change to configurations with sys_spec_Full matching the index - int overwrittenValue = 0; - if (AZStd::any_numeric_cast(&sysSpecFull->second.fileVals[specLevel].overwrittenValue, overwrittenValue) && group == overwrittenValue) - { - m_cVarTracker[key].fileVals[specLevel] = indexAssignment; - } - } - } - } - } - } - } -} - -// Loads UI column for specific cfg file (ex. pc_low.cfg) -void GraphicsSettingsDialog::BuildColumn(int specLevel) -{ - if (specLevel < 0 || specLevel >= m_numSpecLevels) - { - return; - } - - for (auto& it : m_cvarGroupData) - { - it.second.m_currentRow = 0; - } - - for (auto& it : m_cVarTracker) - { - QString str = it.first.c_str(); - QWidget* input = nullptr; - if (it.second.type == CVAR_INT) - { - AzQtComponents::SpinBox* intval = new AzQtComponents::SpinBox(nullptr); - intval->setFocusPolicy(Qt::StrongFocus); - intval->setMaximum(INT32_MAX); - intval->setMinimum(INT32_MIN); - int editedValue; - if (AZStd::any_numeric_cast(&it.second.fileVals[specLevel].editedValue, editedValue)) - { - intval->setValue(editedValue); - } - m_cvarGroupData[it.second.cvarGroup].m_cvarSpinBoxes.push_back(intval); - connect(intval, SIGNAL(valueChanged(int)), this, SLOT(CVarChanged(int))); - input = intval; - } - else if (it.second.type == CVAR_FLOAT) - { - AzQtComponents::DoubleSpinBox* doubleval = new AzQtComponents::DoubleSpinBox(nullptr); - doubleval->setFocusPolicy(Qt::StrongFocus); - doubleval->setMaximum(FLT_MAX); - doubleval->setMinimum(-FLT_MAX); - float editedValue; - if (AZStd::any_numeric_cast(&it.second.fileVals[specLevel].editedValue, editedValue)) - { - doubleval->setValue(editedValue); - } - m_cvarGroupData[it.second.cvarGroup].m_cvarDoubleSpinBoxes.push_back(doubleval); - connect(doubleval, SIGNAL(valueChanged(double)), this, SLOT(CVarChanged(double))); - input = doubleval; - } - else - { - QLineEdit* stringval = new QLineEdit(nullptr); - AZStd::string* editedValue = AZStd::any_cast(&it.second.fileVals[specLevel].editedValue); - stringval->setText(editedValue->c_str()); - m_cvarGroupData[it.second.cvarGroup].m_cvarLineEdits.push_back(stringval); - connect(stringval, SIGNAL(textChanged(const QString&)), this, SLOT(CVarChanged(const QString&))); - input = stringval; - } - - if (input) - { - input->setObjectName(str); - input->setProperty("specLevel", specLevel); - QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); - sizePolicy.setHeightForWidth(input->sizePolicy().hasHeightForWidth()); - input->setSizePolicy(sizePolicy); - input->setMinimumSize(QSize(INPUT_MIN_WIDTH, INPUT_MIN_HEIGHT)); - QStandardItem* parentItem = m_cvarGroupData[it.second.cvarGroup].m_treeRowItem; - QModelIndex parentIndex = parentItem->index(); - QModelIndex thisIndex = m_graphicsSettingsModel->index(m_cvarGroupData[it.second.cvarGroup].m_currentRow++, specLevel + CVAR_VALUE_COLUMN_OFFSET, parentIndex); - m_ui->m_graphicsSettingsTreeView->setIndexWidget(thisIndex, input); - m_parameterWidgets.push_back(new ParameterWidget(input, it.first.c_str())); - m_cvarGroupData[it.second.cvarGroup].m_widgetInsertOrder.push_back(input); - } - } -} - -void GraphicsSettingsDialog::LoadPlatformConfigurations() -{ - const int numColumns = m_cfgFiles[m_currentPlatform].size() + 1; - SetSettingsTree(numColumns); - - for (ParameterWidget* widget : m_parameterWidgets) - { - delete widget; - } - m_parameterWidgets.clear(); - - m_ui->m_applyButton->setEnabled(false); - m_dirtyCVarCount = 0; - - // Load platform cfg files to load in sys_spec_Full - for (size_t cfgFileIndex = 0; cfgFileIndex < m_cfgFiles[m_currentPlatform].size(); ++cfgFileIndex) - { - m_currentSpecIndex = cfgFileIndex; - m_currentConfigFilename = m_cfgFiles[m_currentPlatform][cfgFileIndex]; - GetISystem()->LoadConfiguration(m_currentConfigFilename.c_str(), this, true); - } - - if (m_cVarTracker.find("sys_spec_full") == m_cVarTracker.end()) - { - m_cVarTracker.clear(); - CleanUI(); - ShowCategories(false); - QMessageBox::warning(this, "Warning", "Invalid custom spec file (missing sys_spec_full).", - QMessageBox::Ok); - return; - } - - // Load sys_spec cfgs based on sys_spec_Full values - LoadCVarGroupDirectory(m_cvarGroupsFolder); - - setUpdatesEnabled(false); - - // Reload platform cfg files to override sys_spec index assignments and load rows with filenames of given platform - for (size_t cfgFileIndex = 0; cfgFileIndex < m_cfgFiles[m_currentPlatform].size(); ++cfgFileIndex) - { - m_currentSpecIndex = cfgFileIndex; - m_currentConfigFilename = m_cfgFiles[m_currentPlatform][cfgFileIndex]; - GetISystem()->LoadConfiguration(m_currentConfigFilename.c_str(), this, true); - - /*CVarGroupInfo& specFileGroup =*/ m_cvarGroupData["SpecFile"]; - m_graphicsSettingsModel->setHeaderData(cfgFileIndex + CVAR_VALUE_COLUMN_OFFSET, Qt::Horizontal, QApplication::translate("GraphicsSettingsDialog", m_cfgFiles[m_currentPlatform][cfgFileIndex].c_str())); - } - - // Loads column of cvar names - for (auto& it : m_cVarTracker) - { - QLabel* cVarLabel = new QLabel(nullptr); - QString str = it.first.c_str(); - QString strLabel = str + "Label"; - cVarLabel->setObjectName(strLabel); - QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); - sizePolicy.setHeightForWidth(cVarLabel->sizePolicy().hasHeightForWidth()); - cVarLabel->setSizePolicy(sizePolicy); - cVarLabel->setMinimumSize(QSize(INPUT_MIN_WIDTH, INPUT_MIN_HEIGHT)); - cVarLabel->setAlignment(Qt::AlignLeading | Qt::AlignLeft | Qt::AlignVCenter); - QStandardItem* cVarItem = new QStandardItem(); - cVarItem->setData(QApplication::translate("GraphicsSettingsDialog", it.first.c_str(), 0), Qt::DisplayRole); - QList items{ cVarItem }; - for (int i = 1; i < numColumns; ++i) - { - items << new QStandardItem(); - } - m_cvarGroupData[it.second.cvarGroup].m_treeRowItem->appendRow(items); - cVarLabel->setText(QApplication::translate("GraphicsSettingsDialog", it.first.c_str(), 0)); - m_cvarGroupData[it.second.cvarGroup].m_cvarLabels.push_back(cVarLabel); - - if (ICVar* cvar = gEnv->pConsole->GetCVar(it.first.c_str())) - { - cVarLabel->setToolTip(cvar->GetHelp()); - } - } - - // Loads columns of cvar values for each platform cfg file - for (int cfgFileIndex = 0; cfgFileIndex < m_cfgFiles[m_currentPlatform].size(); ++cfgFileIndex) - { - BuildColumn(cfgFileIndex); - } - - // Remove any section that has no visible controls - for (auto& it : m_cvarGroupData) - { - int totalControlCount = 0; - CVarGroupInfo& currentCvarGroupInfo = it.second; - totalControlCount += currentCvarGroupInfo.m_cvarDoubleSpinBoxes.size(); - totalControlCount += currentCvarGroupInfo.m_cvarSpinBoxes.size(); - totalControlCount += currentCvarGroupInfo.m_cvarLineEdits.size(); - totalControlCount += currentCvarGroupInfo.m_platformLabels.size(); - - if (totalControlCount == 0) - { - if (currentCvarGroupInfo.m_treeRowItem) - { - int i = 0; - for (auto& collapseIterator : m_uiCollapseGroup) - { - if (collapseIterator->m_groupRow == currentCvarGroupInfo.m_treeRowItem) - { - m_uiCollapseGroup.remove(i); - break; - } - ++i; - } - m_graphicsSettingsModel->removeRow(currentCvarGroupInfo.m_treeRowItem->row()); - } - } - } - - setUpdatesEnabled(true); - - QSettings settings("O3DE", "O3DE"); - settings.beginGroup("GraphicsSettingsDialog"); - settings.beginGroup("cvarGroup"); - - for (auto& collapseIterator : m_uiCollapseGroup) - { - bool groupCollapsed = settings.value(collapseIterator->m_groupName, collapseIterator->m_isCollapsed).toBool(); - if (collapseIterator->m_isCollapsed != groupCollapsed) - { - collapseIterator->ToggleCollapsed(); - } - } - - settings.endGroup(); - settings.endGroup(); -} - -void GraphicsSettingsDialog::LoadCVarGroupDirectory(const AZStd::string& path) -{ - AZ::IO::LocalFileIO::FindFilesCallbackType fileFinderCb; - fileFinderCb = [&](const char* fullPath) -> bool - { - if (gEnv->pFileIO->IsDirectory(fullPath)) - { - // recurse into subdirectory - gEnv->pFileIO->FindFiles(fullPath, "*.cfg", fileFinderCb); - } - else - { - m_currentConfigFilename = fullPath; - GetISystem()->LoadConfiguration(fullPath, this, false); - } - - return true; // keep searching - }; - - gEnv->pFileIO->FindFiles(path.c_str(), "*.cfg", fileFinderCb); -} - -//Build UI, link signals and set the data for device list. -void GraphicsSettingsDialog::BuildUI() -{ - connect(m_ui->m_cancelButton, &QPushButton::clicked, this, &GraphicsSettingsDialog::reject); - connect(m_ui->m_applyButton, &QPushButton::clicked, this, &GraphicsSettingsDialog::accept); - connect(m_ui->m_platformEntry, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(PlatformChanged(const QString&))); - connect(m_ui->m_selectCustomSpecButton, &QPushButton::clicked, this, &GraphicsSettingsDialog::OpenCustomSpecDialog); - - if (!m_cfgFiles[m_currentPlatform].empty()) - { - LoadPlatformConfigurations(); - } - else - { - m_cVarTracker.clear(); - CleanUI(); - ShowCategories(false); - } -} - -void GraphicsSettingsDialog::CleanUI() -{ - setUpdatesEnabled(false); - - QSettings settings("O3DE", "O3DE"); - settings.beginGroup("GraphicsSettingsDialog"); - settings.beginGroup("cvarGroup"); - - for (auto& collapseIterator : m_uiCollapseGroup) - { - settings.setValue(collapseIterator->m_groupName, collapseIterator->m_isCollapsed); - } - - settings.endGroup(); - settings.endGroup(); - settings.sync(); - - m_cVarTracker.clear(); - - // Uncollapse groups - for (auto& collapseIt : m_uiCollapseGroup) - { - if (collapseIt->m_isCollapsed) - { - collapseIt->ToggleCollapsed(); - } - } - - setUpdatesEnabled(true); -} - -void GraphicsSettingsDialog::ShowCategories(bool show) -{ - if (m_showCategories == show) - { - return; - } - - m_showCategories = show; - m_ui->m_graphicsSettingsTreeView->setVisible(show); -} - -void GraphicsSettingsDialog::ShowCustomSpecOption(bool show) -{ - if (m_showCustomSpec == show) - { - return; - } - - m_showCustomSpec = show; - m_ui->m_selectCustomSpecButton->setVisible(m_showCustomSpec); - m_ui->m_lineSpacer->setVisible(m_showCustomSpec); -} - -void GraphicsSettingsDialog::PlatformChanged(const QString& platform) -{ - bool change = true; - if (m_dirtyCVarCount > 0 && !SendUnsavedChangesWarning(false)) - { - change = false; - } - - if (change) - { - AZStd::string azPlatform = platform.toStdString().c_str(); - - m_currentPlatform = GetConfigPlatformFromName(azPlatform); - if (m_currentPlatform == CONFIG_INVALID_PLATFORM) // "Custom" selected - { - ShowCustomSpecOption(true); - CleanUI(); - if (m_cfgFiles[CONFIG_INVALID_PLATFORM].empty()) // if we don't have a custom spec - { - ShowCategories(false); - m_ui->m_applyButton->setEnabled(false); - m_dirtyCVarCount = 0; - } - else - { - ShowCategories(true); - LoadPlatformConfigurations(); - } - } - else - { - ShowCustomSpecOption(false); - ShowCategories(true); - CleanUI(); - LoadPlatformConfigurations(); - } - } - else - { - m_ui->m_platformEntry->blockSignals(true); - SetPlatformEntry(m_currentPlatform); - m_ui->m_platformEntry->blockSignals(false); - } -} - -bool GraphicsSettingsDialog::SendUnsavedChangesWarning(bool cancel) -{ - int result = QMessageBox::Yes; - - if (cancel) - { - result = QMessageBox::question(this, "Warning", "There are currently unsaved changed. Are you sure you want to cancel?", - QMessageBox::Yes, QMessageBox::No); - } - else - { - result = QMessageBox::question(this, "Warning", "There are currently unsaved changed. Are you sure you want to change configurations?", - QMessageBox::Yes, QMessageBox::No); - } - - return (result == QMessageBox::Yes); -} - -bool GraphicsSettingsDialog::CVarChanged(AZStd::any val, const char* cvarName, int specLevel) -{ - // Checking if the edited value (before change) is equal to the overwritten value - bool dirtyBefore = false; - AZStd::string azcvarName = cvarName; - AZStd::pair cvarInfo = AZStd::make_pair(azcvarName, m_cVarTracker[cvarName]); - if (CheckCVarStatesForDiff(&cvarInfo, specLevel, EDITED_OVERWRITTEN_COMPARE)) - { - dirtyBefore = true; - } - - if (azstricmp(cvarName, "sys_spec_full") == 0) - { - //Pop out the warning dialog for sys_spec_Full since all cvars will be changed - int result = QMessageBox::Ok; - - result = QMessageBox::question(this, "Warning", "Modifying sys_spec_full will override any unsaved changes.", - QMessageBox::Ok, QMessageBox::Cancel); - - // Cancel - Change sys_spec_full qspinbox value back - if (result == QMessageBox::Cancel) - { - return false; - } - else // OK - reload column - { - // Updating sys_spec_full for when adding cvargroup directory - m_cVarTracker[cvarName].fileVals[specLevel].editedValue = val; - gEnv->pSystem->AddCVarGroupDirectory(m_cvarGroupsFolder); - m_currentConfigFilename = m_cfgFiles[m_currentPlatform][specLevel]; - m_currentSpecIndex = specLevel; - GetISystem()->LoadConfiguration(m_currentConfigFilename.c_str(), this, true); - // Updating sys_spec_full since overwritten from loading platform cfg - m_cVarTracker[cvarName].fileVals[specLevel].editedValue = val; - BuildColumn(specLevel); - } - } - else - { - m_cVarTracker[cvarName].fileVals[specLevel].editedValue = val; - } - - // Checking if the newly edited value is equal to the overwritten value - cvarInfo = AZStd::make_pair(azcvarName, m_cVarTracker[cvarName]); - if (CheckCVarStatesForDiff(&cvarInfo, specLevel, EDITED_OVERWRITTEN_COMPARE)) - { - if (!dirtyBefore) - { - m_ui->m_applyButton->setEnabled(true); - m_dirtyCVarCount++; - } - } - else - { - if (dirtyBefore) - { - m_dirtyCVarCount--; - if (m_dirtyCVarCount == 0) - { - m_ui->m_applyButton->setEnabled(false); - } - } - } - - return true; -} - -void GraphicsSettingsDialog::CVarChanged(int i) -{ - AzQtComponents::SpinBox* box = static_cast(sender()); - QString str = box->objectName(); - QByteArray ba = str.toUtf8(); - const char* cvarName = ba.data(); - - int specLevel = box->property("specLevel").toInt(); - - AZStd::any val; - val = i; - - if (!CVarChanged(val, cvarName, specLevel)) - { - // sys_spec_full warning cancelled - box->blockSignals(true); - int editedValue; - if (AZStd::any_numeric_cast(&m_cVarTracker[cvarName].fileVals[specLevel].editedValue, editedValue)) - { - box->setValue(editedValue); - } - box->blockSignals(false); - } -} - -void GraphicsSettingsDialog::CVarChanged(double d) -{ - AzQtComponents::DoubleSpinBox* box = static_cast(sender()); - QString str = box->objectName(); - QByteArray ba = str.toUtf8(); - const char* cvarName = ba.data(); - - AZStd::any val; - val = d; - - int specLevel = box->property("specLevel").toInt(); - - if (!CVarChanged(val, cvarName, specLevel)) - { - // only can return false from sys_spec_full, which is an int cvar - } -} - -void GraphicsSettingsDialog::CVarChanged(const QString& s) -{ - QLineEdit* box = qobject_cast(sender()); - QString str = box->objectName(); - QByteArray ba = str.toUtf8(); - const char* cvarName = ba.data(); - - AZStd::any val; - val = AZStd::string(s.toStdString().c_str()); - - int specLevel = box->property("specLevel").toInt(); - - if (!CVarChanged(val, cvarName, specLevel)) - { - // only can return false from sys_spec_full, which is an int cvar - } -} - -// Returns true if there is a difference between the two cvar states -bool GraphicsSettingsDialog::CheckCVarStatesForDiff(AZStd::pair* it, int cfgFileIndex, CVarStateComparison cmp) -{ - if (it->second.type == CVAR_INT) - { - int editedVal, overwrittenVal, originalVal; - if (AZStd::any_numeric_cast(&it->second.fileVals[cfgFileIndex].editedValue, editedVal) && - AZStd::any_numeric_cast(&it->second.fileVals[cfgFileIndex].overwrittenValue, overwrittenVal) && - AZStd::any_numeric_cast(&it->second.fileVals[cfgFileIndex].originalValue, originalVal)) - { - if ((cmp == EDITED_OVERWRITTEN_COMPARE && editedVal != overwrittenVal) || - (cmp == EDITED_ORIGINAL_COMPARE && editedVal != originalVal) || - (cmp == OVERWRITTEN_ORIGINAL_COMPARE && overwrittenVal != originalVal)) - { - return true; - } - } - } - else if (it->second.type == CVAR_FLOAT) - { - float editedVal, overwrittenVal, originalVal; - if (AZStd::any_numeric_cast(&it->second.fileVals[cfgFileIndex].editedValue, editedVal) && - AZStd::any_numeric_cast(&it->second.fileVals[cfgFileIndex].overwrittenValue, overwrittenVal) && - AZStd::any_numeric_cast(&it->second.fileVals[cfgFileIndex].originalValue, originalVal)) - { - if ((cmp == EDITED_OVERWRITTEN_COMPARE && editedVal != overwrittenVal) || - (cmp == EDITED_ORIGINAL_COMPARE && editedVal != originalVal) || - (cmp == OVERWRITTEN_ORIGINAL_COMPARE && overwrittenVal != originalVal)) - { - return true; - } - } - } - else - { - AZStd::string editedVal = *AZStd::any_cast(&it->second.fileVals[cfgFileIndex].editedValue); - AZStd::string overwrittenVal = *AZStd::any_cast(&it->second.fileVals[cfgFileIndex].overwrittenValue); - AZStd::string originalVal = *AZStd::any_cast(&it->second.fileVals[cfgFileIndex].originalValue); - if ((cmp == EDITED_OVERWRITTEN_COMPARE && editedVal.compare(overwrittenVal) != 0) || - (cmp == EDITED_ORIGINAL_COMPARE && editedVal.compare(originalVal) != 0) || - (cmp == OVERWRITTEN_ORIGINAL_COMPARE && overwrittenVal.compare(originalVal) != 0)) - { - return true; - } - } - return false; -} - -/////////////////////////////////////////////////////////////////////// -// settings file management -void GraphicsSettingsDialog::reject() -{ - if (m_dirtyCVarCount > 0) - { - if (SendUnsavedChangesWarning(true)) - { - QDialog::reject(); - } - } - else - { - QDialog::reject(); - } -} - -void GraphicsSettingsDialog::accept() -{ - int result = QMessageBox::Yes; - - //Pop out the warning dialog for customized setting - result = QMessageBox::question(this, "Warning", "A non-tested setting could potentially crash the game if the setting does not match the device. Are you sure you want to apply the customized setting?", - QMessageBox::Yes, QMessageBox::No); - - //Save and exit - if (result == QMessageBox::Yes) - { - SaveSystemSettings(); - } -} - -void GraphicsSettingsDialog::OpenCustomSpecDialog() -{ - AZ::IO::FixedMaxPath projectPath = AZ::Utils::GetProjectPath(); - projectPath /= SETTINGS_FILE_PATH.toUtf8().constData(); - QString settingsPath = QString::fromUtf8(projectPath.c_str(), aznumeric_cast(projectPath.Native().size())); - - CAutoDirectoryRestoreFileDialog importCustomSpecDialog(QFileDialog::AcceptOpen, QFileDialog::ExistingFile, ".cfg", settingsPath, CFG_FILEFILTER, {}, {}, this); - - if (importCustomSpecDialog.exec()) - { - QString file = importCustomSpecDialog.selectedFiles().first(); - if (!file.isEmpty()) - { - ApplyCustomSpec(file); - } - } -} - -void GraphicsSettingsDialog::ApplyCustomSpec(const QString& customFilePath) -{ - if (customFilePath.isEmpty()) - { - return; - } - - QFile customFile(customFilePath); - if (!customFile.exists()) - { - QMessageBox::warning(this, "Warning", "Could not find custom spec file.", - QMessageBox::Ok); - return; - } - - bool change = true; - if (m_dirtyCVarCount > 0 && !SendUnsavedChangesWarning(false)) - { - change = false; - } - - if (change) - { - AZStd::string filename = customFilePath.toStdString().c_str(); - filename = filename.substr(filename.find_last_of('/') + 1); - - m_currentPlatform = CONFIG_INVALID_PLATFORM; - - bool alreadyLoaded = IsCustomSpecAlreadyLoaded(filename); - if (m_cfgFiles[CONFIG_INVALID_PLATFORM].size() < m_numSpecLevels && !alreadyLoaded) - { - m_cfgFiles[CONFIG_INVALID_PLATFORM].push_back(filename); - } - else if (alreadyLoaded) - { - QMessageBox::warning(this, "Warning", "The selected custom spec file is already loaded. No changes have been made.", - QMessageBox::Ok); - return; - } - - if (m_cfgFiles[CONFIG_INVALID_PLATFORM].size() == m_numSpecLevels) - { - m_ui->m_selectCustomSpecButton->setEnabled(false); - } - - ShowCategories(true); - - CleanUI(); - - LoadPlatformConfigurations(); - } -} - -void GraphicsSettingsDialog::UnloadCustomSpec(int specLevel) -{ - if (specLevel < 0 || specLevel >= m_cfgFiles[CONFIG_INVALID_PLATFORM].size()) - { - return; - } - - bool shouldUnload = m_dirtyCVarCount <= 0 || SendUnsavedChangesWarning(false); - - if (shouldUnload) - { - m_cfgFiles[CONFIG_INVALID_PLATFORM].erase(m_cfgFiles[CONFIG_INVALID_PLATFORM].begin() + specLevel); - - CleanUI(); - - if (!m_cfgFiles[CONFIG_INVALID_PLATFORM].empty()) - { - LoadPlatformConfigurations(); - } - else - { - ShowCategories(false); - } - } -} - -bool GraphicsSettingsDialog::IsCustomSpecAlreadyLoaded(const AZStd::string& filename) const -{ - auto& customConfigFilenames = m_cfgFiles.at(CONFIG_INVALID_PLATFORM); - const auto& findResult = AZStd::find(customConfigFilenames.begin(), customConfigFilenames.end(), filename.c_str()); - - return findResult != customConfigFilenames.end(); -} - -void GraphicsSettingsDialog::SetCollapsedLayout(const QString& groupName, QStandardItem* groupRow) -{ - CollapseGroup* cgroup = new CollapseGroup(m_ui->m_graphicsSettingsTreeView); - cgroup->m_groupName = groupName; - cgroup->m_groupRow = groupRow; - m_uiCollapseGroup.push_back(cgroup); -} - -void GraphicsSettingsDialog::SetPlatformEntry(ESystemConfigPlatform platform) -{ - auto platformCheck = [&platform](AZStd::pair& stringConfigPair) { return stringConfigPair.second == platform; }; - auto platformStringsIterator = AZStd::find_if(m_platformStrings.begin(), m_platformStrings.end(), platformCheck); - if (platformStringsIterator != m_platformStrings.end()) - { - int platformIndex = m_ui->m_platformEntry->findText(platformStringsIterator->first.c_str()); - m_ui->m_platformEntry->setCurrentIndex(platformIndex); - } - else - { - AZ_Assert(false, "Platform not found in platform strings vector."); - } -} - -ESystemConfigPlatform GraphicsSettingsDialog::GetConfigPlatformFromName(const AZStd::string& platformName) -{ - ESystemConfigPlatform configPlatform = CONFIG_INVALID_PLATFORM; - - auto platformNameCheck = [&platformName](AZStd::pair& stringConfigPair) { return (stringConfigPair.first == platformName); }; - auto configPlatformIterator = AZStd::find_if(m_platformStrings.begin(), m_platformStrings.end(), platformNameCheck); - if (configPlatformIterator != m_platformStrings.end()) - { - configPlatform = configPlatformIterator->second; - } - else - { - AZ_Assert(false, "Platform name not found in platform strings vector."); - } - - return configPlatform; -} - -// Save the current UI options to system qsettings -void GraphicsSettingsDialog::SaveSystemSettings() -{ - AZStd::vector successFiles; - AZStd::vector nochangeFiles; - - for (int cfgFileIndex = 0; cfgFileIndex < m_cfgFiles[m_currentPlatform].size(); ++cfgFileIndex) - { - const QString eq = " = "; - const QString cvarGroupString1 = "\n------------------------\n-- "; - const QString cvarGroupString2 = "\n------------------------\n"; - QString commandList = ""; - - int sysSpecFull; - if (AZStd::any_numeric_cast(&m_cVarTracker["sys_spec_full"].fileVals[cfgFileIndex].editedValue, sysSpecFull)) - { - commandList += "sys_spec_full" + eq + QString::number(sysSpecFull) + '\n'; - } - - QMap cvarGroupStrings; - - // Set to true as soon as cvar is found which is unique from current cfg file and index assignment - bool saveOut = false; - - // Adding any dirty cvars not equal to sys_spec_full or any cvar in miscellaneous to command list - for (auto& it : m_cVarTracker) - { - if ((CheckCVarStatesForDiff(&it, cfgFileIndex, EDITED_ORIGINAL_COMPARE) || it.second.cvarGroup == "miscellaneous") && azstricmp(it.first.c_str(), "sys_spec_full")) - { - AZStd::string cvarGroup = it.second.cvarGroup; - if (azstricmp(cvarGroup.c_str(), "miscellaneous") != 0) - { - int fileIndex = cvarGroup.find_last_of('/') + 1; - cvarGroup = cvarGroup.substr(fileIndex, cvarGroup.size() - fileIndex - 4); - } - QString qcvarGroup = cvarGroup.c_str(); - if (cvarGroupStrings.find(qcvarGroup) == cvarGroupStrings.end()) - { - cvarGroupStrings[qcvarGroup] = cvarGroupString1 + qcvarGroup + cvarGroupString2; - } - - if (it.second.type == CVAR_INT) - { - int val; - if (AZStd::any_numeric_cast(&it.second.fileVals[cfgFileIndex].editedValue, val)) - { - cvarGroupStrings[qcvarGroup] += it.first.c_str() + eq + QString::number(val) + '\n'; - } - } - else if (it.second.type == CVAR_FLOAT) - { - float val; - if (AZStd::any_numeric_cast(&it.second.fileVals[cfgFileIndex].editedValue, val)) - { - cvarGroupStrings[qcvarGroup] += it.first.c_str() + eq + QString::number(val) + '\n'; - } - } - else - { - cvarGroupStrings[qcvarGroup] += it.first.c_str() + eq + AZStd::any_cast(it.second.fileVals[cfgFileIndex].editedValue).c_str() + '\n'; - } - } - - if (!saveOut) - { - saveOut = CheckCVarStatesForDiff(&it, cfgFileIndex, EDITED_OVERWRITTEN_COMPARE); - } - } - - // Adding the project name to the path so that the file is created there if it doesn't already exist - // as we don't want to modify the version in Engine/config. - AZ::IO::FixedMaxPath projectPath = AZ::Utils::GetProjectPath(); - projectPath /= SETTINGS_FILE_PATH.toUtf8().constData(); - QString settingsPath = QString::fromUtf8(projectPath.c_str(), aznumeric_cast(projectPath.Native().size())); - - QString settingsFile = settingsPath + m_cfgFiles[m_currentPlatform][cfgFileIndex].c_str(); - - // Check if current settings differ from existing cfg - if (saveOut) - { - // Adding any dirty cvars not equal to sys_spec_full to command list - for (auto& it : cvarGroupStrings) - { - commandList += it; - } - - if (CFileUtil::OverwriteFile(settingsFile.toStdString().c_str())) - { - if (!CFileUtil::CreateDirectory(settingsPath.toStdString().c_str())) - { - QMessageBox::warning(this, "Warning", "Could not create the directory for file \"" + settingsFile + "\". Failed to apply Graphics Setting.", - QMessageBox::Ok); - continue; - } - - QByteArray dataArray = commandList.toUtf8().data(); - - QFile file(settingsFile); - if (!file.open(QIODevice::WriteOnly) || file.write(dataArray) != dataArray.size()) - { - QMessageBox::warning(this, "Warning", "Could not write settings to file \"" + settingsFile + ". Failed to apply Graphics Setting.", - QMessageBox::Ok); - file.close(); - continue; - } - - successFiles.push_back(settingsFile); - - // Update platform cvars to reflect new values - for (auto& it : m_cVarTracker) - { - it.second.fileVals[cfgFileIndex].overwrittenValue = it.second.fileVals[cfgFileIndex].editedValue; - } - - file.close(); - } - else - { - QMessageBox::warning(this, "Warning", "Could not check out or make file writable: \"" + settingsFile + "\". Failed to apply Graphics Setting.", - QMessageBox::Ok); - } - } - else - { - nochangeFiles.push_back(settingsFile); - } - } - - // Print list of files which had no changes made - if (nochangeFiles.size() > 0) - { - QString message = "No changes have been made to the following files:\n"; - for (int i = 0; i < nochangeFiles.size(); ++i) - { - message += nochangeFiles[i] + "\n"; - } - QMessageBox::information(this, "Log", message, QMessageBox::Ok); - } - - // Print list of files which were successfully saved - if (successFiles.size() > 0) - { - QString message = "Updated the graphics setting correctly for the following files:\n"; - for (int i = 0; i < successFiles.size(); ++i) - { - message += successFiles[i] + "\n"; - } - QMessageBox::information(this, "Log", message, QMessageBox::Ok); - } - - // if we saved all of the files that we needed to then disable the save button again - if (nochangeFiles.size() + successFiles.size() == m_cfgFiles[m_currentPlatform].size()) - { - m_dirtyCVarCount = 0; - m_ui->m_applyButton->setEnabled(false); - } -} - -void GraphicsSettingsDialog::SetCollapsed(const QModelIndex& index, bool flags) -{ - QStandardItem* item = m_graphicsSettingsModel->itemFromIndex(index); - - for (auto& collapseIterator : m_uiCollapseGroup) - { - if (collapseIterator->m_groupRow == item) - { - collapseIterator->m_isCollapsed = flags; - break; - } - } -} - -///////////////////////////////////////////////////////////////////////// -// Collapse Group -GraphicsSettingsDialog::CollapseGroup::CollapseGroup(QTreeView* treeView) - : m_treeView(treeView) - , m_isCollapsed(true) -{ -} - -void GraphicsSettingsDialog::CollapseGroup::ToggleCollapsed() -{ - m_isCollapsed = !m_isCollapsed; - const QModelIndex index = m_groupRow->index(); - if (m_isCollapsed) - { - m_treeView->collapse(index); - } - else - { - m_treeView->expand(index); - } -} - -/////////////////////////////////////////////////////////////////// -// ParameterWidget -GraphicsSettingsDialog::ParameterWidget::ParameterWidget(QWidget* widget, QString parameterName) - : m_widget(widget) - , m_parameterName(parameterName) -{ - m_widget->setToolTip(GetToolTip()); -} - -QString GraphicsSettingsDialog::ParameterWidget::GetToolTip() const -{ - if (!m_parameterName.isEmpty()) - { - QString tooltipText = QString(PARAMETER_TOOLTIP).arg(m_parameterName); - return tooltipText; - } - return ""; -} - -GraphicsSettingsTreeView::GraphicsSettingsTreeView(QWidget* parent) - : QTreeView(parent) -{ -} - -GraphicsSettingsHeaderView::GraphicsSettingsHeaderView(GraphicsSettingsDialog* dialog, Qt::Orientation orientation, QWidget* parent) - : QHeaderView(orientation, parent) - , m_dialog(dialog) -{ - setDefaultAlignment(Qt::AlignLeft); -} - -bool GraphicsSettingsHeaderView::event(QEvent* e) -{ - if (m_dialog->IsCustom()) - { - GraphicsSettingsTreeView* treeView = qobject_cast(parent()); - if (treeView) - { - switch (e->type()) - { - case QEvent::Enter: - m_index = logicalIndexAt(static_cast(e)->pos()); - if (m_index > 0) - { - treeView->setSortingEnabled(true); - treeView->sortByColumn(m_index, Qt::AscendingOrder); - } - break; - case QEvent::Leave: - treeView->setSortingEnabled(false); - break; - } - } - } - return QHeaderView::event(e); -} - -void GraphicsSettingsHeaderView::mouseReleaseEvent(QMouseEvent* e) -{ - AZ_UNUSED(e); - if (QMessageBox::question( - this, QObject::tr("Unload Resource"), - QObject::tr("Are you sure you want to unload the resource?"), - QMessageBox::Yes | QMessageBox::Cancel) == QMessageBox::Yes) - { - m_dialog->UnloadCustomSpec(m_index - 1); - } - -} - -void GraphicsSettingsHeaderView::mouseMoveEvent(QMouseEvent* e) -{ - AZ_UNUSED(e); - if (m_dialog->IsCustom()) - { - GraphicsSettingsTreeView* treeView = qobject_cast(parent()); - int index = logicalIndexAt(e->pos()); - if (index != m_index) - { - m_index = index; - if (m_index > 0) - { - treeView->setSortingEnabled(true); - treeView->sortByColumn(m_index, Qt::AscendingOrder); - } - else - { - treeView->setSortingEnabled(false); - } - } - } -} - -GraphicsSettingsModel::GraphicsSettingsModel(QObject* parent) - : QStandardItemModel(parent) -{ -} - -Qt::ItemFlags GraphicsSettingsModel::flags(const QModelIndex& index) const -{ - Qt::ItemFlags flags = Qt::NoItemFlags; - - if (index.column() == 0) - { - flags |= Qt::ItemIsSelectable | Qt::ItemIsEnabled; - } - return flags; -} - -#include diff --git a/Code/Editor/GraphicsSettingsDialog.h b/Code/Editor/GraphicsSettingsDialog.h deleted file mode 100644 index 66a498cd10..0000000000 --- a/Code/Editor/GraphicsSettingsDialog.h +++ /dev/null @@ -1,284 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#if !defined(Q_MOC_RUN) -#include -#include -#include -#include - -#include -#include -#include - -#include -#endif - -class QGridLayout; -class QLabel; - -namespace Ui -{ - class GraphicsSettingsDialog; -} - -// Description: -// Status of cvar for a specifc platform and spec level -// editedValue - current setting within Graphics Settings Dialog box -// overwrittenValue - original setting from platform config file (set to originalValue if not found) -// originalValue - original settings from sys_spec config file index - -struct CVarFileStatus -{ - AZStd::any editedValue; - AZStd::any overwrittenValue; - AZStd::any originalValue; - CVarFileStatus(AZStd::any edit, AZStd::any over, AZStd::any orig) : editedValue(edit), overwrittenValue(over), originalValue(orig) {} -}; - -// Description: -// Status of specific cvar for Editor mapping -// type - CVAR_INT / CVAR_FLOAT / CVAR_STRING -// cvarGroup - source of cvar (sys_spec_particles, sys_spec_physics, etc.) or "miscellaneous" if only specified in platform config file -// fileVals = CVarFileStatus for each spec level of a specific platform - -struct CVarInfo -{ - int type; - AZStd::string cvarGroup; - AZStd::vector fileVals; -}; - -enum class GraphicsSettings -{ - GameEffects, - Light, - ObjectDetail, - Particles, - Physics, - PostProcessing, - Quality, - Shading, - Shadows, - Sound, - Texture, - TextureResolution, - VolumetricEffects, - Water, - Miscellaneous, - numSettings -}; - -class GraphicsSettingsHeaderView; - -class GraphicsSettingsTreeView - : public QTreeView -{ - Q_OBJECT - -public: - GraphicsSettingsTreeView(QWidget* parent = nullptr); - -}; - -class GraphicsSettingsModel - : public QStandardItemModel -{ - Q_OBJECT - -public: - explicit GraphicsSettingsModel(QObject* parent = 0); - - Qt::ItemFlags flags(const QModelIndex& index) const override; -}; - -class GraphicsSettingsDialog - : public QDialog, - public ILoadConfigurationEntrySink -{ - Q_OBJECT - -public: - - explicit GraphicsSettingsDialog(QWidget* parent = nullptr); - virtual ~GraphicsSettingsDialog(); - - bool IsCustom(void) { return m_showCustomSpec; } - void UnloadCustomSpec(int specLevel); - - // ILoadConfigurationEntrySink - void OnLoadConfigurationEntry(const char* szKey, const char* szValue, const char* szGroup) override; - -public slots: - //Accept and reject - void reject() override; - void accept() override; - -private slots: - //Update UIs - void PlatformChanged(const QString& platform); - bool CVarChanged(AZStd::any val, const char* cvarName, int specLevel); - void CVarChanged(int i); - void CVarChanged(double d); - void CVarChanged(const QString& s); - -private: - - // The struct ParameterWidget is used to store the parameter widget - // m_parameterName will be the name of the parameter the widget represent. - struct ParameterWidget - { - ParameterWidget(QWidget* widget, QString parameterName = ""); - - QString GetToolTip() const; - - const char* PARAMETER_TOOLTIP = "The variable will update render parameter \"%1\"."; - QWidget* m_widget; - QString m_parameterName; - }; - - struct CollapseGroup - { - QString m_groupName; - QStandardItem* m_groupRow; - QTreeView* m_treeView; - bool m_isCollapsed; - - CollapseGroup(QTreeView* treeView); - - void ToggleCollapsed(); - }; - - void OpenCustomSpecDialog(); - void ApplyCustomSpec(const QString& customFilePath); - bool IsCustomSpecAlreadyLoaded(const AZStd::string& filename) const; - void SetSettingsTree(int numColumns); - void SetCollapsed(const QModelIndex& index, bool flag); - - enum CVarStateComparison - { - EDITED_OVERWRITTEN_COMPARE = 1, - EDITED_ORIGINAL_COMPARE = 2, - OVERWRITTEN_ORIGINAL_COMPARE = 3, - - END_CVARSTATE_COMPARE, - }; - - bool CheckCVarStatesForDiff(AZStd::pair* it, int cfgFileIndex, CVarStateComparison cmp); - - // Save out settings into project-level cfg files - void SaveSystemSettings(); - - // Load in project-level cfg files for current platform - void LoadPlatformConfigurations(); - // Build UI column for spec level of current platform - void BuildColumn(int specLevel); - // Initial UI building - void BuildUI(); - // Cleaning out UI before loading new platform information - void CleanUI(); - // Shows/hides custom spec option - void ShowCustomSpecOption(bool show); - // Shows/hides category labels and dropdowns - void ShowCategories(bool show); - // Warns about unsaved changes (returns true if accepted) - bool SendUnsavedChangesWarning(bool cancel); - - void LoadCVarGroupDirectory(const AZStd::string& path); - - ///////////////////////////////////////////// - // UI help functions - - // Setup collapsed buttons - void SetCollapsedLayout(const QString& groupName, QStandardItem* groupItem); - // Sets the platform entry index for the given platform - void SetPlatformEntry(ESystemConfigPlatform platform); - // Gets the platform enum given the platform name - ESystemConfigPlatform GetConfigPlatformFromName(const AZStd::string& platformName); - - //////////////////////////////////////////// - // Members - - // Qt values - const int INPUT_MIN_WIDTH = 100; - const int INPUT_MIN_HEIGHT = 20; - const int INPUT_ROW_SPAN = 1; - const int INPUT_COLUMN_SPAN = 1; - const int CVAR_ROW_OFFSET = 2; - const int CVAR_VALUE_COLUMN_OFFSET = 1; - const int PLATFORM_LABEL_ROW = 1; - const int CVAR_LABEL_COLUMN = 1; - - // Tool tips - const QString SETTINGS_FILE_PATH = "Config/spec/"; - const char* CFG_FILEFILTER = "Cfg File(*.cfg);;All files(*)"; - - const int m_numSpecLevels = 4; - - bool m_showCustomSpec; - bool m_showCategories; - GraphicsSettingsModel* m_graphicsSettingsModel; - GraphicsSettingsHeaderView* m_headerView; - int m_numColumns{ 0 }; - - const char* m_cvarGroupsFolder = "Config/CVarGroups"; - - QScopedPointer m_ui; - - QVector m_uiCollapseGroup; - - QVector m_parameterWidgets; - - AZStd::string m_currentConfigFilename; - size_t m_currentSpecIndex; - - // cvar name --> pair(type, CVarStatus for each file) - AZStd::unordered_map m_cVarTracker; - - AZStd::unordered_map > m_cfgFiles; - - AZStd::vector > m_platformStrings; - - struct CVarGroupInfo - { - QVector m_platformLabels; - QVector m_cvarLabels; - QVector m_cvarSpinBoxes; - QVector m_cvarDoubleSpinBoxes; - QVector m_cvarLineEdits; - QVector m_specFileArea; - QVector m_widgetInsertOrder; - QStandardItem* m_treeRowItem; - int m_currentRow; - }; - - AZStd::unordered_map m_cvarGroupData; - AZStd::vector m_cvarGroupOrder; - - ESystemConfigPlatform m_currentPlatform; - - int m_dirtyCVarCount; -}; - -class GraphicsSettingsHeaderView - : public QHeaderView -{ - Q_OBJECT -public: - GraphicsSettingsHeaderView(GraphicsSettingsDialog* dialog, Qt::Orientation orientation, QWidget* parent = nullptr); - -private: - bool event(QEvent* e) override; - void mouseMoveEvent(QMouseEvent* e) override; - void mouseReleaseEvent(QMouseEvent* e) override; - - GraphicsSettingsDialog* m_dialog; - int m_index{ -1 }; -}; - - diff --git a/Code/Editor/LegacyViewportCameraController.cpp b/Code/Editor/LegacyViewportCameraController.cpp index 0750db8d97..f437196548 100644 --- a/Code/Editor/LegacyViewportCameraController.cpp +++ b/Code/Editor/LegacyViewportCameraController.cpp @@ -404,7 +404,7 @@ bool LegacyViewportCameraControllerInstance::HandleInputChannelEvent(const AzFra } else if (auto key = GetKeyboardKey(event.m_inputChannel); key != Qt::Key_unknown) { - if (state == InputChannel::State::Ended) + if (!event.m_inputChannel.IsActive()) { m_pressedKeys.erase(key); } diff --git a/Code/Editor/MainWindow.cpp b/Code/Editor/MainWindow.cpp index 261fab48d1..c7e32fb82a 100644 --- a/Code/Editor/MainWindow.cpp +++ b/Code/Editor/MainWindow.cpp @@ -41,6 +41,7 @@ AZ_POP_DISABLE_WARNING // AzToolsFramework #include +#include #include #include #include @@ -93,6 +94,8 @@ AZ_POP_DISABLE_WARNING #include "AssetEditor/AssetEditorWindow.h" #include "ActionManager.h" +#include + using namespace AZ; using namespace AzQtComponents; using namespace AzToolsFramework; @@ -489,6 +492,16 @@ void MainWindow::Initialize() ActionOverrideRequestBus::Event( GetEntityContextId(), &ActionOverrideRequests::SetupActionOverrideHandler, this); + if (auto imGuiManager = AZ::Interface::Get()) + { + auto handleImGuiStateChangeFn = [](bool enabled) + { + EditorWindowUIRequestBus::Broadcast(&EditorWindowUIRequests::SetEditorUiEnabled, enabled); + }; + m_handleImGuiStateChangeHandler = ImGui::IImGuiManager::ImGuiSetEnabledEvent::Handler(handleImGuiStateChangeFn); + imGuiManager->ConnectImGuiSetEnabledChangedHandler(m_handleImGuiStateChangeHandler); + } + AzToolsFramework::EditorEventsBus::Broadcast(&AzToolsFramework::EditorEvents::NotifyMainWindowInitialized, this); } @@ -674,49 +687,6 @@ void MainWindow::InitActions() am->AddAction(ID_FILE_PROJECT_MANAGER_SETTINGS, tr("Edit Project Settings...")); am->AddAction(ID_FILE_PROJECT_MANAGER_NEW, tr("New Project...")); am->AddAction(ID_FILE_PROJECT_MANAGER_OPEN, tr("Open Project...")); - am->AddAction(ID_GAME_PC_ENABLEVERYHIGHSPEC, tr("Very High")).SetCheckable(true) - .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateGameSpec); - am->AddAction(ID_GAME_PC_ENABLEHIGHSPEC, tr("High")).SetCheckable(true) - .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateGameSpec); - am->AddAction(ID_GAME_PC_ENABLEMEDIUMSPEC, tr("Medium")).SetCheckable(true) - .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateGameSpec); - am->AddAction(ID_GAME_PC_ENABLELOWSPEC, tr("Low")).SetCheckable(true) - .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateGameSpec); - am->AddAction(ID_GAME_OSXMETAL_ENABLEVERYHIGHSPEC, tr("Very High")).SetCheckable(true) - .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateGameSpec); - am->AddAction(ID_GAME_OSXMETAL_ENABLEHIGHSPEC, tr("High")).SetCheckable(true) - .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateGameSpec); - am->AddAction(ID_GAME_OSXMETAL_ENABLEMEDIUMSPEC, tr("Medium")).SetCheckable(true) - .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateGameSpec); - am->AddAction(ID_GAME_OSXMETAL_ENABLELOWSPEC, tr("Low")).SetCheckable(true) - .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateGameSpec); - am->AddAction(ID_GAME_ANDROID_ENABLEVERYHIGHSPEC, tr("Very High")).SetCheckable(true) - .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateGameSpec); - am->AddAction(ID_GAME_ANDROID_ENABLEHIGHSPEC, tr("High")).SetCheckable(true) - .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateGameSpec); - am->AddAction(ID_GAME_ANDROID_ENABLEMEDIUMSPEC, tr("Medium")).SetCheckable(true) - .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateGameSpec); - am->AddAction(ID_GAME_ANDROID_ENABLELOWSPEC, tr("Low")).SetCheckable(true) - .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateGameSpec); - am->AddAction(ID_GAME_IOS_ENABLEVERYHIGHSPEC, tr("Very High")).SetCheckable(true) - .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateGameSpec); - am->AddAction(ID_GAME_IOS_ENABLEHIGHSPEC, tr("High")).SetCheckable(true) - .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateGameSpec); - am->AddAction(ID_GAME_IOS_ENABLEMEDIUMSPEC, tr("Medium")).SetCheckable(true) - .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateGameSpec); - am->AddAction(ID_GAME_IOS_ENABLELOWSPEC, tr("Low")).SetCheckable(true) - .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateGameSpec); -#if defined(AZ_TOOLS_EXPAND_FOR_RESTRICTED_PLATFORMS) -#if defined(TOOLS_SUPPORT_JASPER) -#include AZ_RESTRICTED_FILE_EXPLICIT(MainWindow_cpp, jasper) -#endif -#if defined(TOOLS_SUPPORT_PROVO) -#include AZ_RESTRICTED_FILE_EXPLICIT(MainWindow_cpp, provo) -#endif -#if defined(TOOLS_SUPPORT_SALEM) -#include AZ_RESTRICTED_FILE_EXPLICIT(MainWindow_cpp, salem) -#endif -#endif am->AddAction(ID_TOOLS_CUSTOMIZEKEYBOARD, tr("Customize &Keyboard...")) .Connect(&QAction::triggered, this, &MainWindow::ShowKeyboardCustomization); am->AddAction(ID_TOOLS_EXPORT_SHORTCUTS, tr("&Export Keyboard Settings...")) @@ -724,7 +694,6 @@ void MainWindow::InitActions() am->AddAction(ID_TOOLS_IMPORT_SHORTCUTS, tr("&Import Keyboard Settings...")) .Connect(&QAction::triggered, this, &MainWindow::ImportKeyboardShortcuts); am->AddAction(ID_TOOLS_PREFERENCES, tr("Global Preferences...")); - am->AddAction(ID_GRAPHICS_SETTINGS, tr("&Graphics Settings...")); for (int i = ID_FILE_MRU_FIRST; i <= ID_FILE_MRU_LAST; ++i) { diff --git a/Code/Editor/MainWindow.h b/Code/Editor/MainWindow.h index 34b121537d..99af2ea326 100644 --- a/Code/Editor/MainWindow.h +++ b/Code/Editor/MainWindow.h @@ -249,6 +249,7 @@ private: QPointer m_toolbarCustomizationDialog; QScopedPointer m_sourceControlNotifHandler; + AZ::Event::Handler m_handleImGuiStateChangeHandler; AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING static MainWindow* m_instance; diff --git a/Code/Editor/Plugins/ComponentEntityEditorPlugin/CMakeLists.txt b/Code/Editor/Plugins/ComponentEntityEditorPlugin/CMakeLists.txt index 4744b4e174..5aab2a2056 100644 --- a/Code/Editor/Plugins/ComponentEntityEditorPlugin/CMakeLists.txt +++ b/Code/Editor/Plugins/ComponentEntityEditorPlugin/CMakeLists.txt @@ -27,6 +27,7 @@ ly_add_target( BUILD_DEPENDENCIES PRIVATE 3rdParty::Qt::Core + 3rdParty::Qt::Widgets AZ::AzCore AZ::AzToolsFramework Legacy::CryCommon diff --git a/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerDisplayOptionsMenu.cpp b/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerDisplayOptionsMenu.cpp index c1af8d76d7..a6c1ed6598 100644 --- a/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerDisplayOptionsMenu.cpp +++ b/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerDisplayOptionsMenu.cpp @@ -66,3 +66,5 @@ namespace EntityOutliner emit OnOptionToggled(DisplayOption::AutoExpand, checked); } } + +#include diff --git a/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerSortFilterProxyModel.cpp b/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerSortFilterProxyModel.cpp index 660ea137cf..89cd361fb6 100644 --- a/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerSortFilterProxyModel.cpp +++ b/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerSortFilterProxyModel.cpp @@ -32,7 +32,24 @@ bool OutlinerSortFilterProxyModel::filterAcceptsRow(int sourceRow, const QModelI bool OutlinerSortFilterProxyModel::lessThan(const QModelIndex& leftIndex, const QModelIndex& rightIndex) const { - return sourceModel()->data(leftIndex).toString() < sourceModel()->data(rightIndex).toString(); + if (leftIndex.isValid() && rightIndex.isValid()) + { + QVariant leftData = sourceModel()->data(leftIndex); + QVariant rightData = sourceModel()->data(rightIndex); + + // make sure to compare the correct data types for sorting the current column + AZ_Assert(leftData.type() == rightData.type(), "OutlinerSortFilterProxyModel::lessThan types do not agree!"); + if (static_cast(leftData.type()) == QMetaType::QString) + { + return leftData.toString() < rightData.toString(); + } + else if (static_cast(leftData.type()) == QMetaType::ULongLong) + { + return leftData.toULongLong() < rightData.toULongLong(); + } + AZ_Error("Editor", false, "Error! Unhandled type \"%s\" in OutlinerSortFilterProxyModel::lessThan", leftData.typeName()); + } + return false; } void OutlinerSortFilterProxyModel::sort(int /*column*/, Qt::SortOrder /*order*/) diff --git a/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerWidget.cpp b/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerWidget.cpp index d69480b169..02dabb8b20 100644 --- a/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerWidget.cpp +++ b/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerWidget.cpp @@ -269,10 +269,12 @@ OutlinerWidget::OutlinerWidget(QWidget* pParent, Qt::WindowFlags flags) AzToolsFramework::ComponentModeFramework::EditorComponentModeNotificationBus::Handler::BusConnect( AzToolsFramework::GetEntityContextId()); AzToolsFramework::EditorEntityInfoNotificationBus::Handler::BusConnect(); + AzToolsFramework::EditorWindowUIRequestBus::Handler::BusConnect(); } OutlinerWidget::~OutlinerWidget() { + AzToolsFramework::EditorWindowUIRequestBus::Handler::BusDisconnect(); AzToolsFramework::ComponentModeFramework::EditorComponentModeNotificationBus::Handler::BusDisconnect(); AzToolsFramework::EditorEntityInfoNotificationBus::Handler::BusDisconnect(); AzToolsFramework::EditorPickModeNotificationBus::Handler::BusDisconnect(); @@ -1321,16 +1323,25 @@ static void SetEntityOutlinerState(Ui::OutlinerWidgetUI* entityOutlinerUi, const AzQtComponents::SetWidgetInteractEnabled(entityOutlinerUi->m_searchWidget, on); } +void OutlinerWidget::EnableUi(bool enable) +{ + SetEntityOutlinerState(m_gui, enable); + setEnabled(enable); +} + +void OutlinerWidget::SetEditorUiEnabled(bool enable) +{ + EnableUi(enable); +} + void OutlinerWidget::EnteredComponentMode([[maybe_unused]] const AZStd::vector& componentModeTypes) { - SetEntityOutlinerState(m_gui, false); - setEnabled(false); + EnableUi(false); } void OutlinerWidget::LeftComponentMode([[maybe_unused]] const AZStd::vector& componentModeTypes) { - setEnabled(true); - SetEntityOutlinerState(m_gui, true); + EnableUi(true); } void OutlinerWidget::OnSliceInstantiated(const AZ::Data::AssetId& /*sliceAssetId*/, AZ::SliceComponent::SliceInstanceAddress& sliceAddress, const AzFramework::SliceInstantiationTicket& /*ticket*/) diff --git a/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerWidget.hxx b/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerWidget.hxx index 75991424bb..aff305e0fe 100644 --- a/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerWidget.hxx +++ b/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerWidget.hxx @@ -13,6 +13,7 @@ #include #include +#include #include #include #include @@ -57,6 +58,7 @@ class OutlinerWidget , private AzToolsFramework::SliceEditorEntityOwnershipServiceNotificationBus::Handler , private AzToolsFramework::EditorEntityInfoNotificationBus::Handler , private AzToolsFramework::ComponentModeFramework::EditorComponentModeNotificationBus::Handler + , private AzToolsFramework::EditorWindowUIRequestBus::Handler { Q_OBJECT; public: @@ -106,6 +108,9 @@ private: void EnteredComponentMode(const AZStd::vector& componentModeTypes) override; void LeftComponentMode(const AZStd::vector& componentModeTypes) override; + // EditorWindowUIRequestBus overrides + void SetEditorUiEnabled(bool enable) override; + // Build a selection object from the given entities. Entities already in the Widget's selection buffers are ignored. template QItemSelection BuildSelectionFromEntities(const EntityIdCollection& entityIds); @@ -171,6 +176,7 @@ private: AZ::EntityId GetEntityIdFromIndex(const QModelIndex& index) const; QModelIndex GetIndexFromEntityId(const AZ::EntityId& entityId) const; void ExtractEntityIdsFromSelection(const QItemSelection& selection, AzToolsFramework::EntityIdList& entityIdList) const; + void EnableUi(bool enable); // AzToolsFramework::OutlinerModelNotificationBus::Handler // Receive notification from the outliner model that we should scroll diff --git a/Code/Editor/Plugins/EditorCommon/EditorCommon.def b/Code/Editor/Plugins/EditorCommon/EditorCommon.def deleted file mode 100644 index a8d10ff297..0000000000 --- a/Code/Editor/Plugins/EditorCommon/EditorCommon.def +++ /dev/null @@ -1,6 +0,0 @@ -; EditorCommon.def : Declares the module parameters for the DLL. - -LIBRARY - -EXPORTS - ; Explicit exports can go here diff --git a/Code/Editor/Plugins/EditorCommon/res/EditorCommon.rc2 b/Code/Editor/Plugins/EditorCommon/res/EditorCommon.rc2 deleted file mode 100644 index 8ffc09417a..0000000000 Binary files a/Code/Editor/Plugins/EditorCommon/res/EditorCommon.rc2 and /dev/null differ diff --git a/Code/Editor/Plugins/FFMPEGPlugin/CMakeLists.txt b/Code/Editor/Plugins/FFMPEGPlugin/CMakeLists.txt index 342151f24a..909ec193f3 100644 --- a/Code/Editor/Plugins/FFMPEGPlugin/CMakeLists.txt +++ b/Code/Editor/Plugins/FFMPEGPlugin/CMakeLists.txt @@ -23,6 +23,7 @@ ly_add_target( . BUILD_DEPENDENCIES PRIVATE + 3rdParty::Qt::Core AZ::AzCore Legacy::CryCommon Legacy::EditorLib diff --git a/Code/Editor/Plugins/FFMPEGPlugin/FFMPEGPlugin_precompiled.h b/Code/Editor/Plugins/FFMPEGPlugin/FFMPEGPlugin_precompiled.h index 3b015dd9a5..33ca3390f1 100644 --- a/Code/Editor/Plugins/FFMPEGPlugin/FFMPEGPlugin_precompiled.h +++ b/Code/Editor/Plugins/FFMPEGPlugin/FFMPEGPlugin_precompiled.h @@ -17,19 +17,8 @@ ///////////////////////////////////////////////////////////////////////////// #include - -///////////////////////////////////////////////////////////////////////////// -// STL -///////////////////////////////////////////////////////////////////////////// -#include -#include -#include -#include -#include - ///////////////////////////////////////////////////////////////////////////// // CRY Stuff //////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// #include -#include "Util/EditorUtils.h" #include "EditorCoreAPI.h" diff --git a/Code/Editor/Plugins/PerforcePlugin/CMakeLists.txt b/Code/Editor/Plugins/PerforcePlugin/CMakeLists.txt index 15a1147166..bd4661fa0f 100644 --- a/Code/Editor/Plugins/PerforcePlugin/CMakeLists.txt +++ b/Code/Editor/Plugins/PerforcePlugin/CMakeLists.txt @@ -31,6 +31,8 @@ ly_add_target( . BUILD_DEPENDENCIES PRIVATE + 3rdParty::Qt::Core + 3rdParty::Qt::Widgets AZ::AzCore Legacy::CryCommon Legacy::EditorLib diff --git a/Code/Editor/Plugins/ProjectSettingsTool/ProjectSettingsToolWindow.cpp b/Code/Editor/Plugins/ProjectSettingsTool/ProjectSettingsToolWindow.cpp index f1a2aafd1e..f4e4fed973 100644 --- a/Code/Editor/Plugins/ProjectSettingsTool/ProjectSettingsToolWindow.cpp +++ b/Code/Editor/Plugins/ProjectSettingsTool/ProjectSettingsToolWindow.cpp @@ -585,31 +585,11 @@ namespace ProjectSettingsTool ShowAllErrorsThenExitIfInvalid(); m_ui->reconfigureLog->setText(""); - int result = QMessageBox::question - ( - this, - tr("Reconfigure Project"), - tr("For new settings to be applied the project must be reconfigured. Would you like run configure now?"), - QMessageBox::Yes, - QMessageBox::No - ); + QMessageBox::information(this, tr("Project Settings Saved"), + tr("The project may need to be manually reconfigured for the new settings to be applied.")); - if (QMessageBox::Yes == result) - { - m_ui->reconfigureLog->show(); - #if defined(AZ_PLATFORM_WINDOWS) - m_reconfigureProcess.start("cmd.exe", { QString("/C %1").arg("lmbr_waf.bat configure") }); - #elif defined(AZ_PLATFORM_MAC) || defined(AZ_PLATFORM_LINUX) - m_reconfigureProcess.start("/bin/sh", { QString("%1").arg("lmbr_waf.sh configure") }); - #else - #error "Needs to be implemented" - #endif - } - else - { - m_ui->reloadButton->setEnabled(true); - m_ui->saveButton->setEnabled(true); - } + m_ui->reloadButton->setEnabled(true); + m_ui->saveButton->setEnabled(true); } // Show a message box telling user settings failed to save else diff --git a/Code/Editor/Plugins/ProjectSettingsTool/Validators.cpp b/Code/Editor/Plugins/ProjectSettingsTool/Validators.cpp index 8484a2937a..c17da8e40b 100644 --- a/Code/Editor/Plugins/ProjectSettingsTool/Validators.cpp +++ b/Code/Editor/Plugins/ProjectSettingsTool/Validators.cpp @@ -172,8 +172,9 @@ namespace ProjectSettingsTool // Returns true if valid ios version number RetType IOSVersionNumber(const QString& value) { + // support up to 4-component numerical-only version strings return RegularExpressionValidator - ("(0|[1-9][0-9]{0,8}|[1-2][0-1][0-9]{0,8})(\\.(0|[1-9][0-9]{0,8}|[1-2][0-1][0-9]{0,8})){0,2}", + ("^(\\d+)(\\.\\d+){0,3}$", value, maxIosVersionLength); } diff --git a/Code/Editor/Plugins/QtMocRule.props b/Code/Editor/Plugins/QtMocRule.props deleted file mode 100644 index af7c107071..0000000000 --- a/Code/Editor/Plugins/QtMocRule.props +++ /dev/null @@ -1,10 +0,0 @@ - - - - - %(RootDir)%(Directory)%(FileName).moc - $(QTDIR)\bin\moc.exe [AllOptions] [Inputs] - Moc'ing %(Filename)%(Extension)... - - - diff --git a/Code/Editor/Plugins/QtMocRule.targets b/Code/Editor/Plugins/QtMocRule.targets deleted file mode 100644 index fdcb95e6a3..0000000000 --- a/Code/Editor/Plugins/QtMocRule.targets +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - _QtMOC - - - - $(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml - - - - - - - - @(QtMOC, '|') - - - - - - - diff --git a/Code/Editor/Plugins/QtMocRule.xml b/Code/Editor/Plugins/QtMocRule.xml deleted file mode 100644 index 21850b34ab..0000000000 --- a/Code/Editor/Plugins/QtMocRule.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - General - - - - - Command Line - - - - - - - - - - - - - - Additional Options - - - Additional Options - - - - - - diff --git a/Code/Editor/Plugins/QtRccRule.props b/Code/Editor/Plugins/QtRccRule.props deleted file mode 100644 index 9c06b5c082..0000000000 --- a/Code/Editor/Plugins/QtRccRule.props +++ /dev/null @@ -1,10 +0,0 @@ - - - - - %(RootDir)%(Directory)rcc_%(FileName).h - $(QTDIR)\bin\rcc.exe [AllOptions] [Inputs] - Rcc'ing %(Filename)%(Extension)... - - - diff --git a/Code/Editor/Plugins/QtRccRule.targets b/Code/Editor/Plugins/QtRccRule.targets deleted file mode 100644 index bd4e7ae90e..0000000000 --- a/Code/Editor/Plugins/QtRccRule.targets +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - _QtRCC - - - - $(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml - - - - - - - - @(QtRCC, '|') - - - - - - - diff --git a/Code/Editor/Plugins/QtRccRule.xml b/Code/Editor/Plugins/QtRccRule.xml deleted file mode 100644 index ce7b98c323..0000000000 --- a/Code/Editor/Plugins/QtRccRule.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - General - - - - - Command Line - - - - - - - - - - - - - - Additional Options - - - Additional Options - - - - - - diff --git a/Code/Editor/Plugins/QtUicRule.props b/Code/Editor/Plugins/QtUicRule.props deleted file mode 100644 index ce08b40be7..0000000000 --- a/Code/Editor/Plugins/QtUicRule.props +++ /dev/null @@ -1,10 +0,0 @@ - - - - - %(RootDir)%(Directory)ui_%(FileName).h - $(QTDIR)\bin\uic.exe [AllOptions] [Inputs] - Uic'ing %(Filename)%(Extension)... - - - diff --git a/Code/Editor/Plugins/QtUicRule.targets b/Code/Editor/Plugins/QtUicRule.targets deleted file mode 100644 index a5ada15f79..0000000000 --- a/Code/Editor/Plugins/QtUicRule.targets +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - _QtUIC - - - - $(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml - - - - - - - - @(QtUIC, '|') - - - - - - - - diff --git a/Code/Editor/Plugins/QtUicRule.xml b/Code/Editor/Plugins/QtUicRule.xml deleted file mode 100644 index ec7ce4b214..0000000000 --- a/Code/Editor/Plugins/QtUicRule.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - General - - - - - Command Line - - - - - - - - - - - - - - Additional Options - - - Additional Options - - - - - - diff --git a/Code/Editor/QtViewPaneManager.cpp b/Code/Editor/QtViewPaneManager.cpp index 35b2160a1f..9f2b9f9cf8 100644 --- a/Code/Editor/QtViewPaneManager.cpp +++ b/Code/Editor/QtViewPaneManager.cpp @@ -525,6 +525,7 @@ QtViewPaneManager::QtViewPaneManager(QObject* parent) // view pane manager is interested when we enter/exit ComponentMode m_componentModeNotifications.BusConnect(AzToolsFramework::GetEntityContextId()); + m_windowRequest.BusConnect(); m_componentModeNotifications.SetEnteredComponentModeFunc( [this](const AZStd::vector& /*componentModeTypes*/) @@ -545,10 +546,23 @@ QtViewPaneManager::QtViewPaneManager(QObject* parent) AzQtComponents::SetWidgetInteractEnabled(widget, on); }); }); + + m_windowRequest.SetEnableEditorUiFunc( + [this](bool enable) + { + // gray out panels when entering ImGui mode + SetDefaultActionsEnabled( + enable, m_registeredPanes, + [](QWidget* widget, bool on) + { + AzQtComponents::SetWidgetInteractEnabled(widget, on); + }); + }); } QtViewPaneManager::~QtViewPaneManager() { + m_windowRequest.BusDisconnect(); m_componentModeNotifications.BusDisconnect(); } diff --git a/Code/Editor/QtViewPaneManager.h b/Code/Editor/QtViewPaneManager.h index aa382c41c0..2b3412aad6 100644 --- a/Code/Editor/QtViewPaneManager.h +++ b/Code/Editor/QtViewPaneManager.h @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -249,8 +250,12 @@ private: QPointer m_advancedDockManager; using EditorComponentModeNotificationBusImpl = AzToolsFramework::ComponentModeFramework::EditorComponentModeNotificationBusImpl; - EditorComponentModeNotificationBusImpl m_componentModeNotifications; /**< Helper for EditorComponentModeNotificationBus so - * QtViewPaneManager does not need to inherit directly from it. */ + EditorComponentModeNotificationBusImpl m_componentModeNotifications; //!< Helper for EditorComponentModeNotificationBus so + //!< QtViewPaneManager does not need to inherit directly from it. */ + + using EditorWindowRequestBusImpl = AzToolsFramework::EditorWindowRequestBusImpl; + EditorWindowRequestBusImpl m_windowRequest; //!< Helper for EditorWindowRequestBus so + //!< QtViewPaneManager does not need to inherit directly from it. */ AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING }; diff --git a/Code/Editor/RenderViewport.cpp b/Code/Editor/RenderViewport.cpp index 8d6bcf021b..bb269ba298 100644 --- a/Code/Editor/RenderViewport.cpp +++ b/Code/Editor/RenderViewport.cpp @@ -4083,7 +4083,12 @@ void CRenderViewport::RestoreViewportAfterGameMode() { Matrix34 preGameModeViewTM = m_preGameModeViewTM; - QString text = QString("You are exiting Game Mode. Would you like to restore the camera in the viewport to where it was before you entered Game Mode?

This option can always be changed in the General Preferences tab of the Editor Settings, by toggling the \"%1\" option.

").arg(EditorPreferencesGeneralRestoreViewportCameraSettingName); + QString text = + QString( + tr("When leaving \" Game Mode \" the engine will automatically restore your camera position to the default position before you " + "had entered Game mode.

If you dislike this setting you can always change this anytime in the global " + "preferences.

")) + .arg(EditorPreferencesGeneralRestoreViewportCameraSettingName); QString restoreOnExitGameModePopupDisabledRegKey("Editor/AutoHide/ViewportCameraRestoreOnExitGameMode"); // Read the popup disabled registry value @@ -4098,6 +4103,7 @@ void CRenderViewport::RestoreViewportAfterGameMode() messageBox.setDefaultButton(QMessageBox::Yes); QCheckBox* checkBox = new QCheckBox(QStringLiteral("Do not show this message again")); + checkBox->setChecked(true); messageBox.setCheckBox(checkBox); // Unconstrain the system cursor and make it visible before we show the dialog box, otherwise the user can't see the cursor. diff --git a/Code/Editor/RenderViewport.h b/Code/Editor/RenderViewport.h index 1764028dd6..2a67e1bbc6 100644 --- a/Code/Editor/RenderViewport.h +++ b/Code/Editor/RenderViewport.h @@ -219,6 +219,7 @@ public: void SetFullScreenState(bool fullScreenState) override; bool CanToggleFullScreenState() const override; void ToggleFullScreenState() override; + float GetDpiScaleFactor() const override { return 1.0f; }; void ConnectViewportInteractionRequestBus(); void DisconnectViewportInteractionRequestBus(); diff --git a/Code/Editor/Resource.h b/Code/Editor/Resource.h index 22bbece700..3ae1024550 100644 --- a/Code/Editor/Resource.h +++ b/Code/Editor/Resource.h @@ -187,7 +187,6 @@ #define ID_SWITCHCAMERA_SEQUENCECAMERA 33701 #define ID_SWITCHCAMERA_SELECTEDCAMERA 33702 #define ID_TV_RECORD_AUTO 33703 -#define ID_GRAPHICS_SETTINGS 33705 #define ID_VIEW_OPENVIEWPANE 33709 #define ID_VIEW_OPENPANE_FIRST 33712 #define ID_VIEW_OPENPANE_LAST 33811 @@ -219,10 +218,6 @@ #define ID_SPLINE_SNAP_GRID_X 33933 #define ID_SPLINE_SNAP_GRID_Y 33934 #define ID_FREEZE_TANGENTS 33935 -#define ID_GAME_PC_ENABLELOWSPEC 33960 -#define ID_GAME_PC_ENABLEMEDIUMSPEC 33961 -#define ID_GAME_PC_ENABLEHIGHSPEC 33962 -#define ID_GAME_PC_ENABLEVERYHIGHSPEC 33963 #define ID_PANEL_VEG_CREATE_SEL 33990 #define ID_TOOLS_UPDATEPROCEDURALVEGETATION 33999 #define ID_DISPLAY_GOTOPOSITION 34004 @@ -287,14 +282,6 @@ #define ID_CLEAR_REGISTRY 34470 #define ID_SOUND_STOPALLSOUNDS 34476 #define ID_AUDIO_REFRESH_AUDIO_SYSTEM 34477 -#define ID_GAME_ANDROID_ENABLELOWSPEC 34490 -#define ID_GAME_ANDROID_ENABLEMEDIUMSPEC 34491 -#define ID_GAME_ANDROID_ENABLEHIGHSPEC 34492 -#define ID_GAME_ANDROID_ENABLEVERYHIGHSPEC 34493 -#define ID_GAME_IOS_ENABLELOWSPEC 34494 -#define ID_GAME_IOS_ENABLEMEDIUMSPEC 34495 -#define ID_GAME_IOS_ENABLEHIGHSPEC 34496 -#define ID_GAME_IOS_ENABLEVERYHIGHSPEC 34497 #define ID_OPEN_AUDIO_CONTROLS_BROWSER 34580 #define ID_CREATE_GLOBAL_FG_MODULE_FROM_SELECTION 35076 #define ID_CREATE_LEVEL_FG_MODULE_FROM_SELECTION 35077 @@ -324,19 +311,6 @@ #define ID_DOCUMENTATION_FEEDBACK 36043 #define ID_OPEN_SUBSTANCE_EDITOR 36060 #define ID_IMPORT_ASSET 36069 -#define ID_GAME_PROVO_ENABLELOWSPEC 34603 -#define ID_GAME_PROVO_ENABLEMEDIUMSPEC 34604 -#define ID_GAME_PROVO_ENABLEHIGHSPEC 34605 -#define ID_GAME_OSXMETAL_ENABLELOWSPEC 34606 -#define ID_GAME_OSXMETAL_ENABLEMEDIUMSPEC 34607 -#define ID_GAME_OSXMETAL_ENABLEHIGHSPEC 34608 -#define ID_GAME_OSXMETAL_ENABLEVERYHIGHSPEC 34609 -#define ID_GAME_SALEM_ENABLELOWSPEC 34610 -#define ID_GAME_SALEM_ENABLEMEDIUMSPEC 34611 -#define ID_GAME_SALEM_ENABLEHIGHSPEC 34612 -#define ID_GAME_JASPER_ENABLELOWSPEC 34613 -#define ID_GAME_JASPER_ENABLEMEDIUMSPEC 34614 -#define ID_GAME_JASPER_ENABLEHIGHSPEC 34615 #define ID_FILE_RESAVESLICES 36210 #define FIRST_QT_ACTION 50000 #define ID_VIEW_CONSOLEWINDOW 50001 diff --git a/Code/Editor/Style/GraphicsSettingsDialog.qss b/Code/Editor/Style/GraphicsSettingsDialog.qss deleted file mode 100644 index 3af8c4c05b..0000000000 --- a/Code/Editor/Style/GraphicsSettingsDialog.qss +++ /dev/null @@ -1,25 +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 - * - */ - -#GraphicsSettingsDialog QHeaderView::section -{ - background: #2D2D2D; -} - -#GraphicsSettingsDialog QHeaderView::down-arrow -{ - width: 14px; - height: 14px; - image: url(:/Gallery/Delete.svg); -} - -#GraphicsSettingsDialog QHeaderView::up-arrow -{ - width: 14px; - height: 14px; - image: url(:/Gallery/Delete.svg); -} diff --git a/Code/Editor/Style/resources.qrc b/Code/Editor/Style/resources.qrc index aec7e2cf68..24682d2be3 100644 --- a/Code/Editor/Style/resources.qrc +++ b/Code/Editor/Style/resources.qrc @@ -3,6 +3,5 @@ Editor.qss EditorPreferencesDialog.qss LayoutConfigDialog.qss - GraphicsSettingsDialog.qss diff --git a/Code/Editor/TrackView/AtomOutputFrameCapture.cpp b/Code/Editor/TrackView/AtomOutputFrameCapture.cpp index d5ceeae9b2..cd5a977367 100644 --- a/Code/Editor/TrackView/AtomOutputFrameCapture.cpp +++ b/Code/Editor/TrackView/AtomOutputFrameCapture.cpp @@ -73,7 +73,7 @@ namespace TrackView bool startedCapture = false; AZ::Render::FrameCaptureRequestBus::BroadcastResult( startedCapture, &AZ::Render::FrameCaptureRequestBus::Events::CapturePassAttachmentWithCallback, m_passHierarchy, - AZStd::string("Output"), attachmentReadbackCallback); + AZStd::string("Output"), attachmentReadbackCallback, AZ::RPI::PassAttachmentReadbackOption::Output); return startedCapture; } diff --git a/Code/Editor/ViewportManipulatorController.cpp b/Code/Editor/ViewportManipulatorController.cpp index c7d2885cb2..fb696a61f3 100644 --- a/Code/Editor/ViewportManipulatorController.cpp +++ b/Code/Editor/ViewportManipulatorController.cpp @@ -216,7 +216,8 @@ namespace SandboxEditor interactionHandled, AzToolsFramework::GetEntityContextId(), targetInteractionEvent, mouseInteractionEvent); } - return interactionHandled; + // Only filter button/key press events, not release events + return interactionHandled && event.m_inputChannel.IsActive(); } void ViewportManipulatorControllerInstance::ResetInputChannels() diff --git a/Code/Editor/WelcomeScreen/WelcomeScreenDialog.cpp b/Code/Editor/WelcomeScreen/WelcomeScreenDialog.cpp index f9560aef55..49d9c58159 100644 --- a/Code/Editor/WelcomeScreen/WelcomeScreenDialog.cpp +++ b/Code/Editor/WelcomeScreen/WelcomeScreenDialog.cpp @@ -40,10 +40,6 @@ #include "CryEdit.h" #include "LevelFileDialog.h" -// NewsShared -#include // for News::ResourceManifest -#include // for News::ArticleViewContainer - AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING #include AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING diff --git a/Code/Editor/WelcomeScreen/WelcomeScreenDialog.h b/Code/Editor/WelcomeScreen/WelcomeScreenDialog.h index 4338a8250f..39c0ad6316 100644 --- a/Code/Editor/WelcomeScreen/WelcomeScreenDialog.h +++ b/Code/Editor/WelcomeScreen/WelcomeScreenDialog.h @@ -8,8 +8,6 @@ #if !defined(Q_MOC_RUN) #include -#include "NewsShared/LogType.h" -#include "NewsShared/ErrorCodes.h" #endif namespace News { @@ -62,9 +60,6 @@ private: void OnRecentLevelTableItemClicked(const QModelIndex& index); void OnCloseBtnClicked(bool checked); - void SyncFail(News::ErrorCode error); - void SyncSuccess(); - private Q_SLOTS: void previewAreaScrolled(); }; diff --git a/Code/Editor/editor_lib_files.cmake b/Code/Editor/editor_lib_files.cmake index 562623dab2..3181474b35 100644 --- a/Code/Editor/editor_lib_files.cmake +++ b/Code/Editor/editor_lib_files.cmake @@ -21,7 +21,6 @@ set(FILES res/TreeView.bmp res/VisualLog_PlayerButtons.bmp res/ab_toolbar.bmp - res/about_dark.bmp res/anim.bmp res/animatio.bmp res/animations_tree_soundevent.bmp @@ -137,7 +136,6 @@ set(FILES res/litebulb.bmp res/lock_sel.bmp res/locksele.bmp - res/logo.bmp res/mainfram.bmp res/mann_tagdef_toolbar.bmp res/mann_tagdef_tree.bmp @@ -184,8 +182,6 @@ set(FILES res/rename.ico res/replace.ico res/ribbon_system_button.png - res/sandbox_dark.bmp - res/sb_welcome_dark.bmp res/selectobj.bmp res/seq_1_colour_keys.bmp res/seq_2_colour_keys.bmp @@ -587,9 +583,6 @@ set(FILES SettingsManager.h SettingsManagerDialog.h SettingsManagerDialog.ui - GraphicsSettingsDialog.h - GraphicsSettingsDialog.cpp - graphicssettingsdialog.ui AboutDialog.cpp ErrorReportTableModel.h ErrorReportTableModel.cpp diff --git a/Code/Editor/graphicssettingsdialog.ui b/Code/Editor/graphicssettingsdialog.ui deleted file mode 100644 index ca8770e9e3..0000000000 --- a/Code/Editor/graphicssettingsdialog.ui +++ /dev/null @@ -1,270 +0,0 @@ - - - GraphicsSettingsDialog - - - - 0 - 0 - 1292 - 565 - - - - - 0 - 0 - - - - - 800 - 400 - - - - - 16777215 - 16777215 - - - - Graphics Settings - - - - - - - 0 - - - 6 - - - - - - 0 - 0 - - - - - 0 - 20 - - - - - 16777215 - 20 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - - - - - 100 - 0 - - - - - 16777215 - 20 - - - - Add Resource - - - - - - - - 0 - 0 - - - - - 60 - 20 - - - - Platform - - - Qt::AlignCenter - - - - - - - - 13 - 0 - - - - Qt::Vertical - - - - - - - - - - Qt::Horizontal - - - - - - - - 0 - 0 - - - - true - - - - - 0 - 0 - 1272 - 452 - - - - - 0 - 0 - - - - - - - - 0 - 0 - - - - 8 - - - false - - - - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 0 - 0 - - - - background-color: rgb(233, 118, 17); - - - Save - - - - - - - - 0 - 0 - - - - Cancel - - - - - - - - - Qt::Horizontal - - - - - line - m_scrollArea - line_2 - widget - - - - GraphicsSettingsTreeView - QTreeView -
GraphicsSettingsDialog.h
-
-
- - m_cancelButton - m_applyButton - m_scrollArea - - - -
diff --git a/Code/Editor/res/about_dark.bmp b/Code/Editor/res/about_dark.bmp deleted file mode 100644 index 2bf31764a6..0000000000 --- a/Code/Editor/res/about_dark.bmp +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:887d184cf49cf78c62a1fe53eac3cb8e7b071bb67e09b801a4893445ac4c800f -size 542456 diff --git a/Code/Editor/res/logo.bmp b/Code/Editor/res/logo.bmp deleted file mode 100644 index c67ca02a07..0000000000 --- a/Code/Editor/res/logo.bmp +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8b65af2765042354ae4110dc7bcbde905e4a55a4995f66b626d15ec6c0fa18c1 -size 96056 diff --git a/Code/Editor/res/logo.gif b/Code/Editor/res/logo.gif deleted file mode 100644 index 00534c61cc..0000000000 --- a/Code/Editor/res/logo.gif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:79412e83b32bb6712d9701f78465878a2057a590698a4dc8d8c7aa11de2623ef -size 4227 diff --git a/Code/Editor/res/sandbox_dark.bmp b/Code/Editor/res/sandbox_dark.bmp deleted file mode 100644 index 2bf31764a6..0000000000 --- a/Code/Editor/res/sandbox_dark.bmp +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:887d184cf49cf78c62a1fe53eac3cb8e7b071bb67e09b801a4893445ac4c800f -size 542456 diff --git a/Code/Editor/res/sb_welcome_dark.bmp b/Code/Editor/res/sb_welcome_dark.bmp deleted file mode 100644 index 979c61e4af..0000000000 --- a/Code/Editor/res/sb_welcome_dark.bmp +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:704faeb96d930d3e6992a1449908aa6d7860b648e2feb38da8bf37cd7268a694 -size 184856 diff --git a/Code/Framework/AzCore/AzCore/EBus/Event.inl b/Code/Framework/AzCore/AzCore/EBus/Event.inl index 006ff81e34..493dea4a3f 100644 --- a/Code/Framework/AzCore/AzCore/EBus/Event.inl +++ b/Code/Framework/AzCore/AzCore/EBus/Event.inl @@ -27,11 +27,17 @@ namespace AZ template EventHandler::EventHandler(const EventHandler& rhs) : m_callback(rhs.m_callback) + , m_event(rhs.m_event) { - // Copy the callback function, then perform a Connect with the new event - if (rhs.m_event) + // Copy the callback and event, then perform a Connect to the event + if (m_callback && m_event) { - rhs.m_event->Connect(*this); + m_event->Connect(*this); + } + else + { + // It was not possible to connect to the event, set it to nullptr + m_event = nullptr; } } @@ -65,9 +71,16 @@ namespace AZ { Disconnect(); m_callback = rhs.m_callback; - if (rhs.m_event) + m_event = rhs.m_event; + // Copy the callback and event, then perform a Connect to the event + if (m_callback && m_event) { - rhs.m_event->Connect(*this); + m_event->Connect(*this); + } + else + { + // It was not possible to connect to the event, set it to nullptr + m_event = nullptr; } } diff --git a/Code/Framework/AzCore/AzCore/Math/UuidSerializer.cpp b/Code/Framework/AzCore/AzCore/Math/UuidSerializer.cpp index 7e83d5c307..b2d92854e9 100644 --- a/Code/Framework/AzCore/AzCore/Math/UuidSerializer.cpp +++ b/Code/Framework/AzCore/AzCore/Math/UuidSerializer.cpp @@ -23,6 +23,8 @@ namespace AZ } JsonUuidSerializer::JsonUuidSerializer() + : m_zeroUuidString(AZ::Uuid::CreateNull().ToString()) + , m_zeroUuidStringNoDashes(AZ::Uuid::CreateNull().ToString(true, false)) { m_uuidFormat = AZStd::regex(R"(\{[a-f0-9]{8}-?[a-f0-9]{4}-?[a-f0-9]{4}-?[a-f0-9]{4}-?[a-f0-9]{12}\})", AZStd::regex_constants::icase | AZStd::regex_constants::optimize); @@ -53,7 +55,7 @@ namespace AZ Uuid* valAsUuid = reinterpret_cast(outputValue); - if (IsExplicitDefault(inputValue)) + if (IsExplicitDefault(inputValue) || (inputValue == m_zeroUuidString.c_str()) || (inputValue == m_zeroUuidStringNoDashes.c_str())) { *valAsUuid = AZ::Uuid::CreateNull(); return MessageResult("Uuid value set to default of null.", JSR::ResultCode(JSR::Tasks::ReadField, JSR::Outcomes::DefaultsUsed)); diff --git a/Code/Framework/AzCore/AzCore/Math/UuidSerializer.h b/Code/Framework/AzCore/AzCore/Math/UuidSerializer.h index e3c1f4c7ed..a0a594d573 100644 --- a/Code/Framework/AzCore/AzCore/Math/UuidSerializer.h +++ b/Code/Framework/AzCore/AzCore/Math/UuidSerializer.h @@ -47,6 +47,8 @@ namespace AZ const Uuid& valueTypeId, JsonSerializerContext& context); private: + const AZStd::string m_zeroUuidString; + const AZStd::string m_zeroUuidStringNoDashes; AZStd::regex m_uuidFormat; }; } // namespace AZ diff --git a/Code/Framework/AzCore/AzCore/Script/ScriptContext.cpp b/Code/Framework/AzCore/AzCore/Script/ScriptContext.cpp index 84988d23c3..6e57deed74 100644 --- a/Code/Framework/AzCore/AzCore/Script/ScriptContext.cpp +++ b/Code/Framework/AzCore/AzCore/Script/ScriptContext.cpp @@ -3252,6 +3252,7 @@ LUA_API const Node* lua_getDummyNode() else if (Internal::LuaScriptNumber::FromStack(param, result)) return result; else if (Internal::LuaScriptNumber::FromStack(param, result)) return result; else if (Internal::LuaScriptNumber::FromStack(param, result)) return result; + else if (Internal::LuaScriptNumber::FromStack(param, result)) return result; else if (Internal::LuaScriptNumber::FromStack(param, result)) return result; else if (Internal::LuaScriptNumber::FromStack(param, result)) return result; else if (Internal::LuaScriptNumber::FromStack(param, result)) return result; diff --git a/Code/Framework/AzCore/AzCore/Settings/SettingsRegistry.cpp b/Code/Framework/AzCore/AzCore/Settings/SettingsRegistry.cpp index efbc0eaa1f..5a709f9324 100644 --- a/Code/Framework/AzCore/AzCore/Settings/SettingsRegistry.cpp +++ b/Code/Framework/AzCore/AzCore/Settings/SettingsRegistry.cpp @@ -32,6 +32,15 @@ namespace AZ { if (m_hashes.size() < m_hashes.max_size()) { + constexpr size_t MaxTagSize = TagName{}.max_size(); + if (specialization.size() > MaxTagSize) + { + AZ_Error("Settings Registry", false, R"(Cannot append Specialization tag of "%.*s.")" + " It is longer than the MaxTagNameSize of %zu", AZ_STRING_ARG(specialization), + MaxTagSize); + return false; + } + m_names.push_back(TagName{ specialization }); TagName& tag = m_names.back(); AZStd::to_lower(tag.begin(), tag.end()); diff --git a/Code/Framework/AzCore/AzCore/Settings/SettingsRegistry.h b/Code/Framework/AzCore/AzCore/Settings/SettingsRegistry.h index baeca89636..f0077db2ca 100644 --- a/Code/Framework/AzCore/AzCore/Settings/SettingsRegistry.h +++ b/Code/Framework/AzCore/AzCore/Settings/SettingsRegistry.h @@ -49,7 +49,7 @@ namespace AZ class Specializations { public: - static constexpr size_t MaxTagNameSize = 32; + static constexpr size_t MaxTagNameSize = 64; static constexpr size_t MaxCount = 15; static constexpr size_t NotFound = static_cast(-1); using TagName = AZStd::fixed_string; diff --git a/Code/Framework/AzCore/Platform/Windows/AzCore/Debug/StackTracer_Windows.cpp b/Code/Framework/AzCore/Platform/Windows/AzCore/Debug/StackTracer_Windows.cpp index 9b2ccbe754..39f6c02bde 100644 --- a/Code/Framework/AzCore/Platform/Windows/AzCore/Debug/StackTracer_Windows.cpp +++ b/Code/Framework/AzCore/Platform/Windows/AzCore/Debug/StackTracer_Windows.cpp @@ -146,7 +146,7 @@ namespace AZ { AZStd::mutex g_dbgLoadingMutex; HANDLE g_currentProcess = 0; /// We deal with only one process for now. CRITICAL_SECTION g_csDbgHelpDll; /// All dbg help functions are single threaded, so we need to control the access. - AZStd::fixed_vector g_moduleInfo; + AZStd::fixed_vector g_moduleInfo; // reserve 4k of scratch space so that we can get some callstack information without any allocations and as little stack frame usage as possible. const size_t g_scratchSpaceSize = 2048; diff --git a/Code/Framework/AzCore/Tests/EventTests.cpp b/Code/Framework/AzCore/Tests/EventTests.cpp index 7640201e0d..571bdd5345 100644 --- a/Code/Framework/AzCore/Tests/EventTests.cpp +++ b/Code/Framework/AzCore/Tests/EventTests.cpp @@ -257,6 +257,48 @@ namespace UnitTest EXPECT_FALSE(testEvent1.HasHandlerConnected()); EXPECT_TRUE(testEvent2.HasHandlerConnected()); } + + TEST_F(EventTests, TestHandlerCopyConstructorOperator) + { + int32_t invokedCounter = 0; + + AZ::Event<> testEvent; + AZ::Event<>::Handler testHandler([&invokedCounter]() { invokedCounter++; }); + + testHandler.Connect(testEvent); + + AZ::Event<>::Handler testHandler2(testHandler); + + EXPECT_TRUE(testHandler.IsConnected()); + EXPECT_TRUE(testHandler2.IsConnected()); + + EXPECT_TRUE(invokedCounter == 0); + testEvent.Signal(); + EXPECT_TRUE(invokedCounter == 2); + } + + TEST_F(EventTests, TestHandlerCopyAssignmentOperator) + { + int32_t invokedCounter = 0; + + AZ::Event<> testEvent; + AZ::Event<>::Handler testHandler([&invokedCounter]() { invokedCounter++; }); + + testHandler.Connect(testEvent); + + AZ::Event<>::Handler testHandler2; + + EXPECT_TRUE(testHandler.IsConnected()); + EXPECT_FALSE(testHandler2.IsConnected()); + + testHandler2 = testHandler; + + EXPECT_TRUE(testHandler2.IsConnected()); + + EXPECT_TRUE(invokedCounter == 0); + testEvent.Signal(); + EXPECT_TRUE(invokedCounter == 2); + } } #if defined(HAVE_BENCHMARK) diff --git a/Code/Framework/AzCore/Tests/Platform/Windows/Tests/IO/Streamer/StorageDriveTests_Windows.cpp b/Code/Framework/AzCore/Tests/Platform/Windows/Tests/IO/Streamer/StorageDriveTests_Windows.cpp index e654ef4aa3..b505bba5dd 100644 --- a/Code/Framework/AzCore/Tests/Platform/Windows/Tests/IO/Streamer/StorageDriveTests_Windows.cpp +++ b/Code/Framework/AzCore/Tests/Platform/Windows/Tests/IO/Streamer/StorageDriveTests_Windows.cpp @@ -1155,7 +1155,7 @@ namespace Benchmark class StorageDriveWindowsFixture : public benchmark::Fixture { public: - constexpr static char* TestFileName = "StreamerBenchmark.bin"; + constexpr static const char* TestFileName = "StreamerBenchmark.bin"; constexpr static size_t FileSize = 64_mib; void SetupStreamer(bool enableFileSharing) diff --git a/Code/Framework/AzFramework/AzFramework/Input/Devices/Keyboard/InputDeviceKeyboard.cpp b/Code/Framework/AzFramework/AzFramework/Input/Devices/Keyboard/InputDeviceKeyboard.cpp index 7625679d69..75346227ed 100644 --- a/Code/Framework/AzFramework/AzFramework/Input/Devices/Keyboard/InputDeviceKeyboard.cpp +++ b/Code/Framework/AzFramework/AzFramework/Input/Devices/Keyboard/InputDeviceKeyboard.cpp @@ -454,8 +454,8 @@ namespace AzFramework } //////////////////////////////////////////////////////////////////////////////////////////////// - InputDeviceKeyboard::InputDeviceKeyboard() - : InputDevice(Id) + InputDeviceKeyboard::InputDeviceKeyboard(AzFramework::InputDeviceId id) + : InputDevice(id) , m_modifierKeyStates(AZStd::make_shared()) , m_allChannelsById() , m_keyChannelsById() diff --git a/Code/Framework/AzFramework/AzFramework/Input/Devices/Keyboard/InputDeviceKeyboard.h b/Code/Framework/AzFramework/AzFramework/Input/Devices/Keyboard/InputDeviceKeyboard.h index ea0aa1beec..9f61ba96f7 100644 --- a/Code/Framework/AzFramework/AzFramework/Input/Devices/Keyboard/InputDeviceKeyboard.h +++ b/Code/Framework/AzFramework/AzFramework/Input/Devices/Keyboard/InputDeviceKeyboard.h @@ -240,7 +240,7 @@ namespace AzFramework //////////////////////////////////////////////////////////////////////////////////////////// //! Constructor - InputDeviceKeyboard(); + InputDeviceKeyboard(AzFramework::InputDeviceId id = Id); //////////////////////////////////////////////////////////////////////////////////////////// // Disable copying diff --git a/Code/Framework/AzFramework/AzFramework/Input/Devices/Mouse/InputDeviceMouse.cpp b/Code/Framework/AzFramework/AzFramework/Input/Devices/Mouse/InputDeviceMouse.cpp index a7180d7ec1..5cd940e989 100644 --- a/Code/Framework/AzFramework/AzFramework/Input/Devices/Mouse/InputDeviceMouse.cpp +++ b/Code/Framework/AzFramework/AzFramework/Input/Devices/Mouse/InputDeviceMouse.cpp @@ -95,8 +95,8 @@ namespace AzFramework } //////////////////////////////////////////////////////////////////////////////////////////////// - InputDeviceMouse::InputDeviceMouse() - : InputDevice(Id) + InputDeviceMouse::InputDeviceMouse(AzFramework::InputDeviceId id) + : InputDevice(id) , m_allChannelsById() , m_buttonChannelsById() , m_movementChannelsById() diff --git a/Code/Framework/AzFramework/AzFramework/Input/Devices/Mouse/InputDeviceMouse.h b/Code/Framework/AzFramework/AzFramework/Input/Devices/Mouse/InputDeviceMouse.h index 7fc6a7a505..3feb79ac68 100644 --- a/Code/Framework/AzFramework/AzFramework/Input/Devices/Mouse/InputDeviceMouse.h +++ b/Code/Framework/AzFramework/AzFramework/Input/Devices/Mouse/InputDeviceMouse.h @@ -111,7 +111,7 @@ namespace AzFramework //////////////////////////////////////////////////////////////////////////////////////////// //! Constructor - explicit InputDeviceMouse(); + explicit InputDeviceMouse(AzFramework::InputDeviceId id = Id); //////////////////////////////////////////////////////////////////////////////////////////// // Disable copying diff --git a/Code/Framework/AzFramework/AzFramework/Physics/Character.cpp b/Code/Framework/AzFramework/AzFramework/Physics/Character.cpp index 59f492359d..df66442b11 100644 --- a/Code/Framework/AzFramework/AzFramework/Physics/Character.cpp +++ b/Code/Framework/AzFramework/AzFramework/Physics/Character.cpp @@ -84,7 +84,7 @@ namespace Physics if (serializeContext) { serializeContext->Class() - ->Version(2) + ->Version(3) ->Field("CollisionLayer", &CharacterConfiguration::m_collisionLayer) ->Field("CollisionGroupId", &CharacterConfiguration::m_collisionGroupId) ->Field("Material", &CharacterConfiguration::m_materialSelection) @@ -94,6 +94,7 @@ namespace Physics ->Field("MinDistance", &CharacterConfiguration::m_minimumMovementDistance) ->Field("MaxSpeed", &CharacterConfiguration::m_maximumSpeed) ->Field("ColliderTag", &CharacterConfiguration::m_colliderTag) + ->Field("ApplyMoveOnPhysicsTick", &CharacterConfiguration::m_applyMoveOnPhysicsTick) ; if (AZ::EditContext* editContext = serializeContext->GetEditContext()) @@ -127,6 +128,9 @@ namespace Physics ->Attribute(AZ::Edit::Attributes::Step, 1.0f) ->DataElement(AZ::Edit::UIHandlers::Default, &CharacterConfiguration::m_colliderTag, "Collider Tag", "Used to identify the collider associated with the character controller") + ->DataElement(AZ::Edit::UIHandlers::Default, &CharacterConfiguration::m_applyMoveOnPhysicsTick, + "Apply Move On Tick", "Requests to add velocity will be accumulated and applied once on the physics pre-simulation tick " + "If unticked, explicit call to apply requested velocity is required") ; } } diff --git a/Code/Framework/AzFramework/AzFramework/Physics/Character.h b/Code/Framework/AzFramework/AzFramework/Physics/Character.h index ac46120879..e822736fd8 100644 --- a/Code/Framework/AzFramework/AzFramework/Physics/Character.h +++ b/Code/Framework/AzFramework/AzFramework/Physics/Character.h @@ -76,6 +76,7 @@ namespace Physics AZStd::string m_colliderTag; //!< Used to identify the collider associated with the character controller. AZStd::shared_ptr m_shapeConfig; //!< The shape to use when creating the character controller. AZStd::vector> m_colliders; //!< The list of colliders to attach to the character controller. + bool m_applyMoveOnPhysicsTick = true; //!< Should accumulated velocity be applied on the physics tick. }; /// Basic implementation of common character-style needs as a WorldBody. Is not a full-functional ship-ready diff --git a/Code/Framework/AzFramework/AzFramework/Physics/Common/PhysicsSceneQueries.cpp b/Code/Framework/AzFramework/AzFramework/Physics/Common/PhysicsSceneQueries.cpp index 3ccf093e4f..02597123db 100644 --- a/Code/Framework/AzFramework/AzFramework/Physics/Common/PhysicsSceneQueries.cpp +++ b/Code/Framework/AzFramework/AzFramework/Physics/Common/PhysicsSceneQueries.cpp @@ -136,6 +136,7 @@ namespace AzPhysics ->Property("Distance", BehaviorValueProperty(&RayCastRequest::m_distance)) ->Property("Start", BehaviorValueProperty(&RayCastRequest::m_start)) ->Property("Direction", BehaviorValueProperty(&RayCastRequest::m_direction)) + ->Property("ReportMultipleHits", BehaviorValueProperty(&RayCastRequest::m_reportMultipleHits)) ; } } @@ -153,6 +154,45 @@ namespace AzPhysics ->Field("ReportMultipleHits", &ShapeCastRequest::m_reportMultipleHits) ; } + + if (auto* behaviorContext = azdynamic_cast(context)) + { + behaviorContext->Class("ShapeCastRequest") + ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) + ->Attribute(AZ::Script::Attributes::Module, "physics") + ->Attribute(AZ::Script::Attributes::Category, "PhysX") + ->Property("Distance", BehaviorValueProperty(&ShapeCastRequest::m_distance)) + ->Property("Start", BehaviorValueProperty(&ShapeCastRequest::m_start)) + ->Property("Direction", BehaviorValueProperty(&ShapeCastRequest::m_direction)) + ; + + behaviorContext->Method( + "CreateSphereCastRequest", + [](float radius, const AZ::Transform& startPose, const AZ::Vector3& direction, float distance, + SceneQuery::QueryType queryType, CollisionGroup collisionGroup) + { + return ShapeCastRequestHelpers::CreateSphereCastRequest( + radius, startPose, direction, distance, queryType, collisionGroup, nullptr); + }); + + behaviorContext->Method( + "CreateBoxCastRequest", + [](const AZ::Vector3& boxDimensions, const AZ::Transform& startPose, const AZ::Vector3& direction, float distance, + SceneQuery::QueryType queryType, CollisionGroup collisionGroup) + { + return ShapeCastRequestHelpers::CreateBoxCastRequest( + boxDimensions, startPose, direction, distance, queryType, collisionGroup, nullptr); + }); + + behaviorContext->Method( + "CreateCapsuleCastRequest", + [](float capsuleRadius, float capsuleHeight, const AZ::Transform& startPose, const AZ::Vector3& direction, float distance, + SceneQuery::QueryType queryType, CollisionGroup collisionGroup) + { + return ShapeCastRequestHelpers::CreateCapsuleCastRequest( + capsuleRadius, capsuleHeight, startPose, direction, distance, queryType, collisionGroup, nullptr); + }); + } } namespace ShapeCastRequestHelpers @@ -219,6 +259,40 @@ namespace AzPhysics ->Field("ShapeConfiguration", &OverlapRequest::m_shapeConfiguration) ; } + + if (auto* behaviorContext = azdynamic_cast(context)) + { + behaviorContext->Class("OverlapRequest") + ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) + ->Attribute(AZ::Script::Attributes::Module, "physics") + ->Attribute(AZ::Script::Attributes::Category, "PhysX") + ->Property("Pose", BehaviorValueProperty(&OverlapRequest::m_pose)) + ; + + behaviorContext->Method( + "CreateSphereOverlapRequest", + [](float radius, const AZ::Transform& pose) + { + return OverlapRequestHelpers::CreateSphereOverlapRequest( + radius, pose, nullptr); + }); + + behaviorContext->Method( + "CreateBoxOverlapRequest", + [](const AZ::Vector3& boxDimensions, const AZ::Transform& pose) + { + return OverlapRequestHelpers::CreateBoxOverlapRequest( + boxDimensions, pose, nullptr); + }); + + behaviorContext->Method( + "CreateCapsuleOverlapRequest", + [](float height, float radius, const AZ::Transform& pose) + { + return OverlapRequestHelpers::CreateCapsuleOverlapRequest( + height, radius, pose, nullptr); + }); + } } namespace OverlapRequestHelpers diff --git a/Code/Framework/AzFramework/AzFramework/Physics/Material.cpp b/Code/Framework/AzFramework/AzFramework/Physics/Material.cpp index cdcdbe4655..05f41cc8da 100644 --- a/Code/Framework/AzFramework/AzFramework/Physics/Material.cpp +++ b/Code/Framework/AzFramework/AzFramework/Physics/Material.cpp @@ -504,7 +504,7 @@ namespace Physics } } - const AZ::Data::Asset& MaterialSelection::GetMaterialLibrary() + AZ::Data::Asset MaterialSelection::GetMaterialLibrary() { if (auto* physicsSystem = AZ::Interface::Get()) { @@ -516,7 +516,7 @@ namespace Physics return s_invalidMaterialLibrary; } - const AZ::Data::AssetId& MaterialSelection::GetMaterialLibraryId() + AZ::Data::AssetId MaterialSelection::GetMaterialLibraryId() { return GetMaterialLibrary().GetId(); } diff --git a/Code/Framework/AzFramework/AzFramework/Physics/Material.h b/Code/Framework/AzFramework/AzFramework/Physics/Material.h index bd15dd338e..455da207d1 100644 --- a/Code/Framework/AzFramework/AzFramework/Physics/Material.h +++ b/Code/Framework/AzFramework/AzFramework/Physics/Material.h @@ -306,8 +306,8 @@ namespace Physics void SyncSelectionToMaterialLibrary(); - static const AZ::Data::Asset& GetMaterialLibrary(); - static const AZ::Data::AssetId& GetMaterialLibraryId(); + static AZ::Data::Asset GetMaterialLibrary(); + static AZ::Data::AssetId GetMaterialLibraryId(); bool AreMaterialSlotsReadOnly() const; diff --git a/Code/Framework/AzFramework/AzFramework/Physics/PhysicsScene.cpp b/Code/Framework/AzFramework/AzFramework/Physics/PhysicsScene.cpp index 7840d10a6c..1b8117bd3e 100644 --- a/Code/Framework/AzFramework/AzFramework/Physics/PhysicsScene.cpp +++ b/Code/Framework/AzFramework/AzFramework/Physics/PhysicsScene.cpp @@ -48,6 +48,7 @@ namespace AzPhysics ->Attribute(AZ::Script::Attributes::Category, "Physics") ->Method("GetOnGravityChangeEvent", getOnGravityChange) ->Attribute(AZ::Script::Attributes::AzEventDescription, gravityChangedEventDescription) + ->Method("QueryScene", &Scene::QueryScene) ; } } diff --git a/Code/Framework/AzFramework/AzFramework/Physics/PhysicsSystem.cpp b/Code/Framework/AzFramework/AzFramework/Physics/PhysicsSystem.cpp index 4d41ab13b4..06f1802cc9 100644 --- a/Code/Framework/AzFramework/AzFramework/Physics/PhysicsSystem.cpp +++ b/Code/Framework/AzFramework/AzFramework/Physics/PhysicsSystem.cpp @@ -41,7 +41,7 @@ namespace AzPhysics {"Tick time"} // Parameters }; - behaviorContext->Class("System Interface") + behaviorContext->Class("PhysicsSystemInterface") ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) ->Attribute(AZ::Script::Attributes::Module, "physics") ->Attribute(AZ::Script::Attributes::Category, "PhysX") @@ -49,7 +49,21 @@ namespace AzPhysics ->Attribute(AZ::Script::Attributes::AzEventDescription, presimulateEventDescription) ->Method("GetOnPostsimulateEvent", getOnPostsimulateEvent) ->Attribute(AZ::Script::Attributes::AzEventDescription, postsimulateEventDescription) - ; + ->Method("GetSceneHandle", &SystemInterface::GetSceneHandle) + ->Method("GetScene", &SystemInterface::GetScene); + + behaviorContext->Method( + "GetPhysicsSystem", + []() + { + return AZ::Interface::Get(); + }); + + behaviorContext + ->Constant("DefaultPhysicsSceneName", BehaviorConstant(DefaultPhysicsSceneName)) + ->Constant("DefaultPhysicsSceneId", BehaviorConstant(DefaultPhysicsSceneId)) + ->Constant("EditorPhysicsSceneName", BehaviorConstant(EditorPhysicsSceneName)) + ->Constant("EditorPhysicsSceneId", BehaviorConstant(EditorPhysicsSceneId)); } } } // namespace AzPhysics diff --git a/Code/Framework/AzFramework/AzFramework/Session/ISessionHandlingRequests.h b/Code/Framework/AzFramework/AzFramework/Session/ISessionHandlingRequests.h index c7d32739f2..694dcb7b72 100644 --- a/Code/Framework/AzFramework/AzFramework/Session/ISessionHandlingRequests.h +++ b/Code/Framework/AzFramework/AzFramework/Session/ISessionHandlingRequests.h @@ -27,7 +27,7 @@ namespace AzFramework AZStd::string m_ipAddress; // The port number for the session. - uint16_t m_port; + uint16_t m_port = 0; }; //! SessionConnectionConfig @@ -35,7 +35,7 @@ namespace AzFramework struct PlayerConnectionConfig { // A unique identifier for player connection. - uint32_t m_playerConnectionId; + uint32_t m_playerConnectionId = 0; // A unique identifier for registered player in session. AZStd::string m_playerSessionId; diff --git a/Code/Framework/AzFramework/AzFramework/Session/ISessionRequests.h b/Code/Framework/AzFramework/AzFramework/Session/ISessionRequests.h index ae2896c337..a3262d0eb9 100644 --- a/Code/Framework/AzFramework/AzFramework/Session/ISessionRequests.h +++ b/Code/Framework/AzFramework/AzFramework/Session/ISessionRequests.h @@ -37,7 +37,7 @@ namespace AzFramework AZStd::string m_sessionName; // The maximum number of players that can be connected simultaneously to the session. - uint64_t m_maxPlayer; + uint64_t m_maxPlayer = 0; }; //! SearchSessionsRequest @@ -58,7 +58,7 @@ namespace AzFramework AZStd::string m_sortExpression; // The maximum number of results to return. - uint8_t m_maxResult; + uint8_t m_maxResult = 0; // A token that indicates the start of the next sequential page of results. AZStd::string m_nextToken; diff --git a/Code/Framework/AzFramework/AzFramework/Session/SessionConfig.h b/Code/Framework/AzFramework/AzFramework/Session/SessionConfig.h index 17f61317e6..5f7f736514 100644 --- a/Code/Framework/AzFramework/AzFramework/Session/SessionConfig.h +++ b/Code/Framework/AzFramework/AzFramework/Session/SessionConfig.h @@ -24,10 +24,10 @@ namespace AzFramework virtual ~SessionConfig() = default; // A time stamp indicating when this session was created. Format is a number expressed in Unix time as milliseconds. - uint64_t m_creationTime; + uint64_t m_creationTime = 0; // A time stamp indicating when this data object was terminated. Same format as creation time. - uint64_t m_terminationTime; + uint64_t m_terminationTime = 0; // A unique identifier for a player or entity creating the session. AZStd::string m_creatorId; @@ -48,13 +48,13 @@ namespace AzFramework AZStd::string m_ipAddress; // The port number for the session. - uint16_t m_port; + uint16_t m_port = 0; // The maximum number of players that can be connected simultaneously to the session. - uint64_t m_maxPlayer; + uint64_t m_maxPlayer = 0; // Number of players currently in the session. - uint64_t m_currentPlayer; + uint64_t m_currentPlayer = 0; // Current status of the session. AZStd::string m_status; diff --git a/Code/Framework/AzFramework/AzFramework/Viewport/CameraInput.cpp b/Code/Framework/AzFramework/AzFramework/Viewport/CameraInput.cpp index 3658f9cd22..0516cdd591 100644 --- a/Code/Framework/AzFramework/AzFramework/Viewport/CameraInput.cpp +++ b/Code/Framework/AzFramework/AzFramework/Viewport/CameraInput.cpp @@ -747,19 +747,24 @@ namespace AzFramework return button == inputChannelId; }); - if (inputChannelId == InputDeviceMouse::Movement::X) + // accept active mouse channel updates, inactive movement channels will just have a 0 delta + if (inputChannel.IsActive()) { - return HorizontalMotionEvent{ aznumeric_cast(inputChannel.GetValue()) }; + if (inputChannelId == InputDeviceMouse::Movement::X) + { + return HorizontalMotionEvent{ aznumeric_cast(inputChannel.GetValue()) }; + } + else if (inputChannelId == InputDeviceMouse::Movement::Y) + { + return VerticalMotionEvent{ aznumeric_cast(inputChannel.GetValue()) }; + } + else if (inputChannelId == InputDeviceMouse::Movement::Z) + { + return ScrollEvent{ inputChannel.GetValue() }; + } } - else if (inputChannelId == InputDeviceMouse::Movement::Y) - { - return VerticalMotionEvent{ aznumeric_cast(inputChannel.GetValue()) }; - } - else if (inputChannelId == InputDeviceMouse::Movement::Z) - { - return ScrollEvent{ inputChannel.GetValue() }; - } - else if (wasMouseButton || InputDeviceKeyboard::IsKeyboardDevice(inputDeviceId)) + + if (wasMouseButton || InputDeviceKeyboard::IsKeyboardDevice(inputDeviceId)) { return DiscreteInputEvent{ inputChannelId, inputChannel.GetState() }; } diff --git a/Code/Framework/AzFramework/AzFramework/Windowing/NativeWindow.cpp b/Code/Framework/AzFramework/AzFramework/Windowing/NativeWindow.cpp index b92d8dc3bc..3e7d67888f 100644 --- a/Code/Framework/AzFramework/AzFramework/Windowing/NativeWindow.cpp +++ b/Code/Framework/AzFramework/AzFramework/Windowing/NativeWindow.cpp @@ -116,6 +116,11 @@ namespace AzFramework SetFullScreenState(!GetFullScreenState()); } + float NativeWindow::GetDpiScaleFactor() const + { + return m_pimpl->GetDpiScaleFactor(); + } + /*static*/ bool NativeWindow::GetFullScreenStateOfDefaultWindow() { NativeWindowHandle defaultWindowHandle = nullptr; @@ -228,4 +233,10 @@ namespace AzFramework return false; } + float NativeWindow::Implementation::GetDpiScaleFactor() const + { + // For platforms that aren't DPI-aware, we simply return a 1.0 ratio for no scaling + return 1.0f; + } + } // namespace AzFramework diff --git a/Code/Framework/AzFramework/AzFramework/Windowing/NativeWindow.h b/Code/Framework/AzFramework/AzFramework/Windowing/NativeWindow.h index 0b53b5b31c..2d5a897146 100644 --- a/Code/Framework/AzFramework/AzFramework/Windowing/NativeWindow.h +++ b/Code/Framework/AzFramework/AzFramework/Windowing/NativeWindow.h @@ -128,6 +128,7 @@ namespace AzFramework void SetFullScreenState(bool fullScreenState) override; bool CanToggleFullScreenState() const override; void ToggleFullScreenState() override; + float GetDpiScaleFactor() const override; //! Get the full screen state of the default window. //! \return True if the default window is currently in full screen, false otherwise. @@ -169,6 +170,7 @@ namespace AzFramework virtual bool GetFullScreenState() const; virtual void SetFullScreenState(bool fullScreenState); virtual bool CanToggleFullScreenState() const; + virtual float GetDpiScaleFactor() const; protected: uint32_t m_width = 0; diff --git a/Code/Framework/AzFramework/AzFramework/Windowing/WindowBus.h b/Code/Framework/AzFramework/AzFramework/Windowing/WindowBus.h index 959d7cc07b..f21993b80a 100644 --- a/Code/Framework/AzFramework/AzFramework/Windowing/WindowBus.h +++ b/Code/Framework/AzFramework/AzFramework/Windowing/WindowBus.h @@ -68,6 +68,11 @@ namespace AzFramework //! Toggle the full screen state of the window. virtual void ToggleFullScreenState() = 0; + + //! Returns a scalar multiplier representing how many dots-per-inch this window has, compared + //! to a "standard" value of 96, the default for Windows in a DPI unaware setting. This can + //! be used to scale user interface elements to ensure legibility on high density displays. + virtual float GetDpiScaleFactor() const = 0; }; using WindowRequestBus = AZ::EBus; @@ -87,6 +92,9 @@ namespace AzFramework //! This is called once when the window is Activated and also called if the user resizes the window. virtual void OnWindowResized(uint32_t width, uint32_t height) { AZ_UNUSED(width); AZ_UNUSED(height); }; + //! This is called if the window's underyling DPI scaling factor changes. + virtual void OnDpiScaleFactorChanged(float dpiScaleFactor) { AZ_UNUSED(dpiScaleFactor); } + //! This is called when the window is deactivated from code or if the user closes the window. virtual void OnWindowClosed() {}; }; diff --git a/Code/Framework/AzFramework/Platform/Linux/AzFramework/AzFramework_Traits_Linux.h b/Code/Framework/AzFramework/Platform/Linux/AzFramework/AzFramework_Traits_Linux.h index 98893e2d01..2cf5b3f87e 100644 --- a/Code/Framework/AzFramework/Platform/Linux/AzFramework/AzFramework_Traits_Linux.h +++ b/Code/Framework/AzFramework/Platform/Linux/AzFramework/AzFramework_Traits_Linux.h @@ -12,5 +12,5 @@ #define AZ_TRAIT_AZFRAMEWORK_USE_ERRNO_T_TYPEDEF 1 #define AZ_TRAIT_AZFRAMEWORK_USE_POSIX_LOCALTIME_R 0 #define AZ_TRAIT_AZFRAMEWORK_PYTHON_SHELL "python.sh" -#define AZ_TRAIT_AZFRAMEWORK_USE_PROJECT_MANAGER 0 +#define AZ_TRAIT_AZFRAMEWORK_USE_PROJECT_MANAGER 1 #define AZ_TRAIT_AZFRAMEWORK_PROCESSLAUNCH_DEFAULT 0 diff --git a/Code/Framework/AzFramework/Platform/Mac/AzFramework/AzFramework_Traits_Mac.h b/Code/Framework/AzFramework/Platform/Mac/AzFramework/AzFramework_Traits_Mac.h index 6af4294a5c..73f6d212d4 100644 --- a/Code/Framework/AzFramework/Platform/Mac/AzFramework/AzFramework_Traits_Mac.h +++ b/Code/Framework/AzFramework/Platform/Mac/AzFramework/AzFramework_Traits_Mac.h @@ -12,5 +12,5 @@ #define AZ_TRAIT_AZFRAMEWORK_USE_ERRNO_T_TYPEDEF 0 #define AZ_TRAIT_AZFRAMEWORK_USE_POSIX_LOCALTIME_R 1 #define AZ_TRAIT_AZFRAMEWORK_PYTHON_SHELL "python.sh" -#define AZ_TRAIT_AZFRAMEWORK_USE_PROJECT_MANAGER 0 +#define AZ_TRAIT_AZFRAMEWORK_USE_PROJECT_MANAGER 1 #define AZ_TRAIT_AZFRAMEWORK_PROCESSLAUNCH_DEFAULT 0 diff --git a/Code/Framework/AzFramework/Platform/Windows/AzFramework/Windowing/NativeWindow_Windows.cpp b/Code/Framework/AzFramework/Platform/Windows/AzFramework/Windowing/NativeWindow_Windows.cpp index 44a3757aea..470594853c 100644 --- a/Code/Framework/AzFramework/Platform/Windows/AzFramework/Windowing/NativeWindow_Windows.cpp +++ b/Code/Framework/AzFramework/Platform/Windows/AzFramework/Windowing/NativeWindow_Windows.cpp @@ -8,6 +8,7 @@ #include #include +#include #include namespace AzFramework @@ -17,7 +18,7 @@ namespace AzFramework { public: AZ_CLASS_ALLOCATOR(NativeWindowImpl_Win32, AZ::SystemAllocator, 0); - NativeWindowImpl_Win32() = default; + NativeWindowImpl_Win32(); ~NativeWindowImpl_Win32() override; // NativeWindow::Implementation overrides... @@ -33,6 +34,7 @@ namespace AzFramework bool GetFullScreenState() const override; void SetFullScreenState(bool fullScreenState) override; bool CanToggleFullScreenState() const override { return true; } + float GetDpiScaleFactor() const override; private: static DWORD ConvertToWin32WindowStyleMask(const WindowStyleMasks& styleMasks); @@ -49,6 +51,9 @@ namespace AzFramework RECT m_windowRectToRestoreOnFullScreenExit; //!< The position and size of the window to restore when exiting full screen. UINT m_windowStyleToRestoreOnFullScreenExit; //!< The style(s) of the window to restore when exiting full screen. bool m_isInBorderlessWindowFullScreenState = false; //!< Was a borderless window used to enter full screen state? + + using GetDpiForWindowType = UINT(HWND hwnd); + GetDpiForWindowType* m_getDpiFunction = nullptr; }; const char* NativeWindowImpl_Win32::s_defaultClassName = "O3DEWin32Class"; @@ -58,6 +63,15 @@ namespace AzFramework return aznew NativeWindowImpl_Win32(); } + NativeWindowImpl_Win32::NativeWindowImpl_Win32() + { + // Attempt to load GetDpiForWindow from user32 at runtime, available on Windows 10+ versions >= 1607 + if (auto user32module = AZ::DynamicModuleHandle::Create("user32"); user32module->Load(false)) + { + m_getDpiFunction = user32module->GetFunction("GetDpiForWindow"); + } + } + NativeWindowImpl_Win32::~NativeWindowImpl_Win32() { DestroyWindow(m_win32Handle); @@ -237,6 +251,12 @@ namespace AzFramework // Send all other WM_SYSKEYDOWN messages to the default WndProc. break; } + case WM_DPICHANGED: + { + const float newScaleFactor = nativeWindowImpl->GetDpiScaleFactor(); + WindowNotificationBus::Event(nativeWindowImpl->GetWindowHandle(), &WindowNotificationBus::Events::OnDpiScaleFactorChanged, newScaleFactor); + break; + } default: return DefWindowProc(hWnd, message, wParam, lParam); break; @@ -330,6 +350,17 @@ namespace AzFramework } } + float NativeWindowImpl_Win32::GetDpiScaleFactor() const + { + constexpr UINT defaultDotsPerInch = 96; + UINT dotsPerInch = defaultDotsPerInch; + if (m_getDpiFunction) + { + dotsPerInch = m_getDpiFunction(m_win32Handle); + } + return aznumeric_cast(dotsPerInch) / aznumeric_cast(defaultDotsPerInch); + } + void NativeWindowImpl_Win32::EnterBorderlessWindowFullScreen() { if (m_isInBorderlessWindowFullScreenState) diff --git a/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpSocketManager_Select.cpp b/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpSocketManager_Select.cpp index 130739ca39..651eff820e 100644 --- a/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpSocketManager_Select.cpp +++ b/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpSocketManager_Select.cpp @@ -41,7 +41,7 @@ namespace AzNetworking void TcpSocketManager::ProcessEvents(AZ::TimeMs maxBlockMs, const SocketEventCallback& readCallback, const SocketEventCallback& writeCallback) { - if(static_cast(m_maxFd) <= 0 && m_socketFds.empty()) + if(static_cast(m_maxFd) <= 0 || m_socketFds.empty()) { // There are no available sockets to process return; diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp index 4c5e2adabd..7417bed2a0 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp @@ -3288,15 +3288,20 @@ namespace AzQtComponents } // Untab tabbed dock widgets before restoring, as the restore only works on dock widgets parented directly to the main window - const QList dockWidgets = m_mainWindow->findChildren(); - for (QDockWidget* dockWidget : dockWidgets) + for (QDockWidget* dockWidget : m_mainWindow->findChildren( + QRegularExpression(QString("%1.*").arg(m_tabContainerIdentifierPrefix)), Qt::FindChildrenRecursively)) { - if (QStackedWidget* stackedWidget = qobject_cast(dockWidget->parentWidget())) + DockTabWidget* tabWidget = qobject_cast(dockWidget->widget()); + if (!tabWidget) { - if (AzQtComponents::DockTabWidget* tabWidget = qobject_cast(stackedWidget->parentWidget())) - { - tabWidget->removeTab(dockWidget); - } + continue; + } + + // Remove the tabs from the tab widget (we don't actually want to close them, which could delete them at this point) + int numTabs = tabWidget->count(); + for (int i = 0; i < numTabs; ++i) + { + tabWidget->removeTab(0); } } diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/Style.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/Style.cpp index 3356955ae7..05de144ff5 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/Style.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/Style.cpp @@ -1303,6 +1303,10 @@ namespace AzQtComponents } break; + case QStyle::SP_MessageBoxInformation: + return QIcon(QString::fromUtf8(":/stylesheet/img/UI20/Info.svg")); + break; + default: break; } diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/BaseStyleSheet.qss b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/BaseStyleSheet.qss index 894b2921d4..3499404572 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/BaseStyleSheet.qss +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/BaseStyleSheet.qss @@ -123,6 +123,7 @@ QPlainTextEdit:focus @import "LineEdit.qss"; @import "Menu.qss"; @import "MenuBar.qss"; +@import "MessageBox.qss"; @import "ProgressBar.qss"; @import "PushButton.qss"; @import "QDockWidget.qss"; diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/MessageBox.qss b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/MessageBox.qss new file mode 100644 index 0000000000..81aa7fd8d8 --- /dev/null +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/MessageBox.qss @@ -0,0 +1,21 @@ + +/* + * Copyright (c) Contributors to the Open 3D Engine Project + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + + /* correct the padding around the two main labels to give space at the borders */ +QMessageBox QLabel#qt_msgbox_label +{ + padding-top: 20px; + padding-right: 20px; + padding-bottom: 20px; +} + +QMessageBox QLabel#qt_msgboxex_icon_label +{ + padding-left: 20px; + padding-top: 20px; +} diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/resources.qrc b/Code/Framework/AzQtComponents/AzQtComponents/Components/resources.qrc index 20a25f8fcb..909510d63b 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/resources.qrc +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/resources.qrc @@ -354,17 +354,17 @@ img/UI20/toolbar/Grid.svg img/UI20/toolbar/Lighting.svg img/UI20/toolbar/Load.svg - img/UI20/toolbar/Local.svg + img/UI20/toolbar/Local.svg img/UI20/toolbar/Locked.svg img/UI20/toolbar/Locked_Status.svg - img/UI20/toolbar/LUA.svg + img/UI20/toolbar/LUA.svg img/UI20/toolbar/Material.svg img/UI20/toolbar/Measure.svg img/UI20/toolbar/Move.svg img/UI20/toolbar/Object_follow_terrain.svg img/UI20/toolbar/Object_height.svg img/UI20/toolbar/Object_list.svg - img/UI20/toolbar/Parent.svg + img/UI20/toolbar/Parent.svg img/UI20/toolbar/particle.svg img/UI20/toolbar/Play.svg img/UI20/toolbar/Redo.svg @@ -385,7 +385,7 @@ img/UI20/toolbar/undo.svg img/UI20/toolbar/Unlocked.svg img/UI20/toolbar/Vertex_snapping.svg - img/UI20/toolbar/World.svg + img/UI20/toolbar/World.svg img/UI20/toolbar/X_axis.svg img/UI20/toolbar/Y_axis.svg img/UI20/toolbar/Z_axis.svg @@ -459,6 +459,7 @@ Widgets/ComboBoxConfig.ini Widgets/Menu.qss Widgets/MenuBar.qss + Widgets/MessageBox.qss Widgets/ProgressBarConfig.ini Widgets/ProgressBar.qss Widgets/PushButton.qss diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/API/EditorWindowRequestBus.h b/Code/Framework/AzToolsFramework/AzToolsFramework/API/EditorWindowRequestBus.h index 03bb76b03a..ef4d2deb5e 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/API/EditorWindowRequestBus.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/API/EditorWindowRequestBus.h @@ -36,8 +36,47 @@ namespace AzToolsFramework /// Retrieve the main application window. virtual QWidget* GetAppMainWindow() { return nullptr; } }; - using EditorWindowRequestBus = AZ::EBus; + + class EditorWindowUIRequests : public AZ::EBusTraits + { + public: + using Bus = AZ::EBus; + + ////////////////////////////////////////////////////////////////////////// + // EBusTraits overrides + static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Multiple; + ////////////////////////////////////////////////////////////////////////// + + /// Enable/Disable the Editor UI. + virtual void SetEditorUiEnabled([[maybe_unused]] bool enable) {} + }; + using EditorWindowUIRequestBus = AZ::EBus; + + using EnableUiFunction = AZStd::function; + + /// Helper for EditorWindowRequests to be used as a + /// member instead of inheriting from EBus directly. + class EditorWindowRequestBusImpl + : public EditorWindowUIRequestBus::Handler + { + public: + /// Set the function to be called when entering ImGui Mode. + void SetEnableEditorUiFunc(const EnableUiFunction enableEditorUiFunc) + { + m_enableEditorUiFunc = AZStd::move(enableEditorUiFunc); + } + + private: + // EditorWindowRequestBus + void SetEditorUiEnabled( [[maybe_unused]] bool enable) override + { + m_enableEditorUiFunc(enable); + } + + EnableUiFunction m_enableEditorUiFunc; ///< Function to call when entering ImGui Mode. + }; + } // namespace AzToolsFramework #endif // AZTOOLSFRAMEWORK_EDITORWINDOWREQUESTBUS_H diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Views/AssetBrowserTreeView.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Views/AssetBrowserTreeView.cpp index 9db1e2e170..f89bd285de 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Views/AssetBrowserTreeView.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Views/AssetBrowserTreeView.cpp @@ -222,6 +222,21 @@ namespace AzToolsFramework void AssetBrowserTreeView::UpdateAfterFilter(bool hasFilter, bool selectFirstValidEntry) { + const QModelIndexList& selectedIndexes = selectionModel()->selectedRows(); + + // If we've cleared the filter but had something selected, ensure it stays selected and visible. + if (!hasFilter && !selectedIndexes.isEmpty()) + { + QModelIndex curIndex = selectedIndexes[0]; + m_expandToEntriesByDefault = true; + m_treeStateSaver->ApplySnapshot(); + + setCurrentIndex(curIndex); + scrollTo(curIndex); + + return; + } + // Flag our default expansion state so that we expand down to source entries after filtering m_expandToEntriesByDefault = hasFilter; // Then ask our state saver to apply its current snapshot again, falling back on asking us if entries should be expanded or not diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipService.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipService.cpp index 8c541a2392..9dce8ff946 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipService.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipService.cpp @@ -597,22 +597,23 @@ namespace AzToolsFramework { if (m_rootInstance && m_playInEditorData.m_isEnabled) { - auto end = m_playInEditorData.m_deactivatedEntities.rend(); - for (auto it = m_playInEditorData.m_deactivatedEntities.rbegin(); it != end; ++it) - { - AZ_Assert(*it, "Invalid entity added to list for re-activation after play-in-editor stopped."); - (*it)->Activate(); - } - m_playInEditorData.m_deactivatedEntities.clear(); - AZ_Assert(m_playInEditorData.m_entities.IsSet(), "Invalid Game Mode Entities Container encountered after play-in-editor stopped. " "Confirm that the container was initialized correctly"); m_playInEditorData.m_entities.DespawnAllEntities(); m_playInEditorData.m_entities.Alert( - [assets = AZStd::move(m_playInEditorData.m_assets)]([[maybe_unused]]uint32_t generation) mutable + [assets = AZStd::move(m_playInEditorData.m_assets), + deactivatedEntities = AZStd::move(m_playInEditorData.m_deactivatedEntities)] + ([[maybe_unused]]uint32_t generation) mutable { + auto end = deactivatedEntities.rend(); + for (auto it = deactivatedEntities.rbegin(); it != end; ++it) + { + AZ_Assert(*it, "Invalid entity added to list for re-activation after play-in-editor stopped."); + (*it)->Activate(); + } + for (auto& asset : assets) { if (asset) @@ -624,13 +625,21 @@ namespace AzToolsFramework } } AZ::ScriptSystemRequestBus::Broadcast(&AZ::ScriptSystemRequests::GarbageCollect); + + // This is a workaround until the replacement for GameEntityContext is done + AzFramework::GameEntityContextEventBus::Broadcast(&AzFramework::GameEntityContextEventBus::Events::OnGameEntitiesReset); }); m_playInEditorData.m_entities.Clear(); - - // This is a workaround until the replacement for GameEntityContext is done - AzFramework::GameEntityContextEventBus::Broadcast(&AzFramework::GameEntityContextEventBus::Events::OnGameEntitiesReset); } + // Game entity cleanup is queued onto the next tick via the DespawnEntities call. + // To avoid both game entities and Editor entities active at the same time + // we flush the tick queue to ensure the game entities are cleared first. + // The Alert callback that follows the DespawnEntities call will then reactivate the editor entities + // This should be considered temporary as a move to a less rigid event sequence that supports async entity clean up + // is the desired direction forward. + AZ::TickBus::ExecuteQueuedEvents(); + m_playInEditorData.m_isEnabled = false; } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputManager.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputManager.cpp new file mode 100644 index 0000000000..eb5034fdd5 --- /dev/null +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputManager.cpp @@ -0,0 +1,397 @@ +/* + * 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 AzToolsFramework +{ + void QtEventToAzInputMapper::InitializeKeyMappings() + { + // This assumes modifier keys (ctrl/shift/alt) map to the left control/shift/alt keys as Qt provides no way to disambiguate + // in a platform agnostic manner. This could be expanded later with a PAL mapping from native scan codes acquired from + // QKeyEvents, if needed. + m_keyMappings = { { + { Qt::Key_0, AzFramework::InputDeviceKeyboard::Key::Alphanumeric0 }, + { Qt::Key_1, AzFramework::InputDeviceKeyboard::Key::Alphanumeric1 }, + { Qt::Key_2, AzFramework::InputDeviceKeyboard::Key::Alphanumeric2 }, + { Qt::Key_3, AzFramework::InputDeviceKeyboard::Key::Alphanumeric3 }, + { Qt::Key_4, AzFramework::InputDeviceKeyboard::Key::Alphanumeric4 }, + { Qt::Key_5, AzFramework::InputDeviceKeyboard::Key::Alphanumeric5 }, + { Qt::Key_6, AzFramework::InputDeviceKeyboard::Key::Alphanumeric6 }, + { Qt::Key_7, AzFramework::InputDeviceKeyboard::Key::Alphanumeric7 }, + { Qt::Key_8, AzFramework::InputDeviceKeyboard::Key::Alphanumeric8 }, + { Qt::Key_9, AzFramework::InputDeviceKeyboard::Key::Alphanumeric9 }, + { Qt::Key_A, AzFramework::InputDeviceKeyboard::Key::AlphanumericA }, + { Qt::Key_B, AzFramework::InputDeviceKeyboard::Key::AlphanumericB }, + { Qt::Key_C, AzFramework::InputDeviceKeyboard::Key::AlphanumericC }, + { Qt::Key_D, AzFramework::InputDeviceKeyboard::Key::AlphanumericD }, + { Qt::Key_E, AzFramework::InputDeviceKeyboard::Key::AlphanumericE }, + { Qt::Key_F, AzFramework::InputDeviceKeyboard::Key::AlphanumericF }, + { Qt::Key_G, AzFramework::InputDeviceKeyboard::Key::AlphanumericG }, + { Qt::Key_H, AzFramework::InputDeviceKeyboard::Key::AlphanumericH }, + { Qt::Key_I, AzFramework::InputDeviceKeyboard::Key::AlphanumericI }, + { Qt::Key_J, AzFramework::InputDeviceKeyboard::Key::AlphanumericJ }, + { Qt::Key_K, AzFramework::InputDeviceKeyboard::Key::AlphanumericK }, + { Qt::Key_L, AzFramework::InputDeviceKeyboard::Key::AlphanumericL }, + { Qt::Key_M, AzFramework::InputDeviceKeyboard::Key::AlphanumericM }, + { Qt::Key_N, AzFramework::InputDeviceKeyboard::Key::AlphanumericN }, + { Qt::Key_O, AzFramework::InputDeviceKeyboard::Key::AlphanumericO }, + { Qt::Key_P, AzFramework::InputDeviceKeyboard::Key::AlphanumericP }, + { Qt::Key_Q, AzFramework::InputDeviceKeyboard::Key::AlphanumericQ }, + { Qt::Key_R, AzFramework::InputDeviceKeyboard::Key::AlphanumericR }, + { Qt::Key_S, AzFramework::InputDeviceKeyboard::Key::AlphanumericS }, + { Qt::Key_T, AzFramework::InputDeviceKeyboard::Key::AlphanumericT }, + { Qt::Key_U, AzFramework::InputDeviceKeyboard::Key::AlphanumericU }, + { Qt::Key_V, AzFramework::InputDeviceKeyboard::Key::AlphanumericV }, + { Qt::Key_W, AzFramework::InputDeviceKeyboard::Key::AlphanumericW }, + { Qt::Key_X, AzFramework::InputDeviceKeyboard::Key::AlphanumericX }, + { Qt::Key_Y, AzFramework::InputDeviceKeyboard::Key::AlphanumericY }, + { Qt::Key_Z, AzFramework::InputDeviceKeyboard::Key::AlphanumericZ }, + { Qt::Key_Backspace, AzFramework::InputDeviceKeyboard::Key::EditBackspace }, + { Qt::Key_CapsLock, AzFramework::InputDeviceKeyboard::Key::EditCapsLock }, + { Qt::Key_Enter, AzFramework::InputDeviceKeyboard::Key::EditEnter }, + { Qt::Key_Space, AzFramework::InputDeviceKeyboard::Key::EditSpace }, + { Qt::Key_Tab, AzFramework::InputDeviceKeyboard::Key::EditTab }, + { Qt::Key_Escape, AzFramework::InputDeviceKeyboard::Key::Escape }, + { Qt::Key_F1, AzFramework::InputDeviceKeyboard::Key::Function01 }, + { Qt::Key_F2, AzFramework::InputDeviceKeyboard::Key::Function02 }, + { Qt::Key_F3, AzFramework::InputDeviceKeyboard::Key::Function03 }, + { Qt::Key_F4, AzFramework::InputDeviceKeyboard::Key::Function04 }, + { Qt::Key_F5, AzFramework::InputDeviceKeyboard::Key::Function05 }, + { Qt::Key_F6, AzFramework::InputDeviceKeyboard::Key::Function06 }, + { Qt::Key_F7, AzFramework::InputDeviceKeyboard::Key::Function07 }, + { Qt::Key_F8, AzFramework::InputDeviceKeyboard::Key::Function08 }, + { Qt::Key_F9, AzFramework::InputDeviceKeyboard::Key::Function09 }, + { Qt::Key_F10, AzFramework::InputDeviceKeyboard::Key::Function10 }, + { Qt::Key_F11, AzFramework::InputDeviceKeyboard::Key::Function11 }, + { Qt::Key_F12, AzFramework::InputDeviceKeyboard::Key::Function12 }, + { Qt::Key_F13, AzFramework::InputDeviceKeyboard::Key::Function13 }, + { Qt::Key_F14, AzFramework::InputDeviceKeyboard::Key::Function14 }, + { Qt::Key_F15, AzFramework::InputDeviceKeyboard::Key::Function15 }, + { Qt::Key_F16, AzFramework::InputDeviceKeyboard::Key::Function16 }, + { Qt::Key_F17, AzFramework::InputDeviceKeyboard::Key::Function17 }, + { Qt::Key_F18, AzFramework::InputDeviceKeyboard::Key::Function18 }, + { Qt::Key_F19, AzFramework::InputDeviceKeyboard::Key::Function19 }, + { Qt::Key_F20, AzFramework::InputDeviceKeyboard::Key::Function20 }, + { Qt::Key_Alt, AzFramework::InputDeviceKeyboard::Key::ModifierAltL }, + { Qt::Key_Control, AzFramework::InputDeviceKeyboard::Key::ModifierCtrlL }, + { Qt::Key_Shift, AzFramework::InputDeviceKeyboard::Key::ModifierShiftL }, + { Qt::Key_Super_L, AzFramework::InputDeviceKeyboard::Key::ModifierSuperL }, + { Qt::Key_Super_R, AzFramework::InputDeviceKeyboard::Key::ModifierSuperR }, + { Qt::Key_Down, AzFramework::InputDeviceKeyboard::Key::NavigationArrowDown }, + { Qt::Key_Left, AzFramework::InputDeviceKeyboard::Key::NavigationArrowLeft }, + { Qt::Key_Right, AzFramework::InputDeviceKeyboard::Key::NavigationArrowRight }, + { Qt::Key_Up, AzFramework::InputDeviceKeyboard::Key::NavigationArrowUp }, + { Qt::Key_Delete, AzFramework::InputDeviceKeyboard::Key::NavigationDelete }, + { Qt::Key_End, AzFramework::InputDeviceKeyboard::Key::NavigationEnd }, + { Qt::Key_Home, AzFramework::InputDeviceKeyboard::Key::NavigationHome }, + { Qt::Key_Insert, AzFramework::InputDeviceKeyboard::Key::NavigationInsert }, + { Qt::Key_PageDown, AzFramework::InputDeviceKeyboard::Key::NavigationPageDown }, + { Qt::Key_PageUp, AzFramework::InputDeviceKeyboard::Key::NavigationPageUp }, + { Qt::Key_Apostrophe, AzFramework::InputDeviceKeyboard::Key::PunctuationApostrophe }, + { Qt::Key_Backslash, AzFramework::InputDeviceKeyboard::Key::PunctuationBackslash }, + { Qt::Key_BracketLeft, AzFramework::InputDeviceKeyboard::Key::PunctuationBracketL }, + { Qt::Key_BracketRight, AzFramework::InputDeviceKeyboard::Key::PunctuationBracketR }, + { Qt::Key_Comma, AzFramework::InputDeviceKeyboard::Key::PunctuationComma }, + { Qt::Key_Equal, AzFramework::InputDeviceKeyboard::Key::PunctuationEquals }, + { Qt::Key_hyphen, AzFramework::InputDeviceKeyboard::Key::PunctuationHyphen }, + { Qt::Key_Period, AzFramework::InputDeviceKeyboard::Key::PunctuationPeriod }, + { Qt::Key_Semicolon, AzFramework::InputDeviceKeyboard::Key::PunctuationSemicolon }, + { Qt::Key_Slash, AzFramework::InputDeviceKeyboard::Key::PunctuationSlash }, + { Qt::Key_QuoteLeft, AzFramework::InputDeviceKeyboard::Key::PunctuationTilde }, + { Qt::Key_Pause, AzFramework::InputDeviceKeyboard::Key::WindowsSystemPause }, + { Qt::Key_Print, AzFramework::InputDeviceKeyboard::Key::WindowsSystemPrint }, + { Qt::Key_ScrollLock, AzFramework::InputDeviceKeyboard::Key::WindowsSystemScrollLock }, + } }; + } + + void QtEventToAzInputMapper::InitializeMouseButtonMappings() + { + m_mouseButtonMappings = { { + { Qt::MouseButton::LeftButton, AzFramework::InputDeviceMouse::Button::Left }, + { Qt::MouseButton::RightButton, AzFramework::InputDeviceMouse::Button::Right }, + { Qt::MouseButton::MiddleButton, AzFramework::InputDeviceMouse::Button::Middle }, + { Qt::MouseButton::ExtraButton1, AzFramework::InputDeviceMouse::Button::Other1 }, + { Qt::MouseButton::ExtraButton2, AzFramework::InputDeviceMouse::Button::Other2 }, + } }; + } + + // Currently this is only set for modifier keys. + // This should only be expanded sparingly, any keys handled here will not be bubbled up to the shortcut system. + // ex: If Key_S was here, the viewport would consume S key presses before the application could process a QAction with a Ctrl+S + // shortcut. + void QtEventToAzInputMapper::InitializeHighPriorityKeys() + { + m_highPriorityKeys = { Qt::Key_Alt, Qt::Key_Control, Qt::Key_Shift, Qt::Key_Super_L, Qt::Key_Super_R }; + } + + QtEventToAzInputMapper::EditorQtKeyboardDevice::EditorQtKeyboardDevice(AzFramework::InputDeviceId id) + : AzFramework::InputDeviceKeyboard(id) + { + // Disable all platform native processing in favor of our Qt event handling + SetImplementation(nullptr); + } + + QtEventToAzInputMapper::EditorQtMouseDevice::EditorQtMouseDevice(AzFramework::InputDeviceId id) + : AzFramework::InputDeviceMouse(id) + { + // Disable all platform native processing in favor of our Qt event handling + SetImplementation(nullptr); + } + + QtEventToAzInputMapper::QtEventToAzInputMapper(QWidget* sourceWidget, int syntheticDeviceId) + : QObject(sourceWidget) + , m_sourceWidget(sourceWidget) + , m_keyboardModifiers(AZStd::make_shared()) + , m_cursorPosition(AZStd::make_shared()) + { + InitializeKeyMappings(); + InitializeMouseButtonMappings(); + InitializeHighPriorityKeys(); + + // Add an arbitrary offset to our device index to avoid collision with real physical device index. + // We still have to use the keyboard and mouse device channel names because input channels are only addressed + // by their own name and their device index, so overlapping input channels between devices would conflict. + constexpr AZ::u32 syntheticDeviceOffset = 1000; + const AzFramework::InputDeviceId keyboardDeviceId( + AzFramework::InputDeviceKeyboard::Id.GetName(), syntheticDeviceId + syntheticDeviceOffset); + const AzFramework::InputDeviceId mouseDeviceId( + AzFramework::InputDeviceMouse::Id.GetName(), syntheticDeviceId + syntheticDeviceOffset); + + m_keyboardDevice = AZStd::make_unique(keyboardDeviceId); + m_mouseDevice = AZStd::make_unique(mouseDeviceId); + + AddChannels(m_keyboardDevice->m_allChannelsById); + AddChannels(m_mouseDevice->m_allChannelsById); + + // Install a global event filter to ensure we don't miss mouse and key release events. + QApplication::instance()->installEventFilter(this); + } + + bool QtEventToAzInputMapper::HandlesInputEvent(const AzFramework::InputChannel& channel) const + { + const AzFramework::InputChannelId& channelId = channel.GetInputChannelId(); + if (channelId == AzFramework::InputDeviceMouse::Movement::X || channelId == AzFramework::InputDeviceMouse::Movement::Y) + { + return false; + } + + // We map keyboard and mouse events from Qt, so flag all events coming from those devices + // as handled by our synthetic event system. + const AzFramework::InputDeviceId& deviceId = channel.GetInputDevice().GetInputDeviceId(); + return deviceId.GetNameCrc32() == AzFramework::InputDeviceMouse::Id.GetNameCrc32() || + deviceId.GetNameCrc32() == AzFramework::InputDeviceKeyboard::Id.GetNameCrc32(); + } + + void QtEventToAzInputMapper::SetEnabled(bool enabled) + { + m_enabled = enabled; + if (!enabled) + { + // Send an internal focus change event to reset our input state to fresh if we're disabled. + HandleFocusChange(nullptr); + } + } + + bool QtEventToAzInputMapper::eventFilter(QObject* object, QEvent* event) + { + // Abort if processing isn't enabled. + if (!m_enabled) + { + return false; + } + + // Because there's no "end" to mouse movement and wheel events, we reset mouse movement channels that have been opened + // during the next processed non-mouse event. + if (m_mouseChannelsNeedUpdate && event->type() != QEvent::Type::MouseMove && event->type() != QEvent::Type::Wheel) + { + m_cursorPosition->m_normalizedPositionDelta = AZ::Vector2::CreateZero(); + ProcessPendingMouseEvents(); + m_mouseChannelsNeedUpdate = false; + } + + // Only accept mouse & key release events that originate from an object that is not our target widget, + // as we don't want to erroneously intercept user input meant for another component. + if (object != m_sourceWidget && event->type() != QEvent::Type::KeyRelease && event->type() != QEvent::Type::MouseButtonRelease) + { + return false; + } + + // If our focus changes, go ahead and reset all input devices. + if (event->type() == QEvent::FocusIn || event->type() == QEvent::FocusOut) + { + HandleFocusChange(event); + } + // Map key events to input channels. + // ShortcutOverride is used in lieu of KeyPress for high priority input channels like Alt + // that need to be accepted and stopped before they bubble up and cause unintended behavior. + else if ( + event->type() == QEvent::Type::KeyPress || event->type() == QEvent::Type::KeyRelease || + event->type() == QEvent::Type::ShortcutOverride) + { + QKeyEvent* keyEvent = static_cast(event); + HandleKeyEvent(keyEvent); + } + // Map mouse events to input channels. + else if (event->type() == QEvent::Type::MouseButtonPress || event->type() == QEvent::Type::MouseButtonRelease || event->type() == QEvent::Type::MouseButtonDblClick) + { + QMouseEvent* mouseEvent = static_cast(event); + HandleMouseButtonEvent(mouseEvent); + } + // Map mouse movement to the movement input channels. + // This includes SystemCursorPosition alongside Movement::X and Movement::Y. + else if (event->type() == QEvent::Type::MouseMove) + { + QMouseEvent* mouseEvent = static_cast(event); + HandleMouseMoveEvent(mouseEvent); + } + // Map wheel events to the mouse Z movement channel. + else if (event->type() == QEvent::Type::Wheel) + { + QWheelEvent* wheelEvent = static_cast(event); + HandleWheelEvent(wheelEvent); + } + + return false; + } + + void QtEventToAzInputMapper::NotifyUpdateChannelIfNotIdle(const AzFramework::InputChannel* channel, QEvent* event) + { + if (channel->GetState() != AzFramework::InputChannel::State::Idle) + { + emit InputChannelUpdated(channel, event); + } + } + + void QtEventToAzInputMapper::ProcessPendingMouseEvents() + { + auto systemCursorChannel = + GetInputChannel(AzFramework::InputDeviceMouse::SystemCursorPosition); + auto mouseWheelChannel = + GetInputChannel(AzFramework::InputDeviceMouse::Movement::Z); + + systemCursorChannel->ProcessRawInputEvent(m_cursorPosition->m_normalizedPositionDelta.GetLength()); + mouseWheelChannel->ProcessRawInputEvent(0.f); + + NotifyUpdateChannelIfNotIdle(systemCursorChannel, nullptr); + NotifyUpdateChannelIfNotIdle(mouseWheelChannel, nullptr); + } + + void QtEventToAzInputMapper::HandleMouseButtonEvent(QMouseEvent* mouseEvent) + { + const Qt::MouseButton button = mouseEvent->button(); + + if (auto buttonIt = m_mouseButtonMappings.find(button); buttonIt != m_mouseButtonMappings.end()) + { + auto buttonChannel = GetInputChannel(buttonIt->second); + + if (buttonChannel) + { + if (mouseEvent->type() != QEvent::Type::MouseButtonRelease) + { + buttonChannel->UpdateState(true); + } + else + { + buttonChannel->UpdateState(false); + } + + NotifyUpdateChannelIfNotIdle(buttonChannel, mouseEvent); + } + } + } + + void QtEventToAzInputMapper::HandleMouseMoveEvent(QMouseEvent* mouseEvent) + { + const QPoint mousePos = mouseEvent->pos(); + const float normalizedX = aznumeric_cast(mousePos.x()) / aznumeric_cast(m_sourceWidget->width()); + const float normalizedY = aznumeric_cast(mousePos.y()) / aznumeric_cast(m_sourceWidget->height()); + const AZ::Vector2 normalizedPosition(normalizedX, normalizedY); + m_cursorPosition->m_normalizedPositionDelta = normalizedPosition - m_cursorPosition->m_normalizedPosition; + m_cursorPosition->m_normalizedPosition = normalizedPosition; + ProcessPendingMouseEvents(); + m_mouseChannelsNeedUpdate = true; + } + + void QtEventToAzInputMapper::HandleKeyEvent(QKeyEvent* keyEvent) + { + // Ignore key repeat events, they're unrelated to actual physical button presses. + if (keyEvent->isAutoRepeat()) + { + return; + } + + const Qt::Key key = static_cast(keyEvent->key()); + + // For ShortcutEvent, only continue processing if we're in the HighPriorityKeys set. + if (keyEvent->type() != QEvent::Type::ShortcutOverride || m_highPriorityKeys.find(key) != m_highPriorityKeys.end()) + { + if (auto keyIt = m_keyMappings.find(key); keyIt != m_keyMappings.end()) + { + auto keyChannel = GetInputChannel(keyIt->second); + + if (keyChannel) + { + if (keyEvent->type() == QEvent::Type::KeyPress || keyEvent->type() == QEvent::Type::ShortcutOverride) + { + keyChannel->UpdateState(true); + } + else + { + keyChannel->UpdateState(false); + } + + NotifyUpdateChannelIfNotIdle(keyChannel, keyEvent); + } + } + } + } + + void QtEventToAzInputMapper::HandleWheelEvent(QWheelEvent* wheelEvent) + { + auto cursorZChannel = + GetInputChannel(AzFramework::InputDeviceMouse::Movement::Z); + const QPoint angleDelta = wheelEvent->angleDelta(); + // Check both angles, as the alt modifier can change the wheel direction. + int wheelAngle = angleDelta.x(); + if (wheelAngle == 0) + { + wheelAngle = angleDelta.y(); + } + cursorZChannel->ProcessRawInputEvent(aznumeric_cast(wheelAngle)); + NotifyUpdateChannelIfNotIdle(cursorZChannel, wheelEvent); + m_mouseChannelsNeedUpdate = true; + } + + void QtEventToAzInputMapper::HandleFocusChange(QEvent* event) + { + for (auto& channelData : m_channels) + { + // If resetting the input device changed the channel state, submit it to the mapped channel list + // for processing. + if (channelData.second->IsActive()) + { + channelData.second->UpdateState(false); + NotifyUpdateChannelIfNotIdle(channelData.second, event); + } + } + m_mouseChannelsNeedUpdate = false; + } +} // namespace AzToolsFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputManager.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputManager.h new file mode 100644 index 0000000000..6d95f3a4b0 --- /dev/null +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputManager.h @@ -0,0 +1,152 @@ +/* + * 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 +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#endif //! defined(Q_MOC_RUN) + +class QWidget; +class QKeyEvent; +class QMouseEvent; +class QWheelEvent; + +namespace AzToolsFramework +{ + //! Maps events from the Qt input system to synthetic InputChannels in AzFramework + //! that can be used by AzFramework::ViewportControllers. + class QtEventToAzInputMapper final : public QObject + { + Q_OBJECT + + public: + QtEventToAzInputMapper(QWidget* sourceWidget, int syntheticDeviceId = 0); + ~QtEventToAzInputMapper() = default; + + //! Queries whether a given input channel has a synthetic equivalent mapped + //! by this system. + //! \returns true if the channel is handled by MapQtEventToAzInput. + bool HandlesInputEvent(const AzFramework::InputChannel& channel) const; + + //! Sets whether or not this input mapper should be updating its input channels from Qt events. + void SetEnabled(bool enabled); + + // QObject overrides... + bool eventFilter(QObject* object, QEvent* event) override; + + signals: + //! This signal fires whenever the state of the specified input channel changes. + //! This is determined by Qt events dispatched to the source widget. + //! \param channel The AZ input channel that has been updated. + //! \param event The underlying Qt event that triggered this change, if applicable. + void InputChannelUpdated(const AzFramework::InputChannel* channel, QEvent* event); + + private: + // Gets an input channel of the specified type by ID. + template + TInputChannel* GetInputChannel(const AzFramework::InputChannelId& id) + { + auto channelIt = m_channels.find(id); + if (channelIt != m_channels.end()) + { + return static_cast(channelIt->second); + } + return nullptr; + } + + // Adds channels from the specified channel container to our input channel ID -> input channel lookup table. + // Used for rapid lookup. + template + void AddChannels(const TContainer& container) + { + for (const auto& channelData : container) + { + // Break const as we're taking these input channels from devices we own. + m_channels.emplace(channelData.first, const_cast(channelData.second)); + } + } + + // Our synthetic Keyboard device, does no internal keyboard handling and instead listens to this class for updates. + class EditorQtKeyboardDevice : public AzFramework::InputDeviceKeyboard + { + public: + EditorQtKeyboardDevice(AzFramework::InputDeviceId id); + + friend class QtEventToAzInputMapper; + }; + + // Our synthetic Mouse device, does no internal keyboard handling and instead listens to this class for updates. + class EditorQtMouseDevice : public AzFramework::InputDeviceMouse + { + public: + EditorQtMouseDevice(AzFramework::InputDeviceId id); + + friend class QtEventToAzInputMapper; + }; + + // Emits InputChannelUpdated if channel has transitioned in state (i.e. has gone from active to inactive or vice versa). + void NotifyUpdateChannelIfNotIdle(const AzFramework::InputChannel* channel, QEvent* event); + + // Processes any pending mouse movement events, this allows mouse movement channels to close themselves. + void ProcessPendingMouseEvents(); + + // Handle mouse click events. + void HandleMouseButtonEvent(QMouseEvent* mouseEvent); + // Handle mouse move events. + void HandleMouseMoveEvent(QMouseEvent* mouseEvent); + // Handles key press / release events (or ShortcutOverride events for keys listed in m_highPriorityKeys). + void HandleKeyEvent(QKeyEvent* keyEvent); + // Handles mouse wheel events. + void HandleWheelEvent(QWheelEvent* wheelEvent); + // Handles focus change events. + void HandleFocusChange(QEvent* event); + + // Populates m_keyMappings. + void InitializeKeyMappings(); + // Populates m_mouseButtonMappings. + void InitializeMouseButtonMappings(); + // Populates m_highPriorityKeys. + void InitializeHighPriorityKeys(); + + // The current keyboard modifier state used by our synthetic key input channels. + AZStd::shared_ptr m_keyboardModifiers; + // The current normalized cursor position used by our synthetic system cursor event. + AZStd::shared_ptr m_cursorPosition; + // A lookup table for Qt key -> AZ input channel. + AZStd::unordered_map m_keyMappings; + // A lookup table for Qt mouse button -> AZ input channel. + AZStd::unordered_map m_mouseButtonMappings; + // A set of high priority keys that need to be processed at the ShortcutOverride level instead of the + // KeyEvent level. This prevents e.g. the main menu bar from processing a press of the "alt" key when the + // viewport consumes the event. + AZStd::unordered_set m_highPriorityKeys; + // A lookup table for AZ input channel ID -> physical input channel on our mouse or keyboard device. + AZStd::unordered_map m_channels; + // The source widget to map events from, used to calculate the relative mouse position within the widget bounds. + QWidget* m_sourceWidget; + // Flags when mouse movement channels have been opened and may need to be closed (as there are no movement ended events). + bool m_mouseChannelsNeedUpdate = false; + // Flags whether or not Qt events should currently be processed. + bool m_enabled = true; + + // Our viewport-specific AZ devices. We control their internal input channel states. + AZStd::unique_ptr m_mouseDevice; + AZStd::unique_ptr m_keyboardDevice; + }; +} // namespace AzToolsFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabDomUtils.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabDomUtils.cpp index 4d02c61b3d..bac63d94b4 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabDomUtils.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabDomUtils.cpp @@ -47,7 +47,7 @@ namespace AzToolsFramework return valueIterator->value; } - bool StoreInstanceInPrefabDom(const Instance& instance, PrefabDom& prefabDom) + bool StoreInstanceInPrefabDom(const Instance& instance, PrefabDom& prefabDom, StoreInstanceFlags flags) { InstanceEntityIdMapper entityIdMapper; entityIdMapper.SetStoringInstance(instance); @@ -58,6 +58,11 @@ namespace AzToolsFramework settings.m_metadata.Add(static_cast(&entityIdMapper)); settings.m_metadata.Add(&entityIdMapper); + if ((flags & StoreInstanceFlags::StripDefaultValues) != StoreInstanceFlags::StripDefaultValues) + { + settings.m_keepDefaults = true; + } + AZ::JsonSerializationResult::ResultCode result = AZ::JsonSerialization::Store(prefabDom, prefabDom.GetAllocator(), instance, settings); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabDomUtils.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabDomUtils.h index 20ba49e0ca..709461022e 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabDomUtils.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabDomUtils.h @@ -36,13 +36,25 @@ namespace AzToolsFramework PrefabDomValueReference FindPrefabDomValue(PrefabDomValue& parentValue, const char* valueName); PrefabDomValueConstReference FindPrefabDomValue(const PrefabDomValue& parentValue, const char* valueName); + enum class StoreInstanceFlags : uint8_t + { + //! No flags used during the call to LoadInstanceFromPrefabDom. + None = 0, + + //! By default an instance will be stored with default values. In cases where we want to store less json without defaults + //! such as saving to disk, this flag will control that behavior. + StripDefaultValues = 1 << 0 + }; + AZ_DEFINE_ENUM_BITWISE_OPERATORS(StoreInstanceFlags); + /** * Stores a valid Prefab Instance within a Prefab Dom. Useful for generating Templates * @param instance The instance to store * @param prefabDom The prefabDom that will be used to store the Instance data + * @param flags Controls behavior such as whether to store default values * @return bool on whether the operation succeeded */ - bool StoreInstanceInPrefabDom(const Instance& instance, PrefabDom& prefabDom); + bool StoreInstanceInPrefabDom(const Instance& instance, PrefabDom& prefabDom, StoreInstanceFlags flags = StoreInstanceFlags::None); enum class LoadInstanceFlags : uint8_t { @@ -52,13 +64,13 @@ namespace AzToolsFramework //! unique, e.g. when they are duplicates of live entities, this flag will assign them a random new id. AssignRandomEntityId = 1 << 0 }; - AZ_DEFINE_ENUM_BITWISE_OPERATORS(LoadInstanceFlags) + AZ_DEFINE_ENUM_BITWISE_OPERATORS(LoadInstanceFlags); /** * Loads a valid Prefab Instance from a Prefab Dom. Useful for generating Instances. * @param instance The Instance to load. * @param prefabDom The prefabDom that will be used to load the Instance data. - * @param shouldClearContainers Whether to clear containers in Instance while loading. + * @param flags Controls behavior such as random entity id assignment. * @return bool on whether the operation succeeded. */ bool LoadInstanceFromPrefabDom( diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabLoader.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabLoader.cpp index 92ff87b9ba..c29eea9e80 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabLoader.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabLoader.cpp @@ -172,7 +172,7 @@ namespace AzToolsFramework progressedFilePathsSet.emplace(relativePath); // Get 'Instances' value from Template. - bool isLoadedWithErrors = false; + bool isLoadSuccessful = true; PrefabDomValueReference instancesReference = newTemplate.GetInstancesValue(); if (instancesReference.has_value()) { @@ -185,7 +185,7 @@ namespace AzToolsFramework { if (!LoadNestedInstance(instanceIterator, newTemplateId, progressedFilePathsSet)) { - isLoadedWithErrors = true; + isLoadSuccessful = false; AZ_Error( "Prefab", false, "PrefabLoader::LoadTemplate - " @@ -196,7 +196,10 @@ namespace AzToolsFramework } } } - newTemplate.MarkAsLoadedWithErrors(isLoadedWithErrors); + + isLoadSuccessful &= SanitizeLoadedTemplate(newTemplate.GetPrefabDom()); + + newTemplate.MarkAsLoadedWithErrors(!isLoadSuccessful); // Un-mark the file as being in progress. progressedFilePathsSet.erase(originPath); @@ -277,6 +280,63 @@ namespace AzToolsFramework return !nestedTemplateReference->get().IsLoadedWithErrors(); } + bool PrefabLoader::SanitizeLoadedTemplate(PrefabDomReference loadedTemplateDom) + { + // Prefabs are stored to disk with default values stripped. However, while in memory, we need those default values to be + // present to make patches work consistently. To accomplish this, we'll instantiate the Dom, then serialize the instance + // back into a Dom with all of the default values preserved. + // Note that this is the default behavior in Prefab serialization, so we don't need to specify StoreInstanceFlags. + + if (!loadedTemplateDom) + { + return false; + } + + Instance loadedPrefabInstance; + if (!PrefabDomUtils::LoadInstanceFromPrefabDom(loadedPrefabInstance, loadedTemplateDom->get())) + { + return false; + } + + PrefabDom storedPrefabDom(&loadedTemplateDom->get().GetAllocator()); + if (!PrefabDomUtils::StoreInstanceInPrefabDom(loadedPrefabInstance, storedPrefabDom)) + { + return false; + } + + loadedTemplateDom->get().CopyFrom(storedPrefabDom, loadedTemplateDom->get().GetAllocator()); + return true; + } + + bool PrefabLoader::SanitizeSavingTemplate(PrefabDomReference savingTemplateDom) + { + // Prefabs are stored in memory with default values spelled out to make patches work consistently. However, when we store them + // to disk, we strip those default values to save on file size. To accomplish this, we'll instantiate the Dom, then serialize + // the instance back into a Dom with all of the default values stripped. + + if (!savingTemplateDom) + { + return false; + } + + Instance savingPrefabInstance; + if (!PrefabDomUtils::LoadInstanceFromPrefabDom(savingPrefabInstance, savingTemplateDom->get())) + { + return false; + } + + PrefabDom storedPrefabDom(&savingTemplateDom->get().GetAllocator()); + if (!PrefabDomUtils::StoreInstanceInPrefabDom(savingPrefabInstance, storedPrefabDom, + PrefabDomUtils::StoreInstanceFlags::StripDefaultValues)) + { + return false; + } + + savingTemplateDom->get().CopyFrom(storedPrefabDom, savingTemplateDom->get().GetAllocator()); + + return true; + } + bool PrefabLoader::SaveTemplate(TemplateId templateId) { const auto& domAndFilepath = StoreTemplateIntoFileFormat(templateId); @@ -395,7 +455,7 @@ namespace AzToolsFramework // Make a copy of a our prefab DOM where nested instances become file references with patch data PrefabDom templateDomToSave; - if (!templateToSave.CopyTemplateIntoPrefabFileFormat(templateDomToSave)) + if (!CopyTemplateIntoPrefabFileFormat(templateToSave, templateDomToSave)) { AZ_Error( "Prefab", false, @@ -410,6 +470,80 @@ namespace AzToolsFramework return { { AZStd::move(templateDomToSave), templateToSave.GetFilePath() } }; } + bool PrefabLoader::CopyTemplateIntoPrefabFileFormat(TemplateReference templateRef, PrefabDom& output) + { + AZ_Assert( + templateRef.has_value(), + "CopyTemplateIntoPrefabFileFormat called on empty template reference." + ); + + PrefabDom& prefabDom = templateRef->get().GetPrefabDom(); + + // Start by making a copy of our dom + output.CopyFrom(prefabDom, prefabDom.GetAllocator()); + + SanitizeSavingTemplate(output); + + for (const LinkId& linkId : templateRef->get().GetLinks()) + { + AZStd::optional> findLinkResult = m_prefabSystemComponentInterface->FindLink(linkId); + + if (!findLinkResult.has_value()) + { + AZ_Error( + "Prefab", false, + "Link with id %llu could not be found while attempting to store " + "Prefab Template with source path %s in Prefab File format. " + "Unable to proceed.", + linkId, templateRef->get().GetFilePath().c_str()); + + return false; + } + + if (!findLinkResult->get().IsValid()) + { + AZ_Error( + "Prefab", false, + "Link with id %llu and is invalid during attempt to store " + "Prefab Template with source path %s in Prefab File format. " + "Unable to Proceed.", + linkId, templateRef->get().GetFilePath().c_str()); + + return false; + } + + Link& link = findLinkResult->get(); + + PrefabDomPath instancePath = link.GetInstancePath(); + PrefabDom& linkDom = link.GetLinkDom(); + + // Get the instance value of the Template copy + // This currently stores a fully realized nested Template Dom + PrefabDomValue* instanceValue = instancePath.Get(output); + + if (!instanceValue) + { + AZ_Error( + "Prefab", false, + "Template::CopyTemplateIntoPrefabFileFormat: Unable to recover nested instance Dom value from link with id %llu " + "while attempting to store a collapsed version of a Prefab Template with source path %s. Unable to proceed.", + linkId, templateRef->get().GetFilePath().c_str()); + + return false; + } + + // Copy the contents of the Link to overwrite our Template Dom copies Instance + // The instance is now "collapsed" as it contains the file reference and patches from the link + instanceValue->CopyFrom(linkDom, prefabDom.GetAllocator()); + } + + // Remove Source parameter from the dom. It will be added on file load, and should not be stored to disk. + PrefabDomPath sourcePath = PrefabDomPath((AZStd::string("/") + PrefabDomUtils::SourceName).c_str()); + sourcePath.Erase(output); + + return true; + } + bool PrefabLoader::IsValidPrefabPath(AZ::IO::PathView path) { // Check for OS invalid character and paths ending on '/' '\\' separators as final char diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabLoader.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabLoader.h index b1c8daeaac..20d1f209e9 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabLoader.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabLoader.h @@ -25,6 +25,8 @@ namespace AzToolsFramework namespace Prefab { class PrefabSystemComponentInterface; + class Template; + using TemplateReference = AZStd::optional>; /** * The Prefab Loader helps saving/loading Prefab files. @@ -106,6 +108,16 @@ namespace AzToolsFramework static bool IsValidPrefabPath(AZ::IO::PathView path); private: + /** + * Copies the template dom provided and manipulates it into the proper format to be saved to disk. + * @param templateRef The template whose dom we want to transform into the proper format to be saved to disk. + * @param[out] output The PrefabDom reference we want to store the result into. + * @return True if the operation was completed correctly, false otherwise. + */ + bool CopyTemplateIntoPrefabFileFormat( + TemplateReference templateRef, + PrefabDom& output + ); /** * Load Prefab Template from given file path to memory and return the id of loaded Template. @@ -141,6 +153,20 @@ namespace AzToolsFramework TemplateId targetTemplateId, AZStd::unordered_set& progressedFilePathsSet); + /* + * Manipulate the provided PrefabDom into the right format to be stored in memory for editor usage. + * @param loadedTemplateDom The template to manipulate. Changes will be applied in place. + * @return True if the manipulations where applied correctly, false otherwise. + */ + bool SanitizeLoadedTemplate(PrefabDomReference loadedTemplateDom); + + /* + * Manipulate the provided PrefabDom into the right format to be stored to disk. + * @param savingTemplateDom The template to manipulate. Changes will be applied in place. + * @return True if the manipulations where applied correctly, false otherwise. + */ + bool SanitizeSavingTemplate(PrefabDomReference savingTemplateDom); + //! Retrieves Dom content and its path from a template id AZStd::optional> StoreTemplateIntoFileFormat(TemplateId templateId); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabSystemComponent.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabSystemComponent.cpp index 45b019f0a7..794fc612c6 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabSystemComponent.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabSystemComponent.cpp @@ -631,13 +631,16 @@ namespace AzToolsFramework //member itself, so we need to move instancesValue to the correct position for the next insert memberFound = instancesValue->get().FindMember(PrefabDomUtils::InstancesName); instancesValue = memberFound->value; - instancesValue->get().SetObject(); } else { instancesValue = memberFound->value; } + if (!instancesValue->get().IsObject()) + { + instancesValue->get().SetObject(); + } // Only add the instance if it's not there already if (instancesValue->get().FindMember(rapidjson::StringRef(instanceAlias.c_str())) == instancesValue->get().MemberEnd()) { diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Template/Template.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Template/Template.cpp index a750468eb7..5f30ef4bb0 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Template/Template.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Template/Template.cpp @@ -138,77 +138,6 @@ namespace AzToolsFramework return m_prefabDom; } - bool Template::CopyTemplateIntoPrefabFileFormat(PrefabDom& output) - { - // Start by making a copy of our dom - output.CopyFrom(m_prefabDom, m_prefabDom.GetAllocator()); - - PrefabSystemComponentInterface* prefabSystemComponentInterface = - AZ::Interface::Get(); - - AZ_Assert(prefabSystemComponentInterface, - "Prefab - Prefab System Component Interface is null while attempting " - "to copy Template associated with Prefab file %s into Prefab File format", - m_filePath.c_str()); - - for (const LinkId& linkId : m_links) - { - AZStd::optional> findLinkResult = - prefabSystemComponentInterface->FindLink(linkId); - - if (!findLinkResult.has_value()) - { - AZ_Error("Prefab", false, - "Link with id %llu could not be found while attempting to store " - "Prefab Template with source path %s in Prefab File format. " - "Unable to proceed.", - linkId, m_filePath.c_str()); - - return false; - } - - if (!findLinkResult->get().IsValid()) - { - AZ_Error("Prefab", false, - "Link with id %llu and is invalid during attempt to store " - "Prefab Template with source path %s in Prefab File format. " - "Unable to Proceed.", - linkId, m_filePath.c_str()); - - return false; - } - - Link& link = findLinkResult->get(); - - PrefabDomPath instancePath = link.GetInstancePath(); - PrefabDom& linkDom = link.GetLinkDom(); - - // Get the instance value of the Template copy - // This currently stores a fully realized nested Template Dom - PrefabDomValue* instanceValue = instancePath.Get(output); - - if (!instanceValue) - { - AZ_Error("Prefab", false, - "Template::CopyTemplateIntoPrefabFileFormat: Unable to recover nested instance Dom value from link with id %llu " - "while attempting to store a collapsed version of a Prefab Template with source path %s. Unable to proceed.", - linkId, m_filePath.c_str()); - - return false; - } - - // Copy the contents of the Link to overwrite our Template Dom copies Instance - // The instance is now "collapsed" as it contains the file reference and patches from the link - instanceValue->CopyFrom(linkDom, m_prefabDom.GetAllocator()); - } - - // Remove Source parameter from the dom. It will be added on file load, and should not be stored to disk. - PrefabDomPath sourcePath = PrefabDomPath((AZStd::string("/") + PrefabDomUtils::SourceName).c_str()); - sourcePath.Erase(output); - - return true; - } - PrefabDomValueReference Template::GetInstancesValue() { if (!IsValid()) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Template/Template.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Template/Template.h index fd44349901..329edda118 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Template/Template.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Template/Template.h @@ -58,8 +58,6 @@ namespace AzToolsFramework PrefabDom& GetPrefabDom(); const PrefabDom& GetPrefabDom() const; - bool CopyTemplateIntoPrefabFileFormat(PrefabDom& output); - PrefabDomValueReference GetInstancesValue(); PrefabDomValueConstReference GetInstancesValue() const; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkApplication.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkApplication.cpp index ccc7ef1fd7..f342b1afab 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkApplication.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkApplication.cpp @@ -151,6 +151,12 @@ namespace LegacyFramework specializations.Append("tools"); } + void Application::CreateReflectionManager() + { + AZ::ComponentApplication::CreateReflectionManager(); + GetSerializeContext()->CreateEditContext(); + } + int Application::Run(const ApplicationDesc& desc) { if (!AZ::AllocatorInstance::IsReady()) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkApplication.h b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkApplication.h index 42aacf3dbd..5cde088c2d 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkApplication.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkApplication.h @@ -56,6 +56,8 @@ namespace LegacyFramework virtual int Run(const ApplicationDesc& desc); Application(); + void CreateReflectionManager() override; + protected: // ------------------------------------------------------------------ diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerSortFilterProxyModel.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerSortFilterProxyModel.cpp index 73139b5a67..90274bc734 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerSortFilterProxyModel.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerSortFilterProxyModel.cpp @@ -34,7 +34,24 @@ namespace AzToolsFramework bool EntityOutlinerSortFilterProxyModel::lessThan(const QModelIndex& leftIndex, const QModelIndex& rightIndex) const { - return sourceModel()->data(leftIndex).toString() < sourceModel()->data(rightIndex).toString(); + if (leftIndex.isValid() && rightIndex.isValid()) + { + QVariant leftData = sourceModel()->data(leftIndex); + QVariant rightData = sourceModel()->data(rightIndex); + + // make sure to compare the correct data types for sorting the current column + AZ_Assert(leftData.type() == rightData.type(), "EntityOutlinerSortFilterProxyModel::lessThan types do not agree!"); + if (static_cast(leftData.type()) == QMetaType::QString) + { + return leftData.toString() < rightData.toString(); + } + else if (static_cast(leftData.type()) == QMetaType::ULongLong) + { + return leftData.toULongLong() < rightData.toULongLong(); + } + AZ_Error("Editor", false, "Error! Unhandled type \"%s\" in EntityOutlinerSortFilterProxyModel::lessThan", leftData.typeName()); + } + return false; } void EntityOutlinerSortFilterProxyModel::sort(int /*column*/, Qt::SortOrder /*order*/) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerWidget.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerWidget.cpp index 96479bb54c..03784343f5 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerWidget.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerWidget.cpp @@ -291,10 +291,12 @@ namespace AzToolsFramework GetEntityContextId()); EditorEntityInfoNotificationBus::Handler::BusConnect(); Prefab::PrefabPublicNotificationBus::Handler::BusConnect(); + EditorWindowUIRequestBus::Handler::BusConnect(); } EntityOutlinerWidget::~EntityOutlinerWidget() { + EditorWindowUIRequestBus::Handler::BusDisconnect(); Prefab::PrefabPublicNotificationBus::Handler::BusDisconnect(); ComponentModeFramework::EditorComponentModeNotificationBus::Handler::BusDisconnect(); EditorEntityInfoNotificationBus::Handler::BusDisconnect(); @@ -1106,16 +1108,25 @@ namespace AzToolsFramework AzQtComponents::SetWidgetInteractEnabled(entityOutlinerUi->m_searchWidget, on); } + void EntityOutlinerWidget::EnableUi(bool enable) + { + SetEntityOutlinerState(m_gui, enable); + setEnabled(enable); + } + + void EntityOutlinerWidget::SetEditorUiEnabled(bool enable) + { + EnableUi(enable); + } + void EntityOutlinerWidget::EnteredComponentMode([[maybe_unused]] const AZStd::vector& componentModeTypes) { - SetEntityOutlinerState(m_gui, false); - setEnabled(false); + EnableUi(false); } void EntityOutlinerWidget::LeftComponentMode([[maybe_unused]] const AZStd::vector& componentModeTypes) { - setEnabled(true); - SetEntityOutlinerState(m_gui, true); + EnableUi(true); } void EntityOutlinerWidget::OnPrefabInstancePropagationBegin() diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerWidget.hxx b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerWidget.hxx index 68f538c3ff..e3f9ad2135 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerWidget.hxx +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerWidget.hxx @@ -11,6 +11,7 @@ #include #include +#include #include #include #include @@ -58,6 +59,7 @@ namespace AzToolsFramework , private EditorEntityInfoNotificationBus::Handler , private ComponentModeFramework::EditorComponentModeNotificationBus::Handler , private Prefab::PrefabPublicNotificationBus::Handler + , private EditorWindowUIRequestBus::Handler { Q_OBJECT; public: @@ -105,6 +107,9 @@ namespace AzToolsFramework void OnPrefabInstancePropagationBegin() override; void OnPrefabInstancePropagationEnd() override; + // EditorWindowUIRequestBus overrides + void SetEditorUiEnabled(bool enable) override; + // Build a selection object from the given entities. Entities already in the Widget's selection buffers are ignored. template QItemSelection BuildSelectionFromEntities(const EntityIdCollection& entityIds); @@ -155,6 +160,7 @@ namespace AzToolsFramework AZ::EntityId GetEntityIdFromIndex(const QModelIndex& index) const; QModelIndex GetIndexFromEntityId(const AZ::EntityId& entityId) const; void ExtractEntityIdsFromSelection(const QItemSelection& selection, EntityIdList& entityIdList) const; + void EnableUi(bool enable); // OutlinerModelNotificationBus::Handler // Receive notification from the outliner model that we should scroll diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.cpp index 6a399ad816..5d1ec93fda 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.cpp @@ -376,6 +376,7 @@ namespace AzToolsFramework ToolsApplicationEvents::Bus::Handler::BusConnect(); AZ::EntitySystemBus::Handler::BusConnect(); EntityPropertyEditorRequestBus::Handler::BusConnect(); + EditorWindowUIRequestBus::Handler::BusConnect(); m_spacer = nullptr; m_emptyIcon = QIcon(); @@ -421,6 +422,7 @@ namespace AzToolsFramework { qApp->removeEventFilter(this); + EditorWindowUIRequestBus::Handler::BusDisconnect(); EntityPropertyEditorRequestBus::Handler::BusDisconnect(); ToolsApplicationEvents::Bus::Handler::BusDisconnect(); AZ::EntitySystemBus::Handler::BusDisconnect(); @@ -4961,6 +4963,27 @@ namespace AzToolsFramework EnableDisableComponentActions(widget, actions, false); } + void EntityPropertyEditor::SetEditorUiEnabled(bool enable) + { + if (enable) + { + EnableComponentActions(this, m_entityComponentActions); + } + else + { + DisableComponentActions(this, m_entityComponentActions); + } + m_disabled = !enable; + SetPropertyEditorState(m_gui, enable); + + for (auto componentEditor : m_componentEditors) + { + AzQtComponents::SetWidgetInteractEnabled(componentEditor, enable); + } + // record the selected state after entering/leaving component mode + SaveComponentEditorState(); + } + void EntityPropertyEditor::EnteredComponentMode(const AZStd::vector& componentModeTypes) { DisableComponentActions(this, m_entityComponentActions); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.hxx b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.hxx index b15e27e41a..f2ff4eb927 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.hxx +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.hxx @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -108,6 +109,7 @@ namespace AzToolsFramework , public EditorInspectorComponentNotificationBus::MultiHandler , private AzToolsFramework::ComponentModeFramework::EditorComponentModeNotificationBus::Handler , public AZ::EntitySystemBus::Handler + , private EditorWindowUIRequestBus::Handler { Q_OBJECT; public: @@ -208,6 +210,9 @@ namespace AzToolsFramework void GetSelectedEntities(EntityIdList& selectedEntityIds) override; void SetNewComponentId(AZ::ComponentId componentId) override; + // EditorWindowRequestBus overrides + void SetEditorUiEnabled(bool enable) override; + bool IsEntitySelected(const AZ::EntityId& id) const; bool IsSingleEntitySelected(const AZ::EntityId& id) const; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ActionBus.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ActionBus.h index d9bf0c40b9..e08bb13cac 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ActionBus.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ActionBus.h @@ -22,11 +22,11 @@ namespace AzToolsFramework /// @name Reverse URLs. /// Used to identify common actions and override them when necessary. //@{ - static const AZ::Crc32 s_backAction = AZ_CRC("com.amazon.action.common.back", 0xd772a2af); - static const AZ::Crc32 s_deleteAction = AZ_CRC("com.amazon.action.common.delete", 0x5731f6cb); - static const AZ::Crc32 s_duplicateAction = AZ_CRC("com.amazon.action.common.duplicate", 0x08ccf461); - static const AZ::Crc32 s_nextComponentMode = AZ_CRC("com.amazon.action.common.nextComponentMode", 0xcc26094f); - static const AZ::Crc32 s_previousComponentMode = AZ_CRC("com.amazon.action.common.previousComponentMode", 0x0d18ff39); + static const AZ::Crc32 s_backAction = AZ_CRC("com.o3de.action.common.back", 0xd772a2af); + static const AZ::Crc32 s_deleteAction = AZ_CRC("com.o3de.action.common.delete", 0x5731f6cb); + static const AZ::Crc32 s_duplicateAction = AZ_CRC("com.o3de.action.common.duplicate", 0x08ccf461); + static const AZ::Crc32 s_nextComponentMode = AZ_CRC("com.o3de.action.common.nextComponentMode", 0xcc26094f); + static const AZ::Crc32 s_previousComponentMode = AZ_CRC("com.o3de.action.common.previousComponentMode", 0x0d18ff39); //@} /// Specific Action properties to be sent to a type implementing diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorDefaultSelection.h b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorDefaultSelection.h index f92ee6b00b..73be188f2c 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorDefaultSelection.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorDefaultSelection.h @@ -98,7 +98,7 @@ namespace AzToolsFramework { } - AZ::Crc32 m_uri; //!< Unique identifier for the Action. (In the form 'com.amazon.action.---"). + AZ::Crc32 m_uri; //!< Unique identifier for the Action. (In the form 'com.o3de.action.---"). AZStd::vector> m_callbacks; //!< Callbacks associated with this Action (note: with multi-selections //!< there will be a callback per Entity/Component). AZStd::unique_ptr m_action; //!< The QAction associated with the overrideWidget for all ComponentMode actions. diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/aztoolsframework_files.cmake b/Code/Framework/AzToolsFramework/AzToolsFramework/aztoolsframework_files.cmake index b5b2c028a5..7fbde67ce4 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/aztoolsframework_files.cmake +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/aztoolsframework_files.cmake @@ -724,6 +724,8 @@ set(FILES PythonTerminal/ScriptTermDialog.cpp PythonTerminal/ScriptTermDialog.h PythonTerminal/ScriptTermDialog.ui + Input/QtEventToAzInputManager.h + Input/QtEventToAzInputManager.cpp ) # Prevent the following files from being grouped in UNITY builds diff --git a/Code/Framework/AzToolsFramework/Tests/ComponentModeTestDoubles.cpp b/Code/Framework/AzToolsFramework/Tests/ComponentModeTestDoubles.cpp index caf6411eda..844fbb3e7f 100644 --- a/Code/Framework/AzToolsFramework/Tests/ComponentModeTestDoubles.cpp +++ b/Code/Framework/AzToolsFramework/Tests/ComponentModeTestDoubles.cpp @@ -196,7 +196,7 @@ namespace AzToolsFramework AZStd::vector PlaceHolderComponentMode::PopulateActionsImpl() { - const AZ::Crc32 placeHolderComponentModeAction = AZ_CRC_CE("com.amazon.action.placeholder.test"); + const AZ::Crc32 placeHolderComponentModeAction = AZ_CRC_CE("com.o3de.action.placeholder.test"); return AZStd::vector { diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabUpdateInstancesTests.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabUpdateInstancesTests.cpp index 27cc192c06..f9abd084f6 100644 --- a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabUpdateInstancesTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabUpdateInstancesTests.cpp @@ -428,8 +428,7 @@ namespace UnitTest ASSERT_TRUE(PrefabDomUtils::StoreInstanceInPrefabDom(*newInstance, updatedDom)); newTemplateDom.CopyFrom(updatedDom, newTemplateDom.GetAllocator()); - // Validate that the prefabTestComponent in the Template's DOM doesn't have a BoolProperty. - // Even though we changed the property to false, it won't be serialized out because it's a default value. + // Validate that the value of the BoolProperty of the prefabTestComponent in the Template's DOM has changed. entityComponents = PrefabTestDomUtils::GetPrefabDomComponents(newTemplateDom, newTemplateEntityAliases.front()); ASSERT_TRUE(entityComponents != nullptr && entityComponents->IsObject()); EXPECT_EQ(entityComponents->MemberCount(), 2); @@ -440,7 +439,7 @@ namespace UnitTest PrefabDomValueConstReference wheelEntityComponentBoolPropertyValue = PrefabDomUtils::FindPrefabDomValue(wheelEntityComponentValue->get(), PrefabTestDomUtils::BoolPropertyName); - ASSERT_FALSE(wheelEntityComponentBoolPropertyValue.has_value()); + ASSERT_TRUE(wheelEntityComponentBoolPropertyValue.has_value() && wheelEntityComponentBoolPropertyValue->get() == false); // Update Template's Instances and validate if all Instances have no BoolProperty under their prefabTestComponents in entities. m_instanceUpdateExecutorInterface->AddTemplateInstancesToQueue(newTemplateId); diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabUpdateTemplateTests.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabUpdateTemplateTests.cpp index 108eb25641..c6a46fc6a0 100644 --- a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabUpdateTemplateTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabUpdateTemplateTests.cpp @@ -145,7 +145,7 @@ namespace UnitTest EntityAlias entityAlias = wheelTemplateEntityAliases.front(); PrefabDomValue* wheelEntityComponents = PrefabTestDomUtils::GetPrefabDomComponentsPath(entityAlias).Get(wheelTemplateDom); - ASSERT_TRUE(wheelEntityComponents == nullptr); + ASSERT_TRUE(wheelEntityComponents->IsArray() && wheelEntityComponents->Size() == 0); // Create an axle with 0 entities and 1 wheel instance. AZStd::unique_ptr wheel1UnderAxle = m_prefabSystemComponent->InstantiatePrefab(wheelTemplateId); @@ -340,7 +340,7 @@ namespace UnitTest // Validate that the wheel entity does not have a component under it. wheelEntityComponents = PrefabTestDomUtils::GetPrefabDomComponentsPath(entityAlias).Get(wheelTemplateDom); - ASSERT_TRUE(wheelEntityComponents == nullptr); + ASSERT_TRUE(wheelEntityComponents->IsArray() && wheelEntityComponents->Size() == 0); // Validate that the wheels under the axle have the same DOM as the wheel template. PrefabTestDomUtils::ValidatePrefabDomInstances(wheelInstanceAliasesUnderAxle, axleTemplateDom, wheelTemplateDom); @@ -399,15 +399,14 @@ namespace UnitTest m_prefabSystemComponent->UpdatePrefabTemplate(wheelTemplateId, updatedWheelInstanceDom); m_instanceUpdateExecutorInterface->UpdateTemplateInstancesInQueue(); - // Validate that the prefabTestComponent in the wheel template DOM doesn't have a BoolProperty. - // Even though we changed the property to false, it won't be serialized out because it's a default value. + // Validate that the BoolProperty of the prefabTestComponent in the wheel template DOM is set to false. wheelEntityComponents = PrefabTestDomUtils::GetPrefabDomComponentsPath(entityAlias).Get(wheelTemplateDom); ASSERT_TRUE(wheelEntityComponents != nullptr && wheelEntityComponents->IsObject()); EXPECT_EQ(wheelEntityComponents->MemberCount(), 1); PrefabDomValueReference wheelEntityComponentBoolPropertyValue = PrefabDomUtils::FindPrefabDomValue(wheelEntityComponents->MemberBegin()->value, PrefabTestDomUtils::BoolPropertyName); - ASSERT_FALSE(wheelEntityComponentBoolPropertyValue.has_value()); + ASSERT_TRUE(wheelEntityComponentBoolPropertyValue.has_value() && wheelEntityComponentBoolPropertyValue->get() == false); // Validate that the wheels under the axle have the same DOM as the wheel template. PrefabTestDomUtils::ValidatePrefabDomInstances(wheelInstanceAliasesUnderAxle, axleTemplateDom, wheelTemplateDom); diff --git a/Code/LauncherUnified/Platform/iOS/Launcher_iOS.mm b/Code/LauncherUnified/Platform/iOS/Launcher_iOS.mm index 480a1b0be1..b5401b8d80 100644 --- a/Code/LauncherUnified/Platform/iOS/Launcher_iOS.mm +++ b/Code/LauncherUnified/Platform/iOS/Launcher_iOS.mm @@ -6,7 +6,7 @@ */ #import - +#include int main(int argc, char* argv[]) { diff --git a/Code/LauncherUnified/launcher_generator.cmake b/Code/LauncherUnified/launcher_generator.cmake index 85976e1cb9..628b5fffac 100644 --- a/Code/LauncherUnified/launcher_generator.cmake +++ b/Code/LauncherUnified/launcher_generator.cmake @@ -122,6 +122,8 @@ foreach(project_name project_path IN ZIP_LISTS LY_PROJECTS_TARGET_NAME LY_PROJEC FOLDER ${project_name} ) + # After ensuring that we correctly support DPI scaling, this should be switched to "PerMonitor" + set_property(TARGET ${project_name}.GameLauncher APPEND PROPERTY VS_DPI_AWARE "OFF") if(LY_DEFAULT_PROJECT_PATH) set_property(TARGET ${project_name}.GameLauncher APPEND PROPERTY VS_DEBUGGER_COMMAND_ARGUMENTS "--project-path=\"${LY_DEFAULT_PROJECT_PATH}\"") endif() diff --git a/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp b/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp index 9181793366..015b258123 100644 --- a/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp +++ b/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp @@ -174,6 +174,42 @@ namespace LegacyLevelSystem return false; } + // Make sure a spawnable level exists that matches levelname + AZStd::string validLevelName = ""; + AZ::Data::AssetId rootSpawnableAssetId; + AZ::Data::AssetCatalogRequestBus::BroadcastResult( + rootSpawnableAssetId, &AZ::Data::AssetCatalogRequestBus::Events::GetAssetIdByPath, levelName, nullptr, false); + + if (rootSpawnableAssetId.IsValid()) + { + validLevelName = levelName; + } + else + { + // It's common for users to only provide the level name, but not the full asset path + // Example: "MyLevel" instead of "Levels/MyLevel/MyLevel.spawnable" + if (!AZ::IO::PathView(levelName).HasExtension()) + { + // Search inside the "Levels" folder for a level spawnable matching levelname + const AZStd::string possibleLevelAssetPath = AZStd::string::format("Levels/%s/%s.spawnable", levelName, levelName); + + AZ::Data::AssetCatalogRequestBus::BroadcastResult( + rootSpawnableAssetId, &AZ::Data::AssetCatalogRequestBus::Events::GetAssetIdByPath, possibleLevelAssetPath.c_str(), + nullptr, false); + + if (rootSpawnableAssetId.IsValid()) + { + validLevelName = possibleLevelAssetPath; + } + } + } + + if (validLevelName.empty()) + { + OnLevelNotFound(levelName); + return false; + } + // If a level is currently loaded, unload it before loading the next one. if (IsLevelLoaded()) { @@ -181,12 +217,12 @@ namespace LegacyLevelSystem } gEnv->pSystem->GetISystemEventDispatcher()->OnSystemEvent(ESYSTEM_EVENT_LEVEL_LOAD_PREPARE, 0, 0); - PrepareNextLevel(levelName); + PrepareNextLevel(validLevelName.c_str()); - bool result = LoadLevelInternal(levelName); + bool result = LoadLevelInternal(validLevelName.c_str()); if (result) { - OnLoadingComplete(levelName); + OnLoadingComplete(validLevelName.c_str()); } return result; diff --git a/Code/Legacy/CrySystem/SystemInit.cpp b/Code/Legacy/CrySystem/SystemInit.cpp index 7602ed05aa..3c1f1b4cda 100644 --- a/Code/Legacy/CrySystem/SystemInit.cpp +++ b/Code/Legacy/CrySystem/SystemInit.cpp @@ -1043,7 +1043,7 @@ string GetUniqueLogFileName(string logFileName) logFileNamePrefix = logFileName.substr(0, extensionIndex); } - logFileName.Format("%s(%d)%s", logFileNamePrefix.c_str(), instance, logFileExtension.c_str()); + logFileName = AZStd::string::format("%s(%d)%s", logFileNamePrefix.c_str(), instance, logFileExtension.c_str()).c_str(); return logFileName; } diff --git a/Code/Tools/AWSNativeSDKInit/source/AWSNativeSDKInit.cpp b/Code/Tools/AWSNativeSDKInit/source/AWSNativeSDKInit.cpp index 97802a1516..d92b72e11a 100644 --- a/Code/Tools/AWSNativeSDKInit/source/AWSNativeSDKInit.cpp +++ b/Code/Tools/AWSNativeSDKInit/source/AWSNativeSDKInit.cpp @@ -25,6 +25,8 @@ namespace AWSNativeSDKInit #if defined(PLATFORM_SUPPORTS_AWS_NATIVE_SDK) void CustomizeSDKOptions(Aws::SDKOptions& options); void CustomizeShutdown(); + + void CopyCaCertBundle(); #endif } @@ -44,6 +46,8 @@ namespace AWSNativeSDKInit void InitializationManager::InitAwsApi() { s_initManager = AZ::Environment::CreateVariable(initializationManagerTag); + + Platform::CopyCaCertBundle(); } void InitializationManager::Shutdown() diff --git a/Code/Tools/AWSNativeSDKInit/source/Platform/Android/InitializeCerts_Android.cpp b/Code/Tools/AWSNativeSDKInit/source/Platform/Android/InitializeCerts_Android.cpp new file mode 100644 index 0000000000..67cdee7edc --- /dev/null +++ b/Code/Tools/AWSNativeSDKInit/source/Platform/Android/InitializeCerts_Android.cpp @@ -0,0 +1,89 @@ +/* + * 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 +// The AWS Native SDK AWSAllocator triggers a warning due to accessing members of std::allocator directly. +// AWSAllocator.h(70): warning C4996: 'std::allocator::pointer': warning STL4010: Various members of std::allocator are deprecated in +// C++17. Use std::allocator_traits instead of accessing these members directly. You can define +// _SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING or _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS to acknowledge that you have received +// this warning. +AZ_PUSH_DISABLE_WARNING(4251 4996, "-Wunknown-warning-option") +#include +AZ_POP_DISABLE_WARNING +#include +#include +#include +#include + +namespace AWSNativeSDKInit +{ + namespace Platform + { + void CopyCaCertBundle() + { + AZStd::vector contents; + AZStd::string certificatePath = "@assets@/certificates/aws/cacert.pem"; + AZStd::string publicStoragePath = AZ::Android::Utils::GetAppPublicStoragePath(); + publicStoragePath.append("/certificates/aws/cacert.pem"); + + AZ::IO::FileIOBase* fileBase = AZ::IO::FileIOBase::GetInstance(); + + if (!fileBase->Exists(certificatePath.c_str())) + { + AZ_Error("AWSNativeSDKInit", false, "Certificate File(%s) does not exist.\n", certificatePath.c_str()); + } + + AZ::IO::HandleType fileHandle; + AZ::IO::Result fileResult = fileBase->Open(certificatePath.c_str(), AZ::IO::OpenMode::ModeRead, fileHandle); + + if (!fileResult) + { + AZ_Error("AWSNativeSDKInit", false, "Failed to open certificate file with result %i\n", fileResult.GetResultCode()); + } + + AZ::u64 fileSize = 0; + fileBase->Size(fileHandle, fileSize); + + if (fileSize == 0) + { + AZ_Error("AWSNativeSDKInit", false, "Given empty file(%s) as the certificate bundle.\n", certificatePath.c_str()); + } + + contents.resize(fileSize + 1); + fileResult = fileBase->Read(fileHandle, contents.data(), fileSize); + + if (!fileResult) + { + AZ_Error( + "AWSNativeSDKInit", false, "Failed to read from the certificate bundle(%s) with result code(%i).\n", certificatePath.c_str(), + fileResult.GetResultCode()); + } + + AZ_Printf("AWSNativeSDKInit", "Certificate bundle is read successfully from %s", certificatePath.c_str()); + + AZ::IO::HandleType outFileHandle; + + AZ::IO::Result outFileResult = fileBase->Open(publicStoragePath.c_str(), AZ::IO::OpenMode::ModeWrite, outFileHandle); + + if (!outFileResult) + { + AZ_Error("AWSNativeSDKInit", false, "Failed to open the certificate bundle with result %i\n", fileResult.GetResultCode()); + } + + AZ::IO::Result writeFileResult = fileBase->Write(outFileHandle, contents.data(), fileSize); + if (!writeFileResult) + { + AZ_Error("AWSNativeSDKInit", false, "Failed to write the certificate bundle with result %i\n", writeFileResult.GetResultCode()); + } + + fileBase->Close(fileHandle); + fileBase->Close(outFileHandle); + + AZ_Printf("AWSNativeSDKInit", "Certificate bundle successfully copied to %s", publicStoragePath.c_str()); + } + } // namespace Platform +} diff --git a/Code/Tools/AWSNativeSDKInit/source/Platform/Android/platform_android_files.cmake b/Code/Tools/AWSNativeSDKInit/source/Platform/Android/platform_android_files.cmake index 0ec1f30fea..6e0370dd42 100644 --- a/Code/Tools/AWSNativeSDKInit/source/Platform/Android/platform_android_files.cmake +++ b/Code/Tools/AWSNativeSDKInit/source/Platform/Android/platform_android_files.cmake @@ -7,4 +7,5 @@ set(FILES ../Common/Default/AWSNativeSDKInit_Default.cpp + InitializeCerts_Android.cpp ) diff --git a/Code/Tools/News/NewsShared/LogType.h b/Code/Tools/AWSNativeSDKInit/source/Platform/Common/Default/InitializeCerts_Null.cpp similarity index 56% rename from Code/Tools/News/NewsShared/LogType.h rename to Code/Tools/AWSNativeSDKInit/source/Platform/Common/Default/InitializeCerts_Null.cpp index 92834adc58..7981998327 100644 --- a/Code/Tools/News/NewsShared/LogType.h +++ b/Code/Tools/AWSNativeSDKInit/source/Platform/Common/Default/InitializeCerts_Null.cpp @@ -1,18 +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 - * - */ - -#pragma once - -namespace News { - enum LogType - { - LogOk, - LogInfo, - LogError, - LogWarning - }; -} // namespace News +/* + * 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 + * + */ + +namespace AWSNativeSDKInit +{ + namespace Platform + { + void CopyCaCertBundle() + { + } + } // namespace Platform +} // namespace AWSCore diff --git a/Code/Tools/AWSNativeSDKInit/source/Platform/Linux/platform_linux_files.cmake b/Code/Tools/AWSNativeSDKInit/source/Platform/Linux/platform_linux_files.cmake index 0ec1f30fea..6209d3faac 100644 --- a/Code/Tools/AWSNativeSDKInit/source/Platform/Linux/platform_linux_files.cmake +++ b/Code/Tools/AWSNativeSDKInit/source/Platform/Linux/platform_linux_files.cmake @@ -7,4 +7,5 @@ set(FILES ../Common/Default/AWSNativeSDKInit_Default.cpp + ../Common/Default/InitializeCerts_Null.cpp ) diff --git a/Code/Tools/AWSNativeSDKInit/source/Platform/Mac/platform_mac_files.cmake b/Code/Tools/AWSNativeSDKInit/source/Platform/Mac/platform_mac_files.cmake index 0ec1f30fea..6209d3faac 100644 --- a/Code/Tools/AWSNativeSDKInit/source/Platform/Mac/platform_mac_files.cmake +++ b/Code/Tools/AWSNativeSDKInit/source/Platform/Mac/platform_mac_files.cmake @@ -7,4 +7,5 @@ set(FILES ../Common/Default/AWSNativeSDKInit_Default.cpp + ../Common/Default/InitializeCerts_Null.cpp ) diff --git a/Code/Tools/AWSNativeSDKInit/source/Platform/Windows/platform_windows_files.cmake b/Code/Tools/AWSNativeSDKInit/source/Platform/Windows/platform_windows_files.cmake index 0ec1f30fea..6209d3faac 100644 --- a/Code/Tools/AWSNativeSDKInit/source/Platform/Windows/platform_windows_files.cmake +++ b/Code/Tools/AWSNativeSDKInit/source/Platform/Windows/platform_windows_files.cmake @@ -7,4 +7,5 @@ set(FILES ../Common/Default/AWSNativeSDKInit_Default.cpp + ../Common/Default/InitializeCerts_Null.cpp ) diff --git a/Code/Tools/AWSNativeSDKInit/source/Platform/iOS/platform_ios_files.cmake b/Code/Tools/AWSNativeSDKInit/source/Platform/iOS/platform_ios_files.cmake index 0ec1f30fea..6209d3faac 100644 --- a/Code/Tools/AWSNativeSDKInit/source/Platform/iOS/platform_ios_files.cmake +++ b/Code/Tools/AWSNativeSDKInit/source/Platform/iOS/platform_ios_files.cmake @@ -7,4 +7,5 @@ set(FILES ../Common/Default/AWSNativeSDKInit_Default.cpp + ../Common/Default/InitializeCerts_Null.cpp ) diff --git a/Code/Tools/AssetProcessor/native/unittests/FileWatcherUnitTests.cpp b/Code/Tools/AssetProcessor/native/unittests/FileWatcherUnitTests.cpp index 2ffe6a7996..dd39283b22 100644 --- a/Code/Tools/AssetProcessor/native/unittests/FileWatcherUnitTests.cpp +++ b/Code/Tools/AssetProcessor/native/unittests/FileWatcherUnitTests.cpp @@ -1,6 +1,6 @@ /* * 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 * */ @@ -277,7 +277,7 @@ void FileWatcherUnitTestRunner::StartTest() UNIT_TEST_EXPECT_TRUE(QDir::toNativeSeparators(fileAddName).toLower() == QDir::toNativeSeparators(newName3).toLower()); #if !defined(AZ_PLATFORM_LINUX) - // final test... make sure that renaming a DIRECTORY works too. + // final test... make sure that renaming a DIRECTORY works too. // Note that linux does not get any callbacks if just the directory is renamed (from inotify) QDir renamer; fileAddCalled = false; @@ -312,6 +312,9 @@ void FileWatcherUnitTestRunner::StartTest() Q_EMIT UnitTestPassed(); } -#if !AZ_TRAIT_DISABLE_FAILED_ASSET_PROCESSOR_TESTS +// File operations on Linux behave differently on Linux than Windows. +// The system under test doesn't yet handle Linux's file operations, which surfaced as this test arbitrarily passing and failing. +// This test is disabled on Linux until the system under test can handle Linux file system behavior correctly. +#if !AZ_TRAIT_DISABLE_FAILED_ASSET_PROCESSOR_TESTS && !defined(AZ_PLATFORM_LINUX) REGISTER_UNIT_TEST(FileWatcherUnitTestRunner) #endif // !AZ_TRAIT_DISABLE_FAILED_ASSET_PROCESSOR_TESTS diff --git a/Code/Tools/CMakeLists.txt b/Code/Tools/CMakeLists.txt index 6c025a0543..1bab1cee77 100644 --- a/Code/Tools/CMakeLists.txt +++ b/Code/Tools/CMakeLists.txt @@ -10,7 +10,6 @@ add_subdirectory(AssetProcessor) add_subdirectory(AWSNativeSDKInit) add_subdirectory(AzTestRunner) add_subdirectory(CrashHandler) -add_subdirectory(News) add_subdirectory(PythonBindingsExample) add_subdirectory(RemoteConsole) add_subdirectory(DeltaCataloger) diff --git a/Code/Tools/News/CMakeLists.txt b/Code/Tools/News/CMakeLists.txt deleted file mode 100644 index 78c5774ef0..0000000000 --- a/Code/Tools/News/CMakeLists.txt +++ /dev/null @@ -1,31 +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 -# -# - -add_subdirectory(NewsBuilder) - -if (NOT PAL_TRAIT_BUILD_HOST_TOOLS) - return() -endif() - -ly_add_target( - NAME NewsShared STATIC - NAMESPACE Legacy - AUTOMOC - AUTOUIC - AUTORCC - FILES_CMAKE - news_shared_files.cmake - INCLUDE_DIRECTORIES - PUBLIC - . - BUILD_DEPENDENCIES - PRIVATE - 3rdParty::Qt::Core - 3rdParty::Qt::Network - 3rdParty::Qt::Widgets - AZ::AzQtComponents -) diff --git a/Code/Tools/News/NewsBuilder/CMakeLists.txt b/Code/Tools/News/NewsBuilder/CMakeLists.txt deleted file mode 100644 index 218f4e28f5..0000000000 --- a/Code/Tools/News/NewsBuilder/CMakeLists.txt +++ /dev/null @@ -1,38 +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 -# -# - -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) - -include(${pal_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) - -if (NOT PAL_TRAIT_BUILD_NEWSBUILDER_SUPPORTED OR NOT PAL_TRAIT_BUILD_HOST_TOOLS) - return() -endif() - -ly_add_target( - NAME NewsBuilder EXECUTABLE - NAMESPACE Legacy - AUTOMOC - AUTOUIC - AUTORCC - FILES_CMAKE - news_builder_files.cmake - INCLUDE_DIRECTORIES - PUBLIC - . - BUILD_DEPENDENCIES - PRIVATE - 3rdParty::Qt::Core - 3rdParty::Qt::Widgets - 3rdParty::AWSNativeSDK::Dependencies - 3rdParty::AWSNativeSDK::Core - 3rdParty::AWSNativeSDK::S3 - Legacy::NewsShared - AZ::AzCore - AZ::AzQtComponents - AZ::AzFramework -) diff --git a/Code/Tools/News/NewsBuilder/EndpointManager.cpp b/Code/Tools/News/NewsBuilder/EndpointManager.cpp deleted file mode 100644 index 0b2ea4dd5c..0000000000 --- a/Code/Tools/News/NewsBuilder/EndpointManager.cpp +++ /dev/null @@ -1,212 +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 "EndpointManager.h" -#include - -#include -#include -#include -#include -#include -#include -#include - -namespace News -{ - - Endpoint::Endpoint(QString name, QString awsProfile, QString url, QString bucket) - : m_name(name) - , m_awsProfile(awsProfile) - , m_url(url) - , m_bucket(bucket) - {} - - Endpoint::Endpoint(const QJsonObject& json) - : Endpoint(json["name"].toString(), - json["awsProfile"].toString(), - json["url"].toString(), - json["bucket"].toString()) - { - } - - Endpoint::~Endpoint() {} - - void Endpoint::Write(QJsonObject& json) const - { - json["name"] = m_name; - json["awsProfile"] = m_awsProfile; - json["url"] = m_url; - json["bucket"] = m_bucket; - } - - QString Endpoint::GetName() const - { - return m_name; - } - - void Endpoint::SetName(const QString& name) - { - m_name = QString(name); - } - - QString Endpoint::GetAwsProfile() const - { - return m_awsProfile; - } - - void Endpoint::SetAwsProfile(const QString& awsProfile) - { - m_awsProfile = QString(awsProfile); - } - - QString Endpoint::GetUrl() const - { - return m_url; - } - - void Endpoint::SetUrl(const QString& url) - { - m_url = QString(url); - } - - QString Endpoint::GetBucket() const - { - return m_bucket; - } - - void Endpoint::SetBucket(const QString& bucket) - { - m_bucket = bucket; - } - - EndpointManager::EndpointManager() - { - Load(); - } - - EndpointManager::~EndpointManager() - { - ClearEndpoints(); - } - - void EndpointManager::Load() - { - ClearEndpoints(); - QFile file("newsBuilderConfig.txt"); - if (file.open(QIODevice::ReadOnly)) - { - QTextStream in(&file); - QString str = in.readAll().trimmed(); - QByteArray array(str.toStdString().c_str()); - QJsonDocument doc(QJsonDocument::fromJson(array)); - QJsonObject json = doc.object(); - QJsonArray endpointArray = json["endpoints"].toArray(); - for (auto endpointDoc : endpointArray) - { - m_endpoints.append(new Endpoint(endpointDoc.toObject())); - } - int endpointIndex = json["currentEndpointIndex"].toInt(); - if (endpointIndex >= 0 && m_endpoints.count() > endpointIndex) - { - m_selectedEndpoint = m_endpoints[endpointIndex]; - } - else - { - m_selectedEndpoint = nullptr; - } - file.close(); - - SaveUrl(); - } - } - - void EndpointManager::Save() - { - QFile file("newsBuilderConfig.txt"); - if (file.open(QIODevice::WriteOnly)) - { - QJsonObject json; - QJsonArray endpointArray; - for (auto endpoint : m_endpoints) - { - QJsonObject endpointObject; - endpoint->Write(endpointObject); - endpointArray.append(endpointObject); - } - json["endpoints"] = endpointArray; - json["currentEndpointIndex"] = m_endpoints.indexOf(m_selectedEndpoint); - QTextStream out(&file); - QJsonDocument doc(json); - out << doc.toJson(QJsonDocument::Compact); - file.close(); - - SaveUrl(); - } - } - - void EndpointManager::SelectEndpoint(Endpoint* endpoint) - { - m_selectedEndpoint = endpoint; - } - - void EndpointManager::AddEndpoint(Endpoint* endpoint) - { - m_endpoints.append(endpoint); - } - - void EndpointManager::RemoveEndpoint(Endpoint* endpoint) - { - if (endpoint == m_selectedEndpoint) - { - m_selectedEndpoint = nullptr; - } - m_endpoints.removeAll(endpoint); - delete endpoint; - } - - Endpoint* EndpointManager::GetSelectedEndpoint() const - { - return m_selectedEndpoint; - } - - QList::const_iterator EndpointManager::begin() const - { - return m_endpoints.begin(); - } - - QList::const_iterator EndpointManager::end() const - { - return m_endpoints.end(); - } - - void EndpointManager::ClearEndpoints() - { - for (auto endpoint : m_endpoints) - { - delete endpoint; - } - m_endpoints.clear(); - } - - void EndpointManager::SaveUrl() const - { - if (!m_selectedEndpoint) - { - return; - } - // Editor looks for config file in /dev folder, so this file is placed in parent directory - QFile file(QCoreApplication::applicationDirPath() + "/newsConfig.txt"); - if (file.open(QIODevice::WriteOnly)) - { - QTextStream out(&file); - out << m_selectedEndpoint->GetUrl(); - file.close(); - } - } - -} diff --git a/Code/Tools/News/NewsBuilder/EndpointManager.h b/Code/Tools/News/NewsBuilder/EndpointManager.h deleted file mode 100644 index cc44951d16..0000000000 --- a/Code/Tools/News/NewsBuilder/EndpointManager.h +++ /dev/null @@ -1,77 +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 - -class QJsonObject; - -namespace News -{ - //! Endpoint represents a location of news data - class Endpoint - { - public: - Endpoint(QString name, QString awsProfile, QString url, QString bucket); - explicit Endpoint(const QJsonObject& json); - ~Endpoint(); - - void Write(QJsonObject& json) const; - - QString GetName() const; - void SetName(const QString& name); - - QString GetAwsProfile() const; - void SetAwsProfile(const QString& awsProfile); - - QString GetUrl() const; - void SetUrl(const QString& url); - - QString GetBucket() const; - void SetBucket(const QString& bucket); - - private: - //! name of endpoint to distinguish with others - QString m_name; - //! name of aws credentials file - QString m_awsProfile; - //! url location of news data (e.g. cloudfront url) - QString m_url; - //! name of s3 bucket where news data resides - QString m_bucket; - }; - - //! EndpointManager handles endpoint collection - class EndpointManager - { - public: - EndpointManager(); - ~EndpointManager(); - - //! Load endpoints file - void Load(); - //! Save endpoints file - void Save(); - void SelectEndpoint(Endpoint* endpoint); - void AddEndpoint(Endpoint* endpoint); - void RemoveEndpoint(Endpoint* endpoint); - Endpoint* GetSelectedEndpoint() const; - - QList::const_iterator begin() const; - QList::const_iterator end() const; - - private: - QList m_endpoints; - Endpoint* m_selectedEndpoint = nullptr; - - void ClearEndpoints(); - //! Saves news config file which is used by LY Editor to determine news location - void SaveUrl() const; - }; -} diff --git a/Code/Tools/News/NewsBuilder/Platform/iOS/PAL_ios.cmake b/Code/Tools/News/NewsBuilder/Platform/iOS/PAL_ios.cmake deleted file mode 100644 index 929d864fc4..0000000000 --- a/Code/Tools/News/NewsBuilder/Platform/iOS/PAL_ios.cmake +++ /dev/null @@ -1,8 +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 -# -# - -set(PAL_TRAIT_BUILD_NEWSBUILDER_SUPPORTED FALSE) diff --git a/Code/Tools/News/NewsBuilder/Qt/ArticleDetails.cpp b/Code/Tools/News/NewsBuilder/Qt/ArticleDetails.cpp deleted file mode 100644 index 2872a714e8..0000000000 --- a/Code/Tools/News/NewsBuilder/Qt/ArticleDetails.cpp +++ /dev/null @@ -1,295 +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 "ArticleDetails.h" -#include "SelectImage.h" -#include -#include "ResourceManagement/BuilderResourceManifest.h" -#include "ResourceManagement/ImageDescriptor.h" -#include "NewsShared/ErrorCodes.h" - -#include - -#include -#include -#include -#include - -#include "Qt/ui_ArticleDetails.h" - -namespace News -{ - - ArticleDetails::ArticleDetails(QWidget* parent, - Resource& resource, - BuilderResourceManifest& manifest) - : QWidget(parent) - , m_ui(new Ui::ArticleDetailsWidget) - , m_filename("") - , m_article(resource) - , m_manifest(manifest) - , m_imageIdOriginal("") - , m_imageId("") - { - m_ui->setupUi(this); - m_ui->uidLabel->setText(QString("Article: %1").arg(m_article.GetResource().GetId())); - - resizePreviewImage(); - - //! try to load image icon - auto pImageResource = m_manifest.FindById(m_article.GetImageId()); - if (pImageResource) - { - m_imageIdOriginal = pImageResource->GetId(); - SetImage(*pImageResource); - } - else - { - SetNoImage(); - } - - m_ui->titleText->setText(m_article.GetTitle()); - m_ui->descriptionText->setPlainText(m_article.GetBody()); - - connect(m_ui->fromFileButton, &QPushButton::clicked, this, &ArticleDetails::OpenImageFromFile); - connect(m_ui->fromResourceButton, &QPushButton::clicked, this, &ArticleDetails::OpenImageFromResource); - connect(m_ui->clearImageButton, &QPushButton::clicked, this, &ArticleDetails::ClearImage); - connect(m_ui->updateButton, &QPushButton::clicked, this, &ArticleDetails::UpdateArticle); - connect(m_ui->deleteButton, &QPushButton::clicked, this, &ArticleDetails::DeleteArticle); - connect(m_ui->cancelButton, &QPushButton::clicked, this, &ArticleDetails::Close); - connect(m_ui->upButton, &QPushButton::clicked, this, &ArticleDetails::MoveUp); - connect(m_ui->downButton, &QPushButton::clicked, this, &ArticleDetails::MoveDown); - } - - ArticleDetails::~ArticleDetails() {} - - void ArticleDetails::resizeEvent(QResizeEvent *event) - { - QWidget::resizeEvent(event); - resizePreviewImage(); - } - - void ArticleDetails::resizePreviewImage() - { - // Resize the imagePreview to keep the proportions - int newHeight = aznumeric_cast(m_imageRatio * width()); - m_ui->imagePreview->setFixedHeight(newHeight); - } - - ArticleDescriptor& ArticleDetails::GetArticle() - { - return m_article; - } - - QString ArticleDetails::GetId() const - { - return m_article.GetResource().GetId(); - } - - void ArticleDetails::OpenImageFromFile() - { - m_filename = QFileDialog::getOpenFileName(this, - "Open Image", ".", "Image Files (*.png *.jpg *.bmp)"); - SetImage(m_filename); - } - - void ArticleDetails::OpenImageFromResource() - { - m_pSelectImage = new SelectImage(m_manifest); - if (m_pSelectImage->exec() == QDialog::DialogCode::Accepted) - { - auto pSelectedResource = m_pSelectImage->GetSelected(); - if (!pSelectedResource) - { - QMessageBox msgBox(QMessageBox::Critical, - "Error", - "No resource pSelectedResource", - QMessageBox::Ok, - this); - msgBox.exec(); - return; - } - SetImage(*pSelectedResource); - } - delete m_pSelectImage; - } - - //! once the Update button is clicked, article resource is updated in this function - void ArticleDetails::UpdateArticle() - { - //! this flag remains false if no new changes are detected, thus avoiding unnecessary - //! re-uploading unchanged resources - bool updated = false; - - m_imageId = LoadImage(); - if (m_imageId.compare(m_imageIdOriginal) != 0) - { - m_article.SetImageId(m_imageId); - m_filename = ""; - m_imageIdOriginal = m_imageId; - m_ui->imagePathLabel->setText(QString("Image: %1").arg(m_imageId)); - updated = true; - } - - QString newTitle = m_ui->titleText->text(); - if (m_article.GetTitle().compare(newTitle)) - { - m_article.SetTitle(newTitle); - updated = true; - } - QString newBody = m_ui->descriptionText->toPlainText(); - if (m_article.GetBody().compare(newBody) != 0) - { - m_article.SetBody(newBody); - updated = true; - } - - QString newStyle = m_ui->articleStyleButtonGroup->checkedButton()->property("style").toString(); - if (m_article.GetArticleStyle() != newStyle) - { - m_article.SetArticleStyle(newStyle); - updated = true; - } - - if (updated) - { - m_article.Update(); - m_manifest.UpdateResource(&m_article.GetResource()); - emit logSignal(QString("Article %1 updated") - .arg(m_article.GetResource().GetId()), LogOk); - } - else - { - emit logSignal("Nothing to update", LogWarning); - } - emit updateArticleSignal(); - } - - //! try to load an image either from filename or from another resource, - //! update resource manifest accordingly - QString ArticleDetails::LoadImage() const - { - if (!m_filename.isEmpty()) - { - if (!m_imageIdOriginal.isEmpty()) - { - m_manifest.FreeResource(m_imageIdOriginal); - } - auto pResource = m_manifest.AddImage(m_filename); - if (pResource) - { - return pResource->GetId(); - } - return ""; - } - - if (m_imageId.compare(m_imageIdOriginal) != 0) - { - if (!m_imageIdOriginal.isEmpty()) - { - m_manifest.FreeResource(m_imageIdOriginal); - } - if (!m_imageId.isEmpty()) - { - m_manifest.UseResource(m_imageId); - } - return m_imageId; - } - - return m_imageIdOriginal; - } - - void ArticleDetails::SetImage(Resource& resource) - { - m_ui->imagePathLabel->setText(QString("Image: %1").arg(resource.GetId())); - - QPixmap pixmap; - if (pixmap.loadFromData(resource.GetData())) - { - m_ui->imagePreview->setPixmap(pixmap); - m_imageId = resource.GetId(); - } - else - { - SetNoImage(); - emit logSignal(QString("Failed to load image: %1.").arg(m_imageId)); - } - } - - void ArticleDetails::SetImage([[maybe_unused]] QString& filename) - { - m_ui->imagePathLabel->setText(QString("Image: %1").arg(m_filename)); - - QPixmap pixmap; - if (pixmap.load(m_filename)) - { - m_ui->imagePreview->setPixmap(pixmap); - } - else - { - SetNoImage(); - emit logSignal(QString("Failed to load image: %1.").arg(m_filename)); - } - } - - void ArticleDetails::SetNoImage() const - { - m_ui->imagePreview->setPixmap(QPixmap(":/images/Resources/missing-image.png")); - m_ui->imagePathLabel->setText("no image"); - } - - void ArticleDetails::ClearImage() - { - m_imageId = ""; - m_filename = ""; - SetNoImage(); - } - - void ArticleDetails::DeleteArticle() - { - if (!m_article.GetImageId().isEmpty()) - { - m_manifest.FreeResource(m_article.GetImageId()); - } - m_manifest.FreeResource(m_article.GetResource().GetId()); - emit deleteArticleSignal(); - } - - void ArticleDetails::Close() - { - emit closeArticleSignal(); - } - - void ArticleDetails::MoveUp() - { - ErrorCode error; - if (!m_manifest.UpdateArticleOrder(m_article.GetResource().GetId(), 1, error)) - { - emit logSignal(GetErrorMessage(error)); - } - else - { - emit orderChangedSignal(m_article.GetResource().GetId(), 1); - } - } - - void ArticleDetails::MoveDown() - { - ErrorCode error; - if (!m_manifest.UpdateArticleOrder(m_article.GetResource().GetId(), 0, error)) - { - emit logSignal(GetErrorMessage(error)); - } - else - { - emit orderChangedSignal(m_article.GetResource().GetId(), 0); - } - } - -#include "Qt/moc_ArticleDetails.cpp" - -} diff --git a/Code/Tools/News/NewsBuilder/Qt/ArticleDetails.h b/Code/Tools/News/NewsBuilder/Qt/ArticleDetails.h deleted file mode 100644 index 7f8d482e3f..0000000000 --- a/Code/Tools/News/NewsBuilder/Qt/ArticleDetails.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - - -#if !defined(Q_MOC_RUN) -#include -#include "ResourceManagement/BuilderResourceManifest.h" - -#include -#endif - -namespace Ui -{ - class ArticleDetailsWidget; -} - -namespace News { - class SelectImage; - class ResourceManifest; - class Resource; - - //! Control that allows to modify all parameters of a single article - class ArticleDetails - : public QWidget - { - Q_OBJECT - - public: - ArticleDetails(QWidget* parent, - Resource& resource, - BuilderResourceManifest& manifest); - ~ArticleDetails(); - ArticleDescriptor& GetArticle(); - QString GetId() const; - - Q_SIGNALS: - void logSignal(QString text, LogType logType = LogInfo); - void deleteArticleSignal(); - void updateArticleSignal(); - void closeArticleSignal(); - void orderChangedSignal(QString id, bool direction); - - private: - QScopedPointer m_ui; - QString m_filename; - ArticleDescriptor m_article; - BuilderResourceManifest& m_manifest; - SelectImage* m_pSelectImage; - QString m_imageIdOriginal; - QString m_imageId; - float m_imageRatio = 184.0f / 430.0f; - - void resizeEvent(QResizeEvent *event) override; - void resizePreviewImage(); - - void OpenImageFromFile(); - void OpenImageFromResource(); - QString LoadImage() const; - void SetImage(Resource& resource); - void SetImage(QString& filename); - void SetNoImage() const; - void ClearImage(); - - void UpdateArticle(); - void DeleteArticle(); - void Close(); - void MoveUp(); - void MoveDown(); - }; -} // namespace News diff --git a/Code/Tools/News/NewsBuilder/Qt/ArticleDetails.ui b/Code/Tools/News/NewsBuilder/Qt/ArticleDetails.ui deleted file mode 100644 index 92970f1130..0000000000 --- a/Code/Tools/News/NewsBuilder/Qt/ArticleDetails.ui +++ /dev/null @@ -1,406 +0,0 @@ - - - ArticleDetailsWidget - - - - 0 - 0 - 250 - 420 - - - - - 0 - 0 - - - - - 100 - 420 - - - - - 640 - 16777215 - - - - Form - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - 100 - 100 - - - - - 16777215 - 16777215 - - - - - - - :/images/Resources/missing-image.png - - - false - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - 100 - 100 - - - - - - - - - 16777215 - 140 - - - - - 0 - - - - - Image: - - - true - - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - 0 - - - - - - 16777215 - 16777215 - - - - Clear - - - - - - - - 16777215 - 16777215 - - - - Library... - - - - - - - - 16777215 - 16777215 - - - - Load... - - - - - - - - - - - - - - - - 1280 - 1280 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 16777215 - 20 - - - - Article: 0 - - - - - - - 0 - - - 0 - - - 3 - - - 0 - - - 3 - - - - - Default Style - - - true - - - default - - - articleStyleButtonGroup - - - - - - - Pinned Style - - - pinned - - - articleStyleButtonGroup - - - - - - - - - Title: - - - - - - - true - - - - - - - - - - 0 - - - - - Description: - - - - - - - - - - 0 - - - - - 0 - - - - - Delete - - - - - - - Cancel - - - - - - - Save - - - - - - - - - 0 - - - - - - 16777215 - 16777215 - - - - Move Up - - - - - - - - 16777215 - 16777215 - - - - Move Down - - - - - - - - - - - - - - - - - AzQtComponents::ExtendedLabel - QLabel -
AzQtComponents/Components/ExtendedLabel.h
-
-
- - - - - - - -
diff --git a/Code/Tools/News/NewsBuilder/Qt/ArticleDetailsContainer.cpp b/Code/Tools/News/NewsBuilder/Qt/ArticleDetailsContainer.cpp deleted file mode 100644 index 586978a562..0000000000 --- a/Code/Tools/News/NewsBuilder/Qt/ArticleDetailsContainer.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 "ArticleDetailsContainer.h" -#include "ResourceManagement/BuilderResourceManifest.h" -#include "ArticleDetails.h" -#include "Qt/ui_ArticleDetailsContainer.h" - -namespace News -{ - - ArticleDetailsContainer::ArticleDetailsContainer( - QWidget* parent, - BuilderResourceManifest& manifest) - : QWidget(parent) - , m_ui(new Ui::ArticleDetailsContainerWidget) - , m_manifest(manifest) - , m_articleDetails(nullptr) - { - m_ui->setupUi(this); - } - - ArticleDetailsContainer::~ArticleDetailsContainer() {} - - //! When article is selected, old articleDetails control is removed, new one is created - void ArticleDetailsContainer::SelectArticle(const QString& id) - { - closeArticleSlot(); - - if (!id.isEmpty()) - { - auto article = m_manifest.FindById(id); - if (article) - { - m_articleDetails = new ArticleDetails( - m_ui->scrollAreaWidgetContents, - *article, - m_manifest); - m_ui->scrollAreaWidgetContents->layout()->addWidget(m_articleDetails); - connect(m_articleDetails, &ArticleDetails::updateArticleSignal, - this, &ArticleDetailsContainer::updateArticleSlot); - connect(m_articleDetails, &ArticleDetails::deleteArticleSignal, - this, &ArticleDetailsContainer::deleteArticleSlot); - connect(m_articleDetails, &ArticleDetails::closeArticleSignal, - this, &ArticleDetailsContainer::closeArticleSlot); - connect(m_articleDetails, SIGNAL(logSignal(QString, LogType)), - this, SIGNAL(logSignal(QString, LogType))); - connect(m_articleDetails, SIGNAL(orderChangedSignal(QString, bool)), - this, SIGNAL(orderChangedSignal(QString, bool))); - m_selectedId = id; - } - } - } - - void ArticleDetailsContainer::Reset() - { - SelectArticle(m_selectedId); - } - - void ArticleDetailsContainer::updateArticleSlot() - { - emit updateArticleSignal(m_articleDetails->GetId()); - } - - void ArticleDetailsContainer::deleteArticleSlot() - { - emit deleteArticleSignal(m_articleDetails->GetId()); - closeArticleSlot(); - } - - void ArticleDetailsContainer::closeArticleSlot() - { - if (m_articleDetails) - { - emit closeArticleSignal(m_selectedId); - delete m_articleDetails; - m_articleDetails = nullptr; - m_selectedId = ""; - } - } - -#include "Qt/moc_ArticleDetailsContainer.cpp" - -} diff --git a/Code/Tools/News/NewsBuilder/Qt/ArticleDetailsContainer.h b/Code/Tools/News/NewsBuilder/Qt/ArticleDetailsContainer.h deleted file mode 100644 index 1df42198c3..0000000000 --- a/Code/Tools/News/NewsBuilder/Qt/ArticleDetailsContainer.h +++ /dev/null @@ -1,59 +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 - -#if !defined(Q_MOC_RUN) -#include -#include -#endif - -namespace Ui -{ - class ArticleDetailsContainerWidget; -} - -namespace News -{ - class ArticleDetails; - class BuilderResourceManifest; - class SelectImage; - class ResourceManifest; - class Resource; - - //! Control that manages articleDetails control - class ArticleDetailsContainer - : public QWidget - { - Q_OBJECT - - public: - ArticleDetailsContainer(QWidget* parent, BuilderResourceManifest& manifest); - ~ArticleDetailsContainer(); - - void SelectArticle(const QString& id); - void Reset(); - -Q_SIGNALS: - void logSignal(QString text, LogType logType = LogInfo); - void updateArticleSignal(QString id); - void deleteArticleSignal(QString id); - void closeArticleSignal(QString id); - void orderChangedSignal(QString id, bool direction); - - private: - QScopedPointer m_ui; - BuilderResourceManifest& m_manifest; - ArticleDetails* m_articleDetails = nullptr; - QString m_selectedId; - - private Q_SLOTS: - void updateArticleSlot(); - void deleteArticleSlot(); - void closeArticleSlot(); - }; -} // namespace News diff --git a/Code/Tools/News/NewsBuilder/Qt/ArticleDetailsContainer.ui b/Code/Tools/News/NewsBuilder/Qt/ArticleDetailsContainer.ui deleted file mode 100644 index 7652fa114d..0000000000 --- a/Code/Tools/News/NewsBuilder/Qt/ArticleDetailsContainer.ui +++ /dev/null @@ -1,100 +0,0 @@ - - - ArticleDetailsContainerWidget - - - - 0 - 0 - 250 - 386 - - - - - 0 - 0 - - - - - 250 - 0 - - - - - 640 - 16777215 - - - - ArticleDetailsContainer - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - Qt::ScrollBarAlwaysOff - - - true - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - 0 - 0 - 248 - 384 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - - - diff --git a/Code/Tools/News/NewsBuilder/Qt/AwsDialog.ui b/Code/Tools/News/NewsBuilder/Qt/AwsDialog.ui deleted file mode 100644 index f58243ed8d..0000000000 --- a/Code/Tools/News/NewsBuilder/Qt/AwsDialog.ui +++ /dev/null @@ -1,102 +0,0 @@ - - - Dialog - - - - 0 - 0 - 176 - 137 - - - - - 0 - 0 - - - - Dialog - - - - - - - - - - AWS Key Id: - - - - - - - - - - - - - - AWS Secret Key: - - - - - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - - - buttonBox - accepted() - Dialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - Dialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - - diff --git a/Code/Tools/News/NewsBuilder/Qt/BuilderArticleViewContainer.cpp b/Code/Tools/News/NewsBuilder/Qt/BuilderArticleViewContainer.cpp deleted file mode 100644 index bf77a89895..0000000000 --- a/Code/Tools/News/NewsBuilder/Qt/BuilderArticleViewContainer.cpp +++ /dev/null @@ -1,157 +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 "BuilderArticleViewContainer.h" -#include "ResourceManagement/BuilderResourceManifest.h" -#include "ArticleDetails.h" -#include -#include -#include -#include "Qt/ui_BuilderArticleViewContainer.h" - -#include - -#include "QCustomMessageBox.h" - -namespace News -{ - - BuilderArticleViewContainer::BuilderArticleViewContainer( - QWidget* parent, - BuilderResourceManifest& manifest) - : QWidget(parent) - , m_ui(new Ui::BuilderArticleViewContainerWidget) - , m_container(new ArticleViewContainer(this, manifest)) - , m_manifest(manifest) - { - m_ui->setupUi(this); - - m_ui->ArticleViewContainerRoot->layout()->addWidget(m_container); - connect(m_container, SIGNAL(articleSelectedSignal(QString)), - this, SLOT(articleSelectedSlot(QString))); - } - - BuilderArticleViewContainer::~BuilderArticleViewContainer(){} - - void BuilderArticleViewContainer::AddArticle() - { - auto pArticleResource = static_cast(m_manifest).AddArticle(); - if (pArticleResource) - { - m_container->AddArticleView(ArticleDescriptor(*pArticleResource)); - SelectArticle(pArticleResource->GetId()); - } - } - - void BuilderArticleViewContainer::SelectArticle(QString id) - { - if (m_selectedArticleId.compare(id) == 0) - { - return; - } - - UnselectArticle(); - m_selectedArticleId = id; - auto article = m_container->FindById(id); - if (article) - { - m_container->ScrollToView(article); - emit articleSelectedSignal(id); - - // Add class and refresh style - AzQtComponents::Style::addClass(article, m_selectedArticleClass); - article->style()->unpolish(qApp); - article->style()->polish(qApp); - } - } - - void BuilderArticleViewContainer::Sync() - { - emit logSignal("Starting sync"); - - m_manifest.Sync(); - } - - void BuilderArticleViewContainer::UpdateArticle(QString& id) const - { - auto view = m_container->FindById(id); - if (view) - { - view->Update(); - m_container->ForceRefreshArticleView(view); - } - } - - void BuilderArticleViewContainer::DeleteArticle(QString& id) const - { - auto view = m_container->FindById(id); - if (view) - { - m_container->DeleteArticleView(view); - } - } - - //possibly support multiple selection in future? - void BuilderArticleViewContainer::CloseArticle(QString& id) - { - if (m_selectedArticleId == id) - { - UnselectArticle(); - } - } - - void BuilderArticleViewContainer::UpdateArticleOrder(QString& id, bool direction) const - { - auto view = m_container->FindById(id); - if (view) - { - m_container->UpdateArticleOrder(view, direction); - } - } - - void BuilderArticleViewContainer::PopulateArticles() - { - m_container->PopulateArticles(); - - if (!m_selectedArticleId.isEmpty()) - { - SelectArticle(m_selectedArticleId); - } - } - - void BuilderArticleViewContainer::AddErrorMessage() const - { - m_container->AddErrorMessage(); - } - - void BuilderArticleViewContainer::UnselectArticle() - { - if (m_selectedArticleId.isEmpty()) - { - return; - } - auto article = m_container->FindById(m_selectedArticleId); - - // Remove class and refresh style - if (article) - { - AzQtComponents::Style::removeClass(article, m_selectedArticleClass); - article->style()->unpolish(qApp); - article->style()->polish(qApp); - } - - m_selectedArticleId = ""; - } - - void BuilderArticleViewContainer::articleSelectedSlot(QString id) - { - SelectArticle(id); - } - -#include "Qt/moc_BuilderArticleViewContainer.cpp" - -} diff --git a/Code/Tools/News/NewsBuilder/Qt/BuilderArticleViewContainer.h b/Code/Tools/News/NewsBuilder/Qt/BuilderArticleViewContainer.h deleted file mode 100644 index 94712ca768..0000000000 --- a/Code/Tools/News/NewsBuilder/Qt/BuilderArticleViewContainer.h +++ /dev/null @@ -1,64 +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 - -#if !defined(Q_MOC_RUN) -#include -#include -#endif - -namespace Ui -{ - class BuilderArticleViewContainerWidget; -} - -namespace News -{ - class ArticleViewContainer; - class BuilderResourceManifest; - - //! BuilderArticleViewContainer is a Builder container for ArticleViewContainer. - /*! - It is a wrapper with additional builder functionality for displaying articles - */ - class BuilderArticleViewContainer - : public QWidget - { - Q_OBJECT - public: - BuilderArticleViewContainer(QWidget* parent, BuilderResourceManifest& manifest); - ~BuilderArticleViewContainer(); - - void UpdateArticle(QString& id) const; - void DeleteArticle(QString& id) const; - void CloseArticle(QString& id); - void UpdateArticleOrder(QString& id, bool direction) const; - void PopulateArticles(); - void AddErrorMessage() const; - void AddArticle(); - -Q_SIGNALS: - void logSignal(QString text, LogType logType = LogInfo); - void articleSelectedSignal(QString id); - - private: - QScopedPointer m_ui; - ArticleViewContainer* m_container; - QString m_selectedArticleId; - QString m_selectedArticleClass = "SelectedArticle"; - BuilderResourceManifest& m_manifest; - - void Sync(); - void SelectArticle(QString id); - void UnselectArticle(); - - - private Q_SLOTS: - void articleSelectedSlot(QString id); - }; -} // namespace News diff --git a/Code/Tools/News/NewsBuilder/Qt/BuilderArticleViewContainer.ui b/Code/Tools/News/NewsBuilder/Qt/BuilderArticleViewContainer.ui deleted file mode 100644 index dafac9b9ff..0000000000 --- a/Code/Tools/News/NewsBuilder/Qt/BuilderArticleViewContainer.ui +++ /dev/null @@ -1,57 +0,0 @@ - - - BuilderArticleViewContainerWidget - - - - 0 - 0 - 250 - 500 - - - - Form - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - - diff --git a/Code/Tools/News/NewsBuilder/Qt/EndpointEntryView.cpp b/Code/Tools/News/NewsBuilder/Qt/EndpointEntryView.cpp deleted file mode 100644 index 5e698eea97..0000000000 --- a/Code/Tools/News/NewsBuilder/Qt/EndpointEntryView.cpp +++ /dev/null @@ -1,58 +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 "EndpointEntryView.h" -#include "Qt/ui_EndpointEntryView.h" -#include -#include - -namespace News -{ - - const char* EndpointEntryView::SELECTED_CSS = - "background-color: rgb(60, 100, 60);\ncolor: white;"; - const char* EndpointEntryView::UNSELECTED_CSS = - "background-color: rgb(60, 60, 60);\ncolor: white;"; - - EndpointEntryView::EndpointEntryView(QWidget* parent, Endpoint* pEndpoint) - : QWidget(parent) - , m_ui(new Ui::EndpointEntryViewWidget) - , m_pEndpoint(pEndpoint) - { - m_ui->setupUi(this); - - m_ui->labelName->setText(pEndpoint->GetName()); - - connect(m_ui->labelName, &AzQtComponents::ExtendedLabel::clicked, this, &EndpointEntryView::selectSlot); - connect(m_ui->buttonDelete, &QToolButton::clicked, this, &EndpointEntryView::deleteSlot); - } - - EndpointEntryView::~EndpointEntryView() {} - - void EndpointEntryView::SetSelected(bool selected) - { - setStyleSheet(selected ? SELECTED_CSS : UNSELECTED_CSS); - } - - Endpoint* EndpointEntryView::GetEndpoint() const - { - return m_pEndpoint; - } - - void EndpointEntryView::selectSlot() - { - emit selectSignal(this); - } - - void EndpointEntryView::deleteSlot() - { - emit deleteSignal(this); - } - -#include "Qt/moc_EndpointEntryView.cpp" - -} diff --git a/Code/Tools/News/NewsBuilder/Qt/EndpointEntryView.h b/Code/Tools/News/NewsBuilder/Qt/EndpointEntryView.h deleted file mode 100644 index c8b014c167..0000000000 --- a/Code/Tools/News/NewsBuilder/Qt/EndpointEntryView.h +++ /dev/null @@ -1,51 +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 - -#if !defined(Q_MOC_RUN) -#include -#endif - -namespace Ui -{ - class EndpointEntryViewWidget; -} - -namespace News -{ - class Endpoint; - - //! Qt widget representing a single endpoint entry - class EndpointEntryView - : public QWidget - { - Q_OBJECT - public: - EndpointEntryView(QWidget* parent, Endpoint* pEndpoint); - ~EndpointEntryView(); - - void SetSelected(bool selected); - - Endpoint* GetEndpoint() const; - - Q_SIGNALS: - void selectSignal(EndpointEntryView* pEndpointView); - void deleteSignal(EndpointEntryView* pEndpointView); - - private: - static const char* SELECTED_CSS; - static const char* UNSELECTED_CSS; - - QScopedPointer m_ui; - Endpoint* m_pEndpoint = nullptr; - - private Q_SLOTS: - void selectSlot(); - void deleteSlot(); - }; -} // namespace News diff --git a/Code/Tools/News/NewsBuilder/Qt/EndpointEntryView.ui b/Code/Tools/News/NewsBuilder/Qt/EndpointEntryView.ui deleted file mode 100644 index 309fcd5662..0000000000 --- a/Code/Tools/News/NewsBuilder/Qt/EndpointEntryView.ui +++ /dev/null @@ -1,87 +0,0 @@ - - - EndpointEntryViewWidget - - - - 0 - 0 - 356 - 23 - - - - - 0 - 23 - - - - - 16777215 - 23 - - - - Form - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - TextLabel - - - Qt::AlignCenter - - - - - - - - 25 - 0 - - - - - 25 - 16777215 - - - - background-color: red; - - - X - - - - - - - - AzQtComponents::ExtendedLabel - QLabel -
AzQtComponents/Components/ExtendedLabel.h
-
-
- - -
diff --git a/Code/Tools/News/NewsBuilder/Qt/EndpointManagerView.cpp b/Code/Tools/News/NewsBuilder/Qt/EndpointManagerView.cpp deleted file mode 100644 index e28245b895..0000000000 --- a/Code/Tools/News/NewsBuilder/Qt/EndpointManagerView.cpp +++ /dev/null @@ -1,221 +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 "EndpointManagerView.h" -#include "EndpointManager.h" -#include "EndpointEntryView.h" -#include "Qt/ui_EndpointManagerView.h" -#include "Qt/QCustomMessageBox.h" -#include "ResourceManagement/BuilderResourceManifest.h" - -#include - -namespace News -{ - - EndpointManagerView::EndpointManagerView(QWidget* parent, - BuilderResourceManifest& manifest) - : QDialog(parent) - , m_ui(new Ui::EndpointManagerViewWidget) - , m_pManager(manifest.GetEndpointManager()) - , m_manifest(manifest) - { - m_ui->setupUi(this); - - for (auto endpoint : *m_pManager) - { - auto endpointView = AddEndpointEntry(endpoint); - if (m_pManager->GetSelectedEndpoint() == endpoint) - { - selectEndpointSlot(endpointView); - } - } - - connect(m_ui->buttonBox, SIGNAL(accepted()), this, SLOT(accept())); - connect(m_ui->buttonBox, SIGNAL(rejected()), this, SLOT(reject())); - connect(m_ui->buttonAdd, &QPushButton::clicked, this, &EndpointManagerView::addEndpointSlot); - } - - EndpointManagerView::~EndpointManagerView() {} - - EndpointEntryView* EndpointManagerView::AddEndpointEntry(Endpoint* pEndpoint) - { - auto endpointView = new EndpointEntryView(m_ui->endpointListContents, pEndpoint); - auto layout = static_cast(m_ui->endpointListContents->layout()); - layout->insertWidget(layout->count() - 2, endpointView); - m_endpoints.append(endpointView); - connect(endpointView, SIGNAL(selectSignal(EndpointEntryView*)), - this, SLOT(selectEndpointSlot(EndpointEntryView*))); - connect(endpointView, SIGNAL(deleteSignal(EndpointEntryView*)), - this, SLOT(deleteEndpointSlot(EndpointEntryView*))); - // this lets us modify newly-added widget in the same function - qApp->processEvents(); - return endpointView; - } - - void EndpointManagerView::Update() const - { - if (m_pSelectedEndpoint) - { - auto pEndpoint = m_pSelectedEndpoint->GetEndpoint(); - pEndpoint->SetName(m_ui->nameText->text()); - pEndpoint->SetAwsProfile(m_ui->awsProfileText->text()); - pEndpoint->SetUrl(m_ui->urlText->text()); - pEndpoint->SetBucket(m_ui->bucketText->text()); - m_pManager->SelectEndpoint(m_pSelectedEndpoint->GetEndpoint()); - } - m_pManager->Save(); - } - - void EndpointManagerView::accept() - { - enum SyncResponse - { - Merge, ReplaceLocal, ReplaceRemote, Cancel - }; - enum YesNoResponse - { - Yes, No - }; - - QCustomMessageBox msgBox( - QCustomMessageBox::Question, - tr("Pull data from Endpoint"), - tr("You are changing an endpoint. " - "What would you like to do with the data on the current endpoint?\n\n" - "Merge - merge resources from the endpoint\n" - "Replace Local - overwrite local resources with endpoint resources\n" - "Replace Endpoint - overwrite endpoint resources with local resources\n" - "Cancel - undo endpoint selection" - ), - this); - msgBox.AddButton(tr("Merge"), Merge); - msgBox.AddButton(tr("Replace Local"), ReplaceLocal); - msgBox.AddButton(tr("Replace Endpoint"), ReplaceRemote); - msgBox.AddButton(tr("Cancel"), Cancel); - - switch (msgBox.exec()) - { - case Merge: - { - m_manifest.SetSyncType(SyncType::Merge); - m_manifest.PersistLocalResources(); - } - break; - case ReplaceLocal: - { - if (m_manifest.HasChanges()) - { - QCustomMessageBox msgBoxWarning( - QCustomMessageBox::Critical, - tr("Unsaved changes"), - tr("Local resources were modified but not published." - "Changing endpoints will cause unpublished work to be lost.\n\n" - "Would you like to proceed?"), - this); - msgBoxWarning.AddButton(tr("Yes"), Yes); - msgBoxWarning.AddButton(tr("No"), No); - if (msgBoxWarning.exec() == No) - { - return; - } - } - m_manifest.SetSyncType(SyncType::Merge); - m_manifest.Reset(); - } - break; - case ReplaceRemote: - { - QCustomMessageBox msgBoxWarning2( - QCustomMessageBox::Critical, - tr("Warning"), - tr("This operation will IRREVERSABLY replace ALL resources on ") + - m_pSelectedEndpoint->GetEndpoint()->GetName() + - tr(" endpoint with local data.\n\n" - "Are you sure you'd like to proceed?"), - this); - msgBoxWarning2.AddButton(tr("Yes"), Yes); - msgBoxWarning2.AddButton(tr("No"), No); - if (msgBoxWarning2.exec() == No) - { - return; - } - m_manifest.SetSyncType(SyncType::Overwrite); - m_manifest.PersistLocalResources(); - } - break; - case Cancel: - return; - } - - Update(); - - QDialog::accept(); - } - - void EndpointManagerView::addEndpointSlot() - { - auto pEndpoint = new Endpoint( - QObject::tr("New endpoint"), - QObject::tr("Enter AWS profile name"), - QObject::tr("Enter root URL"), - QObject::tr("Enter s3 bucket name")); - m_pManager->AddEndpoint(pEndpoint); - auto endpointView = AddEndpointEntry(pEndpoint); - selectEndpointSlot(endpointView); - } - - void EndpointManagerView::selectEndpointSlot(EndpointEntryView* pEndpointView) - { - m_pSelectedEndpoint = pEndpointView; - - for (auto view : m_endpoints) - { - view->SetSelected(view == pEndpointView); - } - - if (pEndpointView) - { - auto pEndpoint = pEndpointView->GetEndpoint(); - m_ui->nameText->setText(pEndpoint->GetName()); - m_ui->awsProfileText->setText(pEndpoint->GetAwsProfile()); - m_ui->urlText->setText(pEndpoint->GetUrl()); - m_ui->bucketText->setText(pEndpoint->GetBucket()); - } - else - { - m_ui->nameText->setText(""); - m_ui->awsProfileText->setText(""); - m_ui->urlText->setText(""); - m_ui->bucketText->setText(""); - } - } - - void EndpointManagerView::deleteEndpointSlot(EndpointEntryView* pEndpointView) - { - m_pManager->RemoveEndpoint(pEndpointView->GetEndpoint()); - m_endpoints.removeAll(pEndpointView); - - if (pEndpointView == m_pSelectedEndpoint) - { - if (m_endpoints.count() > 0) - { - selectEndpointSlot(m_endpoints[0]); - } - else - { - selectEndpointSlot(nullptr); - } - } - - delete pEndpointView; - } - - -#include "Qt/moc_EndpointManagerView.cpp" - -} diff --git a/Code/Tools/News/NewsBuilder/Qt/EndpointManagerView.h b/Code/Tools/News/NewsBuilder/Qt/EndpointManagerView.h deleted file mode 100644 index c6362a06af..0000000000 --- a/Code/Tools/News/NewsBuilder/Qt/EndpointManagerView.h +++ /dev/null @@ -1,52 +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 - -#if !defined(Q_MOC_RUN) -#include -#endif - -namespace Ui -{ - class EndpointManagerViewWidget; -} - -namespace News -{ - class BuilderResourceManifest; - class Endpoint; - class EndpointEntryView; - class EndpointManager; - - //! Qt dialog for managing endpoints - class EndpointManagerView - : public QDialog - { - Q_OBJECT - public: - EndpointManagerView(QWidget* parent, - BuilderResourceManifest& manifest); - ~EndpointManagerView(); - - private: - QScopedPointer m_ui; - EndpointManager* m_pManager = nullptr; - EndpointEntryView* m_pSelectedEndpoint = nullptr; - QList m_endpoints; - BuilderResourceManifest& m_manifest; - - EndpointEntryView* AddEndpointEntry(Endpoint* pEndpoint); - void Update() const; - - private Q_SLOTS: - void accept() override; - void addEndpointSlot(); - void selectEndpointSlot(EndpointEntryView* pEndpoint); - void deleteEndpointSlot(EndpointEntryView* pEndpoint); - }; -} // namespace News diff --git a/Code/Tools/News/NewsBuilder/Qt/EndpointManagerView.ui b/Code/Tools/News/NewsBuilder/Qt/EndpointManagerView.ui deleted file mode 100644 index 5295e30616..0000000000 --- a/Code/Tools/News/NewsBuilder/Qt/EndpointManagerView.ui +++ /dev/null @@ -1,224 +0,0 @@ - - - EndpointManagerViewWidget - - - - 0 - 0 - 400 - 350 - - - - - 400 - 350 - - - - - 400 - 350 - - - - Change Endpoint - - - Qt::LeftToRight - - - - - - Qt::ScrollBarAlwaysOn - - - Qt::ScrollBarAlwaysOff - - - true - - - - - 0 - 0 - 363 - 189 - - - - - - - + - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - Name: - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 250 - 0 - - - - - - - - - - - - AWS Profile Name: - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 250 - 0 - - - - - - - - - - - - URL: - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 250 - 0 - - - - - - - - - - - - S3 Bucket - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 250 - 0 - - - - - - - - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - diff --git a/Code/Tools/News/NewsBuilder/Qt/ImageItem.cpp b/Code/Tools/News/NewsBuilder/Qt/ImageItem.cpp deleted file mode 100644 index 1566b8309d..0000000000 --- a/Code/Tools/News/NewsBuilder/Qt/ImageItem.cpp +++ /dev/null @@ -1,54 +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 "ImageItem.h" -#include "NewsShared/ResourceManagement/Resource.h" - -#include "Qt/ui_ImageItem.h" - -namespace News -{ - - const char* ImageItem::SELECTED_CSS = - "border: 4px solid; border-color: white; background-color: rgb(45, 45, 45);"; - const char* ImageItem::UN_SELECTED_CSS = - "background-color: rgb(45, 45, 45);"; - - ImageItem::ImageItem(Resource& resource) - : QWidget() - , m_ui(new Ui::ImageItemWidget) - , m_resource(resource) - { - m_ui->setupUi(this); - - QPixmap pixmap; - pixmap.loadFromData(m_resource.GetData()); - m_ui->ImageLabel->setPixmap(pixmap); - - connect(m_ui->ImageLabel, &AzQtComponents::ExtendedLabel::clicked, this, &ImageItem::imageClickedSlot); - } - - void ImageItem::imageClickedSlot() - { - emit selectSignal(this); - } - - ImageItem::~ImageItem() {} - - void ImageItem::SetSelect(bool selected) const - { - m_ui->ImageLabel->setStyleSheet(selected ? SELECTED_CSS : UN_SELECTED_CSS); - } - - Resource& ImageItem::GetResource() const - { - return m_resource; - } - -#include "Qt/moc_ImageItem.cpp" - -} diff --git a/Code/Tools/News/NewsBuilder/Qt/ImageItem.h b/Code/Tools/News/NewsBuilder/Qt/ImageItem.h deleted file mode 100644 index ba883bc736..0000000000 --- a/Code/Tools/News/NewsBuilder/Qt/ImageItem.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#if !defined(Q_MOC_RUN) -#include -#endif - -namespace Ui -{ - class ImageItemWidget; -} - -namespace News { - class Resource; - - //! A clickable image in selectImage control - class ImageItem - : public QWidget - { - Q_OBJECT - public: - explicit ImageItem(Resource& resource); - ~ImageItem(); - - void SetSelect(bool selected) const; - Resource& GetResource() const; - - Q_SIGNALS: - void selectSignal(ImageItem* imageItem); - - private: - QScopedPointer m_ui; - const static char* SELECTED_CSS; - const static char* UN_SELECTED_CSS; - - Resource& m_resource; - private Q_SLOTS: - void imageClickedSlot(); - }; -} diff --git a/Code/Tools/News/NewsBuilder/Qt/ImageItem.ui b/Code/Tools/News/NewsBuilder/Qt/ImageItem.ui deleted file mode 100644 index 9aef880c10..0000000000 --- a/Code/Tools/News/NewsBuilder/Qt/ImageItem.ui +++ /dev/null @@ -1,65 +0,0 @@ - - - ImageItemWidget - - - - 0 - 0 - 200 - 200 - - - - - 200 - 200 - - - - - 200 - 200 - - - - Form - - - - 20 - - - 20 - - - 20 - - - 20 - - - - - - - - - 160 - 90 - - - - - - - - - AzQtComponents::ExtendedLabel1 - QLabel -
AzQtComponents/Components/ExtendedLabel.h
-
-
- - -
diff --git a/Code/Tools/News/NewsBuilder/Qt/LogContainer.cpp b/Code/Tools/News/NewsBuilder/Qt/LogContainer.cpp deleted file mode 100644 index 5efda641db..0000000000 --- a/Code/Tools/News/NewsBuilder/Qt/LogContainer.cpp +++ /dev/null @@ -1,51 +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 "LogContainer.h" - -#include "Qt/ui_LogContainer.h" - -namespace News -{ - - LogContainer::LogContainer(QWidget* parent) - : QWidget(parent) - , m_ui(new Ui::LogContainerWidget) - { - m_ui->setupUi(this); - } - - LogContainer::~LogContainer() {} - - void LogContainer::AddLog(QString text, LogType logType) const { - QString color; - switch (logType) - { - case LogOk: - color = "green"; - break; - case LogInfo: - color = "white"; - break; - case LogError: - color = "red"; - break; - case LogWarning: - color = "yellow"; - break; - default: - color = "white"; - break; - } - auto fullText = QString("%2
").arg(color).arg(text); - m_ui->logText->setTextFormat(Qt::RichText); - m_ui->logText->setText(QString("%2%1").arg(m_ui->logText->text()).arg(fullText)); - } - -#include "Qt/moc_LogContainer.cpp" - -} diff --git a/Code/Tools/News/NewsBuilder/Qt/LogContainer.h b/Code/Tools/News/NewsBuilder/Qt/LogContainer.h deleted file mode 100644 index 8f46f3b406..0000000000 --- a/Code/Tools/News/NewsBuilder/Qt/LogContainer.h +++ /dev/null @@ -1,37 +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 - -#if !defined(Q_MOC_RUN) -#include -#include -#endif - -namespace Ui -{ - class LogContainerWidget; -} - -namespace News -{ - //! A control for displaying log - class LogContainer - : public QWidget - { - Q_OBJECT - - public: - explicit LogContainer(QWidget* parent); - ~LogContainer(); - - void AddLog(QString text, LogType logType) const; - - private: - QScopedPointer m_ui; - }; -} // namespace News diff --git a/Code/Tools/News/NewsBuilder/Qt/LogContainer.ui b/Code/Tools/News/NewsBuilder/Qt/LogContainer.ui deleted file mode 100644 index 3757f52480..0000000000 --- a/Code/Tools/News/NewsBuilder/Qt/LogContainer.ui +++ /dev/null @@ -1,131 +0,0 @@ - - - LogContainerWidget - - - - 0 - 0 - 547 - 125 - - - - - 0 - 0 - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - LogContainer - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - true - - - - - 0 - 0 - 545 - 123 - - - - - 0 - 0 - - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - background-color: rgb(45, 45, 45); - - - - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - true - - - false - - - Qt::TextBrowserInteraction - - - - - - - - - - - - diff --git a/Code/Tools/News/NewsBuilder/Qt/NewsBuilder.cpp b/Code/Tools/News/NewsBuilder/Qt/NewsBuilder.cpp deleted file mode 100644 index 5cbb510dd6..0000000000 --- a/Code/Tools/News/NewsBuilder/Qt/NewsBuilder.cpp +++ /dev/null @@ -1,243 +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 "NewsBuilder.h" -#include "Qt/ArticleDetails.h" -#include "Qt/BuilderArticleViewContainer.h" -#include "NewsShared/Qt/ArticleViewContainer.h" -#include "NewsShared/ResourceManagement/Resource.h" -#include "ResourceManagement/BuilderResourceManifest.h" -#include "ArticleDetailsContainer.h" -#include "LogContainer.h" -#include "EndpointManagerView.h" -#include "EndpointManager.h" -#include "Qt/QCustomMessageBox.h" - -#include -#include - -AZ_PUSH_DISABLE_WARNING(4251 4996, "-Wunknown-warning-option") -#include -AZ_POP_DISABLE_WARNING - -#include -#include -#include -#include - -#include "Qt/ui_Newsbuilder.h" - -namespace News -{ - NewsBuilder::NewsBuilder(QWidget* parent, const AZ::IO::PathView& engineRootPath) - : QMainWindow(parent) - , m_ui(new Ui::NewsBuilderClass()) - , m_manifest(new BuilderResourceManifest( - std::bind(&NewsBuilder::SyncSuccess, this), - std::bind(&NewsBuilder::SyncFail, this, std::placeholders::_1), - std::bind(&NewsBuilder::SyncUpdate, this, std::placeholders::_1, std::placeholders::_2))) - , m_articleDetailsContainer(new ArticleDetailsContainer(this, *m_manifest)) - , m_articleViewContainer(new BuilderArticleViewContainer(this, *m_manifest)) - , m_logContainer(new LogContainer(this)) - { - - AzQtComponents::StyleManager* m_styleSheet = new AzQtComponents::StyleManager(this); - m_styleSheet->initialize(qApp, engineRootPath); - - m_ui->setupUi(this); - - QDir rootDir = QString::fromUtf8(engineRootPath.Native().data(), aznumeric_cast(engineRootPath.Native().size())); - const auto pathOnDisk = rootDir.absoluteFilePath("Code/Tools/News/NewsBuilder/Resources"); - const auto qrcPath = QStringLiteral(":/NewsBuilder"); - AzQtComponents::StyleManager::addSearchPaths("newsbuilder", pathOnDisk, qrcPath, engineRootPath); - - AzQtComponents::StyleManager::setStyleSheet(this, QStringLiteral("newsbuilder:NewsBuilder.qss")); - - UpdateEndpointLabel(); - - m_ui->articleViewContainerRoot->layout()->addWidget(m_articleViewContainer); - m_ui->articleDetailsContainerRoot->layout()->addWidget(m_articleDetailsContainer); - m_ui->dockWidgetContents->layout()->addWidget(m_logContainer); - - connect(m_articleViewContainer, SIGNAL(articleSelectedSignal(QString)), - this, SLOT(selectArticleSlot(QString))); - connect(m_articleViewContainer, SIGNAL(logSignal(QString, LogType)), - this, SLOT(addLogSlot(QString, LogType))); - - connect(m_articleDetailsContainer, &ArticleDetailsContainer::updateArticleSignal, - this, &NewsBuilder::updateArticleSlot); - connect(m_articleDetailsContainer, &ArticleDetailsContainer::deleteArticleSignal, - this, &NewsBuilder::deleteArticleSlot); - connect(m_articleDetailsContainer, &ArticleDetailsContainer::orderChangedSignal, - this, &NewsBuilder::orderChangedSlot); - connect(m_articleDetailsContainer, &ArticleDetailsContainer::closeArticleSignal, - this, &NewsBuilder::closeArticleSlot); - connect(m_articleDetailsContainer, SIGNAL(logSignal(QString, LogType)), - this, SLOT(addLogSlot(QString, LogType))); - - m_manifest->SetSyncType(SyncType::Merge); - m_manifest->Sync(); - - // Sync Console pane with View menu - connect(m_ui->actionConsole, &QAction::triggered, this, &NewsBuilder::OnViewLogWindow); - connect(m_ui->dockWidget, &QDockWidget::visibilityChanged, this, &NewsBuilder::OnViewVisibilityChanged); - } - - NewsBuilder::~NewsBuilder() {} - - void NewsBuilder::selectArticleSlot(const QString& id) const - { - m_articleDetailsContainer->SelectArticle(id); - } - - void NewsBuilder::addLogSlot(QString text, LogType logType) const - { - AddLog(text, logType); - } - - void NewsBuilder::addArticleToBottomSlot() const - { - m_articleViewContainer->AddArticle(); - } - - void NewsBuilder::updateArticleSlot(QString id) const - { - m_articleViewContainer->UpdateArticle(id); - } - - void NewsBuilder::deleteArticleSlot(QString id) const - { - m_articleViewContainer->DeleteArticle(id); - } - - void NewsBuilder::closeArticleSlot(QString id) const - { - m_articleViewContainer->CloseArticle(id); - } - - void NewsBuilder::orderChangedSlot(QString id, bool direction) const - { - m_articleViewContainer->UpdateArticleOrder(id, direction); - } - - void NewsBuilder::openSlot() - { - EndpointManagerView endpointManagerView( - m_ui->centralWidget, - *m_manifest); - if (endpointManagerView.exec() == QDialog::Accepted) - { - m_manifest->Sync(); - } - UpdateEndpointLabel(); - } - - void NewsBuilder::publishSlot() - { - if (!m_manifest->HasChanges()) - { - QCustomMessageBox msgBox( - QCustomMessageBox::Information, - tr("Nothing to publish"), - tr("No local changes were made, nothing to publish."), - this); - msgBox.AddButton(tr("Good"), 0); - msgBox.exec(); - return; - } - - enum Response - { - Yes, No - }; - - QCustomMessageBox msgBox( - QCustomMessageBox::Critical, - tr("Publish resources"), - tr("You are about to overwrite the current Open 3D Engine Welcome Message. Are you sure you want to publish?"), - this); - msgBox.AddButton("Yes", Yes); - msgBox.AddButton("No", No); - if (msgBox.exec() == Yes) - { - m_manifest->SetSyncType(SyncType::Verify); - m_manifest->Sync(); - } - } - - void NewsBuilder::OnViewVisibilityChanged([[maybe_unused]] bool visibility) - { - UpdateViewMenu(); - } - - void NewsBuilder::UpdateViewMenu() - { - if (m_ui->actionConsole->isChecked() != m_ui->dockWidget->isVisible()) - { - QSignalBlocker signalBlocker(m_ui->actionConsole); - m_ui->actionConsole->setChecked(m_ui->dockWidget->isVisible()); - } - } - - void NewsBuilder::OnViewLogWindow() - { - if (m_ui->dockWidget) - { - m_ui->dockWidget->toggleViewAction()->trigger(); - } - } - - void NewsBuilder::UpdateEndpointLabel() - { - auto pEndpoint = m_manifest->GetEndpointManager()->GetSelectedEndpoint(); - if (pEndpoint) - { - this->setWindowTitle("News Builder (" + pEndpoint->GetName() + ")"); - } - else - { - this->setWindowTitle("News Builder (No endpoint selected)"); - } - } - - void NewsBuilder::AddLog(QString text, LogType logType) const - { - m_logContainer->AddLog(text, logType); - } - - void NewsBuilder::SyncUpdate(const QString& message, LogType logType) const - { - AddLog(message, logType); - } - - void NewsBuilder::SyncFail(ErrorCode error) - { - const char* errorMessage = GetErrorMessage(error); - AddLog(tr("Sync failed: %1").arg(errorMessage), LogError); - QCustomMessageBox msgBoxSyncFail( - QCustomMessageBox::Critical, - tr("Sync failed"), - errorMessage, - this); - msgBoxSyncFail.AddButton("Ok", 0); - msgBoxSyncFail.exec(); - - m_articleViewContainer->PopulateArticles(); - m_articleDetailsContainer->Reset(); - } - - void NewsBuilder::SyncSuccess() const - { - AddLog("Sync completed", LogOk); - m_articleViewContainer->PopulateArticles(); - m_articleDetailsContainer->Reset(); - } -#include "Qt/moc_NewsBuilder.cpp" - -} diff --git a/Code/Tools/News/NewsBuilder/Qt/NewsBuilder.h b/Code/Tools/News/NewsBuilder/Qt/NewsBuilder.h deleted file mode 100644 index 61e25bda1b..0000000000 --- a/Code/Tools/News/NewsBuilder/Qt/NewsBuilder.h +++ /dev/null @@ -1,73 +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 - -#if !defined(Q_MOC_RUN) -#include - -#include "NewsShared/LogType.h" -#include "NewsShared/ErrorCodes.h" - -#include -#endif - -class QSignalMapper; -class QPushButton; - -namespace Ui -{ - class NewsBuilderClass; -} - -namespace News -{ - class BuilderArticleViewContainer; - class LogContainer; - class BuilderResourceManifest; - class ArticleDetailsContainer; - - //! A central control of News Builder. - class NewsBuilder - : public QMainWindow - { - Q_OBJECT - - public: - explicit NewsBuilder(QWidget* parent, const AZ::IO::PathView& engineRootPath); - ~NewsBuilder(); - - private: - QScopedPointer m_ui; - BuilderResourceManifest* m_manifest = nullptr; - ArticleDetailsContainer* m_articleDetailsContainer = nullptr; - BuilderArticleViewContainer* m_articleViewContainer = nullptr; - LogContainer* m_logContainer = nullptr; - - void UpdateEndpointLabel(); - void AddLog(QString text, LogType logType = LogInfo) const; - - void SyncUpdate(const QString& message, LogType logType) const; - void SyncFail(ErrorCode error); - void SyncSuccess() const; - - void OnViewVisibilityChanged(bool visibility); - void UpdateViewMenu(); - void OnViewLogWindow(); - - private Q_SLOTS: - void selectArticleSlot(const QString& id) const; - void addLogSlot(QString text, LogType logType) const; - void addArticleToBottomSlot() const; - void updateArticleSlot(QString id) const; - void deleteArticleSlot(QString id) const; - void closeArticleSlot(QString id) const; - void orderChangedSlot(QString id, bool direction) const; - void openSlot(); - void publishSlot(); - }; -} // namespace News diff --git a/Code/Tools/News/NewsBuilder/Qt/Newsbuilder.qrc b/Code/Tools/News/NewsBuilder/Qt/Newsbuilder.qrc deleted file mode 100644 index 768281fb12..0000000000 --- a/Code/Tools/News/NewsBuilder/Qt/Newsbuilder.qrc +++ /dev/null @@ -1,5 +0,0 @@ - - - ../Resources/missing-image.png - - diff --git a/Code/Tools/News/NewsBuilder/Qt/Newsbuilder.ui b/Code/Tools/News/NewsBuilder/Qt/Newsbuilder.ui deleted file mode 100644 index 55e7fe5b68..0000000000 --- a/Code/Tools/News/NewsBuilder/Qt/Newsbuilder.ui +++ /dev/null @@ -1,326 +0,0 @@ - - - NewsBuilderClass - - - - 0 - 0 - 800 - 540 - - - - - 0 - 480 - - - - - 1024 - 16777215 - - - - News Builder - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - 800 - 0 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - 480 - 0 - - - - - 16777215 - 16777215 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - - 0 - 0 - - - - - 100 - 0 - - - - - 0 - - - 5 - - - 5 - - - 5 - - - 5 - - - - - - - - - - - - - 0 - 0 - 800 - 21 - - - - - File - - - - - - - Article - - - - - - View - - - - - - - - - - - 0 - 0 - - - - - 63 - 66 - - - - QDockWidget::DockWidgetClosable - - - Qt::BottomDockWidgetArea - - - Console - - - 8 - - - - - 5 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - Change Endpoint - - - false - - - - - Publish Resources - - - false - - - - - Add to Bottom - - - - - Delete Selected - - - - - true - - - Console - - - - - - - AzQtComponents::StyledDockWidget - QDockWidget -
AzQtComponents/Components/StyledDockWidget.h
- 1 -
-
- - - - - - actionOpen - triggered() - NewsBuilderClass - openSlot() - - - -1 - -1 - - - 399 - 269 - - - - - actionPublish - triggered() - NewsBuilderClass - publishSlot() - - - -1 - -1 - - - 399 - 269 - - - - - actionAdd_New - triggered() - NewsBuilderClass - addArticleToBottomSlot() - - - -1 - -1 - - - 399 - 269 - - - - -
diff --git a/Code/Tools/News/NewsBuilder/Qt/QCustomMessageBox.cpp b/Code/Tools/News/NewsBuilder/Qt/QCustomMessageBox.cpp deleted file mode 100644 index 1b92f91e42..0000000000 --- a/Code/Tools/News/NewsBuilder/Qt/QCustomMessageBox.cpp +++ /dev/null @@ -1,82 +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 "QCustomMessageBox.h" -#include "Qt/ui_QCustomMessageBox.h" - -#include -#include -#include - -namespace News -{ - - QCustomMessageBox::QCustomMessageBox( - Icon icon, - const QString& title, - const QString& text, - QWidget* parent) - : QDialog(parent, Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint) - , m_ui(new Ui::CustomMessageBoxDialog) - { - m_ui->setupUi(this); - - m_signalMapper = new QSignalMapper(this); - - this->setWindowTitle(title); - m_ui->labelText->setText(text); - - QStyle* style = QApplication::style(); - QIcon tmpIcon; - switch (icon) - { - case Information: - tmpIcon = style->standardIcon(QStyle::SP_MessageBoxInformation); - break; - case Warning: - tmpIcon = style->standardIcon(QStyle::SP_MessageBoxWarning); - break; - case Critical: - tmpIcon = style->standardIcon(QStyle::SP_MessageBoxCritical); - break; - case Question: - tmpIcon = style->standardIcon(QStyle::SP_MessageBoxQuestion); - default: - break; - } - if (!tmpIcon.isNull()) - { - QLabel* iconLabel = new QLabel(this); - iconLabel->setPixmap(tmpIcon.pixmap(64, 64)); - m_ui->bodyLayout->insertWidget(0, iconLabel); - } - - connect(m_signalMapper, SIGNAL(mapped(int)), - this, SLOT(clickedSlot(int))); - } - - QCustomMessageBox::~QCustomMessageBox() - { - delete m_signalMapper; - } - - void QCustomMessageBox::AddButton(const QString& name, int result) - { - auto button = new QPushButton(name, this); - connect(button, SIGNAL(clicked()), m_signalMapper, SLOT(map())); - m_signalMapper->setMapping(button, result); - m_ui->buttonLayout->layout()->addWidget(button); - } - - void QCustomMessageBox::clickedSlot(int result) - { - done(result); - } - -#include "Qt/moc_QCustomMessageBox.cpp" - -} diff --git a/Code/Tools/News/NewsBuilder/Qt/QCustomMessageBox.h b/Code/Tools/News/NewsBuilder/Qt/QCustomMessageBox.h deleted file mode 100644 index 6cd6771514..0000000000 --- a/Code/Tools/News/NewsBuilder/Qt/QCustomMessageBox.h +++ /dev/null @@ -1,60 +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 - -#if !defined(Q_MOC_RUN) -#include -#endif - -class QSignalMapper; - -namespace Ui -{ - class CustomMessageBoxDialog; -} - -namespace News -{ - class ArticleDetails; - class BuilderResourceManifest; - class SelectImage; - class ResourceManifest; - class Resource; - - //! Allows to add custom buttons which is not well-supported by default QMessageBox - class QCustomMessageBox - : public QDialog - { - Q_OBJECT - - public: - enum Icon { - NoIcon = 0, - Information = 1, - Warning = 2, - Critical = 3, - Question = 4 - }; - - QCustomMessageBox( - Icon, - const QString& title, - const QString& text, - QWidget* parent); - ~QCustomMessageBox(); - - void AddButton(const QString& name, int result); - - private: - QScopedPointer m_ui; - QSignalMapper* m_signalMapper = nullptr; - - private Q_SLOTS: - void clickedSlot(int result); - }; -} // namespace News diff --git a/Code/Tools/News/NewsBuilder/Qt/QCustomMessageBox.ui b/Code/Tools/News/NewsBuilder/Qt/QCustomMessageBox.ui deleted file mode 100644 index c1fb5f40bf..0000000000 --- a/Code/Tools/News/NewsBuilder/Qt/QCustomMessageBox.ui +++ /dev/null @@ -1,84 +0,0 @@ - - - CustomMessageBoxDialog - - - - 0 - 0 - 102 - 43 - - - - - 0 - 0 - - - - Message Title - - - - - - - - - - - Message text - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - - - - - - 0 - - - - - Qt::Horizontal - - - - 40 - 0 - - - - - - - - 10 - - - - - - - Qt::Horizontal - - - - 40 - 0 - - - - - - - - - - - diff --git a/Code/Tools/News/NewsBuilder/Qt/SelectImage.cpp b/Code/Tools/News/NewsBuilder/Qt/SelectImage.cpp deleted file mode 100644 index 7a9e427f4b..0000000000 --- a/Code/Tools/News/NewsBuilder/Qt/SelectImage.cpp +++ /dev/null @@ -1,74 +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 "SelectImage.h" -#include "ImageItem.h" -#include "NewsShared/ResourceManagement/Resource.h" -#include "ResourceManagement/BuilderResourceManifest.h" - -#include "Qt/ui_SelectImage.h" - -namespace News -{ - - const int SelectImage::MAX_COLS = 2; - - SelectImage::SelectImage(const ResourceManifest& manifest) - : QDialog() - , m_ui(new Ui::SelectImageDialog) - , m_manifest(manifest) - { - m_ui->setupUi(this); - - auto layout = static_cast(m_ui->scrollAreaContents->layout()); - layout->setAlignment(Qt::AlignTop | Qt::AlignLeft); - int row = 0; - int col = 0; - //! read all image resources and populate the container - for (auto pResource : m_manifest) - { - if (pResource->GetType().compare("image") == 0) - { - auto imageItem = new ImageItem(*pResource); - connect(imageItem, &ImageItem::selectSignal, this, &SelectImage::ImageSelected); - layout->addWidget(imageItem, row, col, Qt::AlignLeft); - m_images.append(imageItem); - col++; - if (col >= MAX_COLS) - { - col = 0; - row++; - } - } - } - - connect(m_ui->buttonBox, SIGNAL(accepted()), this, SLOT(accept())); - connect(m_ui->buttonBox, SIGNAL(rejected()), this, SLOT(reject())); - } - - SelectImage::~SelectImage() {} - - Resource* SelectImage::GetSelected() const - { - return m_pSelected; - } - - void SelectImage::ImageSelected(ImageItem* imageItem) - { - for (auto image : m_images) - { - image->SetSelect(image == imageItem); - } - if (imageItem) - { - m_pSelected = &imageItem->GetResource(); - } - } - -#include "Qt/moc_SelectImage.cpp" - -} diff --git a/Code/Tools/News/NewsBuilder/Qt/SelectImage.h b/Code/Tools/News/NewsBuilder/Qt/SelectImage.h deleted file mode 100644 index 5fc80cfe5a..0000000000 --- a/Code/Tools/News/NewsBuilder/Qt/SelectImage.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#if !defined(Q_MOC_RUN) -#include -#endif - -namespace Ui -{ - class SelectImageDialog; -} - -namespace News { - class ImageItem; - class Resource; - class ResourceManifest; - - //! Allows to select existing images for multiple messages without re-uploading same one - class SelectImage - : public QDialog - { - Q_OBJECT - public: - explicit SelectImage(const ResourceManifest& manifest); - ~SelectImage(); - - void Select(); - void Close(); - Resource* GetSelected() const; - - private: - const static int MAX_COLS; - QScopedPointer m_ui; - const ResourceManifest& m_manifest; - QList m_images; - Resource* m_pSelected = nullptr; - - void ImageSelected(ImageItem* imageItem); - }; -} // namespace News diff --git a/Code/Tools/News/NewsBuilder/Qt/SelectImage.ui b/Code/Tools/News/NewsBuilder/Qt/SelectImage.ui deleted file mode 100644 index 55b27bfb7f..0000000000 --- a/Code/Tools/News/NewsBuilder/Qt/SelectImage.ui +++ /dev/null @@ -1,106 +0,0 @@ - - - SelectImageDialog - - - Qt::ApplicationModal - - - - 0 - 0 - 439 - 406 - - - - Select Image - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Qt::LeftToRight - - - Qt::ScrollBarAlwaysOff - - - true - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - 0 - 0 - 437 - 379 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 2 - - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - - diff --git a/Code/Tools/News/NewsBuilder/ResourceManagement/BuilderResourceManifest.cpp b/Code/Tools/News/NewsBuilder/ResourceManagement/BuilderResourceManifest.cpp deleted file mode 100644 index 0a845216fe..0000000000 --- a/Code/Tools/News/NewsBuilder/ResourceManagement/BuilderResourceManifest.cpp +++ /dev/null @@ -1,497 +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 "BuilderResourceManifest.h" -#include "NewsShared/ResourceManagement/QtDownloadManager.h" -#include "NewsBuilder/S3Connector.h" -#include "UidGenerator.h" -#include "NewsShared/ResourceManagement/Resource.h" -#include "NewsBuilder/ResourceManagement/UploadDescriptor.h" -#include "NewsBuilder/ResourceManagement/DeleteDescriptor.h" -#include "NewsShared/ResourceManagement/ArticleDescriptor.h" -#include "NewsBuilder/ResourceManagement/ImageDescriptor.h" -#include "EndpointManager.h" - -#include -#include - -#include -#include - -namespace News { - - BuilderResourceManifest::BuilderResourceManifest( - std::function syncSuccessCallback, - std::function syncFailCallback, - std::function syncUpdateCallback) - : ResourceManifest(syncSuccessCallback, syncFailCallback, syncUpdateCallback) - , m_s3Connector(new S3Connector) - , m_uidGenerator(new UidGenerator) - , m_endpointManager(new EndpointManager) {} - - - Resource* BuilderResourceManifest::AddArticle() - { - auto pResource = new Resource( - QString("%1").arg(m_uidGenerator->GenerateUid()), - "article"); - QJsonObject json; - json["title"] = "New Article"; - json["body"] = "Enter article body here"; - json["imageId"] = "0"; - QJsonDocument doc(json); - QByteArray data = doc.toJson(QJsonDocument::Compact).toStdString().data(); - pResource->SetData(data); - m_toUpload.push(pResource); - AppendResource(pResource); - m_order.append(pResource->GetId()); - return pResource; - } - - Resource* BuilderResourceManifest::AddImage(const QString& filename) - { - auto pResource = new Resource( - QString("%1").arg(m_uidGenerator->GenerateUid()), - "image"); - ImageDescriptor descriptor(*pResource); - QString error; - if (!descriptor.Read(filename, error)) - { - m_syncUpdateCallback(error, LogError); - delete pResource; - return nullptr; - } - m_toUpload.push(pResource); - AppendResource(pResource); - return pResource; - } - - void BuilderResourceManifest::UpdateResource(Resource* pResource) - { - if (!m_toUpload.contains(pResource)) - { - pResource->SetVersion(pResource->GetVersion() + 1); - m_toUpload.push(pResource); - } - } - - void BuilderResourceManifest::UseResource(const QString& id) - { - auto pResource = FindById(id, m_resources); - if (!pResource) - { - return; - } - pResource->SetRefCount(pResource->GetRefCount() + 1); - UpdateResource(pResource); - } - - void BuilderResourceManifest::FreeResource(const QString& id) - { - auto pResource = FindById(id, m_resources); - if (!pResource) - { - return; - } - if (m_toDelete.contains(pResource)) - { - return; - } - pResource->SetRefCount(pResource->GetRefCount() - 1); - if (pResource->GetRefCount() <= 0) - { - m_toDelete.push(pResource); - RemoveResource(pResource); - m_toUpload.removeAll(pResource); - - if (pResource->GetType().compare("article") == 0) - { - m_order.removeAll(pResource->GetId()); - } - } - else - { - m_toUpload.push(pResource); - } - } - - bool BuilderResourceManifest::UpdateArticleOrder(const QString& id, bool direction, ErrorCode& error) - { - int index = m_order.indexOf(id); - if (index == -1) - { - m_syncUpdateCallback(QString("Couldn't find article: %1").arg(id), LogError); - error = ErrorCode::MissingArticle; - return false; - } - m_order.removeAll(id); - - index = index + (direction ? -1 : 1); - if (index < 0) - { - index = 0; - } - if (index > m_order.count()) - { - index = m_order.count(); - } - m_order.insert(index, id); - return true; - } - - EndpointManager* BuilderResourceManifest::GetEndpointManager() const - { - return m_endpointManager; - } - - void BuilderResourceManifest::Sync() - { - if (!m_endpointManager->GetSelectedEndpoint()) - { - FailSync(ErrorCode::NoEndpoint); - return; - } - if (!InitS3Connector()) - { - FailSync(ErrorCode::S3Fail); - return; - } - ResourceManifest::Sync(); - } - - void BuilderResourceManifest::Reset() - { - if (s_syncing) - { - m_syncUpdateCallback("Sync is already running", LogError); - return; - } - - m_toUpload.clear(); - - for (auto pResource : m_toDelete) - { - delete pResource; - } - m_toDelete.clear(); - - m_uidGenerator->Clear(); - - ResourceManifest::Reset(); - } - - void BuilderResourceManifest::PersistLocalResources() - { - // we are switching to another manifest here, while having the local data still present - // so we need to explicitly mark it for uploading so that it does not get deleted - for (auto pResource : m_resources) - { - if (!m_toUpload.contains(pResource)) - { - m_toUpload.push(pResource); - } - } - } - - void BuilderResourceManifest::SetSyncType(SyncType syncType) - { - m_syncType = syncType; - } - - bool BuilderResourceManifest::HasChanges() const - { - return m_toUpload.count() > 0 || m_toDelete.count() > 0; - } - - void BuilderResourceManifest::AppendResource(Resource* pResource) - { - m_uidGenerator->AddUid(pResource->GetId().toInt()); - ResourceManifest::AppendResource(pResource); - } - - void BuilderResourceManifest::RemoveResource(Resource* pResource) - { - m_uidGenerator->RemoveUid(pResource->GetId().toInt()); - ResourceManifest::RemoveResource(pResource); - } - - void BuilderResourceManifest::OnDownloadFail() - { - QMessageBox msgBox(QMessageBox::Critical, - "Sync failed", - QString("%1\n\n%2") - .arg(GetErrorMessage(ErrorCode::ManifestDownloadFail)) - .arg(QObject::tr("Overwrite resource manifest?")), - QMessageBox::Yes | QMessageBox::No); - if (msgBox.exec() == QMessageBox::Yes) - { - if (!UploadManifest()) - { - m_failed = true; - m_errorCode = ErrorCode::ManifestUploadFail; - } - } - ResourceManifest::OnDownloadFail(); - } - - //! This function overrides ResourceManifest Read and tries to do some minimal version checking - //! NOTE: version checking is not done yet, this needs a lot more work to version check properly - ErrorCode BuilderResourceManifest::Read(const QJsonObject& json) - { - int version = json["version"].toInt(); - if (version > m_version && m_syncType == SyncType::Verify) - { - return ErrorCode::OutOfSync; - } - - m_version = version; - QJsonArray resourceArray = json["resources"].toArray(); - - // initially mark ALL existing resource for deletion - QList toDelete = m_resources; - - for (auto resourceDoc : resourceArray) - { - auto pNewResource = new Resource(resourceDoc.toObject()); - // find local resource with the same id as new resource - auto pOldResource = FindById(pNewResource->GetId(), m_resources); - // if resource with the same id already exists then check its version - if (pOldResource) - { - // local resource is outdated, keep its in delete list, and download new one instead - if (pNewResource->GetVersion() > pOldResource->GetVersion()) - { - if (m_syncType == SyncType::Merge) - { - m_toDownload.push(pNewResource); - } - else if (m_syncType == SyncType::Overwrite) - { - m_toDelete.push(pNewResource); - } - } - // local resource is newer or same version, keep it (remove from toDelete list) - // and don't need to download new one - else - { - delete pNewResource; - toDelete.removeAll(pOldResource); - } - } - else - { - // if remote resource was NOT deleted locally then download it - if (!FindById(pNewResource->GetId(), m_toDelete)) - { - if (m_syncType == SyncType::Merge) - { - m_toDownload.push(pNewResource); - } - else if (m_syncType == SyncType::Overwrite) - { - m_toDelete.push(pNewResource); - } - } - // otherwise user deleted it... needs version check here - else - { - delete pNewResource; - } - } - } - - for (auto pResource : m_toUpload) - { - toDelete.removeAll(pResource); - } - - for (auto pResource : toDelete) - { - RemoveResource(pResource); - m_toDelete.removeAll(pResource); - delete pResource; - } - - //! Sync article display order - //! this is more complex to implement because articles may have been added or deleted - //! remotely by another developer while newsbuilder was running - //! for now just overwrite s3 version - QJsonArray orderArray = json["order"].toArray(); - for (auto idObject : orderArray) - { - QString id = idObject.toString(); - if (FindById(id, m_toDownload) && !m_order.contains(id)) - { - m_order.append(id); - } - } - return ErrorCode::None; - } - - //! Write resource manifest to JSON - void BuilderResourceManifest::Write(QJsonObject& json) const - { - QJsonArray resourceArray; - foreach(auto pResource, m_resources) - { - QJsonObject resourceObject; - pResource->Write(resourceObject); - resourceArray.append(resourceObject); - } - json["resources"] = resourceArray; - - QJsonArray orderArray; - foreach(auto id, m_order) - { - orderArray.append(id); - } - json["order"] = orderArray; - json["version"] = m_version; - } - - //! Figure out how many resources need to be synced - void BuilderResourceManifest::PrepareForSync() - { - // if resource is locally marked for deletion, then we don't need to upload/download it - for (auto pResource : m_toDelete) - { - m_toDownload.removeAll(pResource); - m_toUpload.removeAll(pResource); - } - - m_syncLeft = - m_toDownload.size() + - m_toUpload.size() + - m_toDelete.size(); - } - - void BuilderResourceManifest::SyncResources() - { - ResourceManifest::SyncResources(); - UploadResources(); - DeleteResources(); - } - - void BuilderResourceManifest::UploadResources() - { - QStack failures; - while (m_toUpload.count() > 0) - { - m_syncUpdateCallback( - QString("Uploading: %1 resources left").arg(m_toUpload.count()), - LogInfo); - - auto pResource = m_toUpload.pop(); - - auto uploadDescriptor = UploadDescriptor(*pResource); - uploadDescriptor.Upload(*m_s3Connector, - [&](QString url) - { - UpdateSync(); - }, - [&, pResource](QString error) - { - failures.push(pResource); - m_failed = true; - UpdateSync(); - m_syncUpdateCallback( - error, - LogError); - }); - } - while (failures.count() > 0) - { - m_toUpload.push(failures.pop()); - } - } - - void BuilderResourceManifest::DeleteResources() - { - while (m_toDelete.count() > 0) - { - m_syncUpdateCallback( - QString("Deleting: %1 resources left").arg(m_toDelete.count()), - LogInfo); - - auto pResource = m_toDelete.pop(); - - auto deleteDescriptor = DeleteDescriptor(*pResource); - deleteDescriptor.Delete(*m_s3Connector, - [&, pResource]() - { - delete pResource; - UpdateSync(); - }, - [&, pResource](QString error) - { - m_failed = true; - delete pResource; - UpdateSync(); - m_syncUpdateCallback( - QString("Failed to delete resource: %1").arg(error), - LogError); - }); - } - } - - void BuilderResourceManifest::FinishSync() - { - if (!m_failed) - { - QString error; - if (!UploadManifest()) - { - m_failed = true; - m_errorCode = ErrorCode::ManifestUploadFail; - } - } - ResourceManifest::FinishSync(); - } - - bool BuilderResourceManifest::UploadManifest() - { - m_syncUpdateCallback(QObject::tr("%1 to %2") - .arg("Uploading manifest") - .arg(m_endpointManager->GetSelectedEndpoint()->GetBucket()), - LogInfo); - m_version++; - Aws::String awsError; - QJsonObject manifestObject; - Write(manifestObject); - QJsonDocument doc(manifestObject); - auto ss = Aws::MakeShared( - S3Connector::ALLOCATION_TAG, - std::ios::in | std::ios::out | std::ios::binary); - *ss << QString(doc.toJson(QJsonDocument::Compact)).toStdString(); - Aws::String url; - if (!m_s3Connector->PutObject("resourceManifest", ss, url, awsError)) - { - m_syncUpdateCallback(QObject::tr(awsError.c_str()), LogError); - return false; - } - return true; - } - - bool BuilderResourceManifest::InitS3Connector() const - { - auto awsProfileName = - m_endpointManager->GetSelectedEndpoint()->GetAwsProfile(); - auto bucketName = - m_endpointManager->GetSelectedEndpoint()->GetBucket(); - Aws::String awsError; - if (!m_s3Connector->Init( - awsProfileName.toStdString().c_str(), - bucketName.toStdString().c_str(), - awsError)) - { - m_syncUpdateCallback(QObject::tr(awsError.c_str()), LogError); - return false; - } - return true; - } - -} diff --git a/Code/Tools/News/NewsBuilder/ResourceManagement/BuilderResourceManifest.h b/Code/Tools/News/NewsBuilder/ResourceManagement/BuilderResourceManifest.h deleted file mode 100644 index b6c20df571..0000000000 --- a/Code/Tools/News/NewsBuilder/ResourceManagement/BuilderResourceManifest.h +++ /dev/null @@ -1,125 +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 "NewsShared/ResourceManagement/ResourceManifest.h" - -#include - -class QJsonObject; - -namespace News -{ - class EndpointManager; - class ArticleDescriptor; - class UidGenerator; - class S3Connector; - class QtDownloadManager; - class Descriptor; - class DownloadDescriptor; - class Resource; - - //! Type of sync behavior - enum class SyncType - { - Merge, // merge resources from both endpoints, i.e. replacing outdated and appending missing (also normal sync behavior) - Overwrite, // overwrite resources on new endpoint with old endpoint - Verify // attempt to publish changes but abort if out of sync - }; - - //! Adds news-builder functionality layer to resource manager - class BuilderResourceManifest - : public ResourceManifest - { - public: - explicit BuilderResourceManifest( - std::function syncSuccessCallback, - std::function syncFailCallback, - std::function syncUpdateCallback); - - //! Create new article resource - /*! - Create new article with default parameters, - Add it to resource collection, - Mark it for upload. - - \retval Resource * - a pointer to an article Resource - */ - Resource* AddArticle(); - - //! Create new image resource - /*! - Create new image from file, - add it to resource collection, - mark it for upload. - - \param filename - path to an image on hard drive - \retval Resource * - a pointer to an image Resource - */ - Resource* AddImage(const QString& filename); - - //! If resource was modified, add it to upload list and increment its version - void UpdateResource(Resource* resource); - - //! When resource is used by several other resources, this function is called - //! to increment its ref count - void UseResource(const QString& id); - - //! When resource is no longer used by another resource - //! decrement refCount, - //! if nothing else is using it, then mark for delete - void FreeResource(const QString& id); - - //! Move article either up or down in order queue - bool UpdateArticleOrder(const QString& id, bool direction, ErrorCode& error); - - EndpointManager* GetEndpointManager() const; - - void Sync() override; - - void Reset() override; - - //! When switching endpoints Merge allows to persist resources to another endpoint, - //! thus copying news from one location to another upon next Sync - void PersistLocalResources(); - - void SetSyncType(SyncType syncType); - - //! Are there local changes - bool HasChanges() const; - - protected: - void AppendResource(Resource* pResource) override; - void RemoveResource(Resource* pResource) override; - void OnDownloadFail() override; - void FinishSync() override; - - private: - S3Connector* m_s3Connector = nullptr; - UidGenerator* m_uidGenerator = nullptr; - EndpointManager* m_endpointManager = nullptr; - SyncType m_syncType = SyncType::Merge; - - QStack m_toUpload; - QStack m_toDelete; - - ErrorCode Read(const QJsonObject& json) override; - void Write(QJsonObject& json) const; - - void PrepareForSync() override; - void SyncResources() override; - - void UploadResources(); - void DeleteResources(); - - bool UploadManifest(); - - //! Initializes S3 connector with selected endpoint - bool InitS3Connector() const; - }; -} // namespace News diff --git a/Code/Tools/News/NewsBuilder/ResourceManagement/DeleteDescriptor.cpp b/Code/Tools/News/NewsBuilder/ResourceManagement/DeleteDescriptor.cpp deleted file mode 100644 index 63cdb46218..0000000000 --- a/Code/Tools/News/NewsBuilder/ResourceManagement/DeleteDescriptor.cpp +++ /dev/null @@ -1,39 +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 "DeleteDescriptor.h" -#include "NewsBuilder/S3Connector.h" -#include "NewsShared/ResourceManagement/Resource.h" - -#include - -namespace News -{ - - DeleteDescriptor::DeleteDescriptor(Resource& resource) - : Descriptor(resource) {} - - void DeleteDescriptor::Delete(S3Connector& s3Connector, - std::function deleteSuccessCallback, - std::function deleteFailCallback) const - { - Aws::String error; - if (!s3Connector.DeleteObject( - m_resource.GetId().toStdString().c_str(), - error)) - { - deleteFailCallback(QString("Error deleting resource %1: %2") - .arg(m_resource.GetId()) - .arg(error.c_str())); - } - else - { - deleteSuccessCallback(); - } - } - -} diff --git a/Code/Tools/News/NewsBuilder/ResourceManagement/DeleteDescriptor.h b/Code/Tools/News/NewsBuilder/ResourceManagement/DeleteDescriptor.h deleted file mode 100644 index 8928e9e19d..0000000000 --- a/Code/Tools/News/NewsBuilder/ResourceManagement/DeleteDescriptor.h +++ /dev/null @@ -1,29 +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 "NewsShared/ResourceManagement/Descriptor.h" - -#include -#include - -namespace News -{ - class S3Connector; - - class DeleteDescriptor - : public Descriptor - { - public: - explicit DeleteDescriptor(Resource& resource); - - void Delete(S3Connector& s3Connector, - std::function deleteSuccessCallback, - std::function deleteFailCallback) const; - }; -} diff --git a/Code/Tools/News/NewsBuilder/ResourceManagement/ImageDescriptor.cpp b/Code/Tools/News/NewsBuilder/ResourceManagement/ImageDescriptor.cpp deleted file mode 100644 index a16ec48851..0000000000 --- a/Code/Tools/News/NewsBuilder/ResourceManagement/ImageDescriptor.cpp +++ /dev/null @@ -1,50 +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 "ImageDescriptor.h" -#include "NewsShared/ResourceManagement/Resource.h" - -#include -#include -#include -#include -#include - -namespace News -{ - - ImageDescriptor::ImageDescriptor( - Resource& resource) - : Descriptor(resource) - { - } - - bool ImageDescriptor::Read(const QString& filename, QString& error) const - { - QImageReader reader(filename); - if (!reader.canRead()) - { - error = reader.errorString(); - return false; - } - QImage image = reader.read(); - - QPixmap pixmap(filename); - QByteArray data; - QBuffer buffer(&data); - buffer.open(QIODevice::WriteOnly); - QFile test("test.png"); - if (pixmap.save(&buffer, "PNG")) - { - m_resource.SetData(data); - return true; - } - error = QString("failed to save image %1").arg(filename); - return false; - } - -} diff --git a/Code/Tools/News/NewsBuilder/ResourceManagement/ImageDescriptor.h b/Code/Tools/News/NewsBuilder/ResourceManagement/ImageDescriptor.h deleted file mode 100644 index ba4533b0c0..0000000000 --- a/Code/Tools/News/NewsBuilder/ResourceManagement/ImageDescriptor.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include - -class QString; - -namespace News -{ - class ImageDescriptor - : public Descriptor - { - public: - explicit ImageDescriptor(Resource& resource); - - bool Read(const QString& filename, QString& error) const; - }; -} diff --git a/Code/Tools/News/NewsBuilder/ResourceManagement/UploadDescriptor.cpp b/Code/Tools/News/NewsBuilder/ResourceManagement/UploadDescriptor.cpp deleted file mode 100644 index 699959ed85..0000000000 --- a/Code/Tools/News/NewsBuilder/ResourceManagement/UploadDescriptor.cpp +++ /dev/null @@ -1,54 +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 "NewsBuilder/S3Connector.h" -#include "UploadDescriptor.h" -#include "NewsShared/ResourceManagement/Resource.h" - -#include -#include -#include - -#include - -namespace News -{ - - UploadDescriptor::UploadDescriptor(Resource& resource) - : Descriptor(resource) {} - - void UploadDescriptor::Upload(S3Connector& s3Connector, - std::function uploadSuccessCallback, - std::function uploadFailCallback) const - { - Aws::String error; - - auto ss = - Aws::MakeShared(S3Connector::ALLOCATION_TAG, - std::ios::in | std::ios::out | std::ios::binary); - auto* pbuf = ss->rdbuf(); - pbuf->sputn(m_resource.GetData().data(), m_resource.GetData().size()); - Aws::String awsUrl; - - if (!s3Connector.PutObject( - m_resource.GetId().toStdString().c_str(), - ss, - m_resource.GetData().size(), - awsUrl, - error)) - { - uploadFailCallback(QObject::tr("Error uploading resource %1: %2") - .arg(m_resource.GetId()) - .arg(error.c_str())); - } - else - { - uploadSuccessCallback(QString(awsUrl.c_str())); - } - } - -} diff --git a/Code/Tools/News/NewsBuilder/ResourceManagement/UploadDescriptor.h b/Code/Tools/News/NewsBuilder/ResourceManagement/UploadDescriptor.h deleted file mode 100644 index 71a7732c1e..0000000000 --- a/Code/Tools/News/NewsBuilder/ResourceManagement/UploadDescriptor.h +++ /dev/null @@ -1,29 +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 "NewsShared/ResourceManagement/Descriptor.h" - -#include -#include - -namespace News -{ - class S3Connector; - - class UploadDescriptor - : public Descriptor - { - public: - explicit UploadDescriptor(Resource& resource); - - void Upload(S3Connector& s3Connector, - std::function uploadSuccessCallback, - std::function uploadFailCallback) const; - }; -} diff --git a/Code/Tools/News/NewsBuilder/Resources/NewsBuilder.qss b/Code/Tools/News/NewsBuilder/Resources/NewsBuilder.qss deleted file mode 100644 index 01ca308585..0000000000 --- a/Code/Tools/News/NewsBuilder/Resources/NewsBuilder.qss +++ /dev/null @@ -1,44 +0,0 @@ -QLabel -{ - font-size: 12px; - color: #FFFFFF; - line-height: 20px; - background-color: transparent; - margin: 0; -} - -QLabel#titleLabel -{ - font-size: 22px; - line-height: 32px; -} - -QLabel#bodyLabel -{ - font-size: 14px; - line-height: 20px; -} - -QFrame#viewContainer[articleStyle="pinned"] -{ - background: rgba(180,139,255,5%); - border: 1px solid #B48BFF; - box-shadow: 0 0 4px 0 rgba(0,0,0,50%); -} - -QWidget#articleViewContainerRoot -{ - background: #222222; -} - -QScrollArea#previewArea, -QWidget#articleViewContents, -QFrame#imageFrame -{ - background-color: transparent; -} - -News--ArticleView.SelectedArticle > QWidget -{ - background: #333333; -} diff --git a/Code/Tools/News/NewsBuilder/Resources/missing-image.png b/Code/Tools/News/NewsBuilder/Resources/missing-image.png deleted file mode 100644 index 889493e628..0000000000 --- a/Code/Tools/News/NewsBuilder/Resources/missing-image.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4255a25636d77a54809592bc98bef47fa9044be03cd65d73daa821711489e00f -size 7379 diff --git a/Code/Tools/News/NewsBuilder/S3Connector.cpp b/Code/Tools/News/NewsBuilder/S3Connector.cpp deleted file mode 100644 index a54b6fa8f8..0000000000 --- a/Code/Tools/News/NewsBuilder/S3Connector.cpp +++ /dev/null @@ -1,173 +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 "S3Connector.h" - -#include -#include -#include - - -AZ_PUSH_DISABLE_WARNING(4251 4819, "-Wunknown-warning-option") // Invalid character not in default code page -#include -#include -#include -#include -#include -#include -#include -#include -AZ_POP_DISABLE_WARNING - -namespace News -{ - const char* S3Connector::ALLOCATION_TAG = "NewsBuilder"; - - S3Connector::S3Connector() - : m_s3Client(nullptr) - , m_limiter(nullptr) - , m_valid(false) - { - } - - S3Connector::~S3Connector() {} - - bool S3Connector::Init(const char* awsProfileName, const char* bucket, Aws::String& error) - { - Aws::SDKOptions options; - options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Trace; - Aws::InitAPI(options); - - Aws::Client::ClientConfiguration config; - config.enableTcpKeepAlive = AZ_TRAIT_AZFRAMEWORK_AWS_ENABLE_TCP_KEEP_ALIVE_SUPPORTED; - config.scheme = Aws::Http::Scheme::HTTPS; - config.connectTimeoutMs = 30000; - config.requestTimeoutMs = 30000; - config.readRateLimiter = m_limiter; - config.writeRateLimiter = m_limiter; - - auto provider = - Aws::MakeShared( - ALLOCATION_TAG, - awsProfileName); - - auto accessKeyId = provider->GetAWSCredentials().GetAWSAccessKeyId(); - - //! verify that credential file exists - if (accessKeyId.empty()) - { - error = "LY_NEWS_DEVELOPER AWS credentials not found. Add credentials in LY Editor AWS->ClientManager"; - m_valid = false; - return false; - } - - m_bucket = Aws::String(bucket); - m_s3Client = Aws::MakeShared( - ALLOCATION_TAG, - provider, - config); - - m_valid = true; - return true; - } - - bool S3Connector::GetObject(const char* key, - Aws::String& data, - Aws::String& url, - Aws::String& error) const - { - if (!m_valid) - { - error = "Client not initialized"; - return false; - } - - Aws::S3::Model::GetObjectRequest getObjectRequest; - getObjectRequest.SetBucket(m_bucket); - getObjectRequest.SetKey(key); - auto outcome = m_s3Client->GetObject(getObjectRequest); - if (!outcome.IsSuccess()) - { - error = outcome.GetError().GetMessage(); - return false; - } - url = m_s3Client->GeneratePresignedUrl(m_bucket, key, Aws::Http::HttpMethod::HTTP_GET); - Aws::StringStream ss; - ss << outcome.GetResult().GetBody().rdbuf(); - data = ss.str(); - return true; - } - - bool S3Connector::PutObject(const char* key, - STREAM_PTR stream, - Aws::String& url, - Aws::String& error) const - { - return PutObject(key, stream, GetStreamLength(stream), url, error); - } - - bool S3Connector::PutObject(const char* key, - STREAM_PTR stream, - int length, - Aws::String& url, - Aws::String& error) const - { - if (!m_valid) - { - error = "Client not initialized"; - return false; - } - - Aws::S3::Model::PutObjectRequest putObjectRequest; - putObjectRequest.SetBucket(m_bucket); - putObjectRequest.SetBody(stream); - putObjectRequest.SetContentLength(length); - putObjectRequest.SetContentMD5( - Aws::Utils::HashingUtils::Base64Encode( - Aws::Utils::HashingUtils::CalculateMD5(*putObjectRequest.GetBody()))); - putObjectRequest.SetContentType(Aws::String("binary/octet-stream")); - putObjectRequest.SetKey(key); - putObjectRequest.SetACL(Aws::S3::Model::ObjectCannedACL::public_read); - auto outcome = m_s3Client->PutObject(putObjectRequest); - if (!outcome.IsSuccess()) - { - error = outcome.GetError().GetMessage(); - return false; - } - url = m_s3Client->GeneratePresignedUrl(m_bucket, key, Aws::Http::HttpMethod::HTTP_GET); - return true; - } - - bool S3Connector::DeleteObject(const char* key, Aws::String& error) const - { - if (!m_valid) - { - error = "Client not initialized"; - return false; - } - - Aws::S3::Model::DeleteObjectRequest deleteObjectRequest; - deleteObjectRequest.SetBucket(m_bucket); - deleteObjectRequest.SetKey(key); - auto outcome = m_s3Client->DeleteObject(deleteObjectRequest); - if (!outcome.IsSuccess()) - { - error = outcome.GetError().GetMessage(); - return false; - } - return true; - } - - int S3Connector::GetStreamLength(STREAM_PTR stream) - { - stream->seekg(0, std::ios::end); - auto length = stream->tellg(); - stream->seekg(0, std::ios::beg); - return static_cast(length); - } - -} diff --git a/Code/Tools/News/NewsBuilder/S3Connector.h b/Code/Tools/News/NewsBuilder/S3Connector.h deleted file mode 100644 index d0404bfddb..0000000000 --- a/Code/Tools/News/NewsBuilder/S3Connector.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 -AZ_PUSH_DISABLE_WARNING(4251 4355 4996, "-Wunknown-warning-option") // includes ppltasks.h which throws a C4355 warning: 'this' used in base member initializer list -#include -AZ_POP_DISABLE_WARNING - -typedef std::shared_ptr STREAM_PTR; - -namespace News -{ - //! A light wrapper around AWS SDK - class S3Connector - { - public: - static const char* ALLOCATION_TAG; - - S3Connector(); - ~S3Connector(); - - //! Make s3 client using credentials stored in [user]/.aws/credentials file - /*! - \param awsProfileName - name of AWS credentials - \param bucket - name of s3 bucket to use for AWS operations - \param error - error string - \retval bool - true if success else false - */ - bool Init(const char* awsProfileName, const char* bucket, Aws::String& error); - - bool GetObject(const char* key, - Aws::String& data, - Aws::String& url, - Aws::String& error) const; - - bool PutObject(const char* key, - STREAM_PTR stream, - Aws::String& url, - Aws::String& error) const; - - bool PutObject(const char* key, - STREAM_PTR stream, - int length, - Aws::String& url, - Aws::String& error) const; - - bool DeleteObject(const char* key, - Aws::String& error) const; - - private: - Aws::String m_bucket; - std::shared_ptr m_s3Client; - std::shared_ptr m_limiter; - bool m_valid; - - static int GetStreamLength(STREAM_PTR stream); - }; -} // namespace News diff --git a/Code/Tools/News/NewsBuilder/UidGenerator.cpp b/Code/Tools/News/NewsBuilder/UidGenerator.cpp deleted file mode 100644 index 060f593996..0000000000 --- a/Code/Tools/News/NewsBuilder/UidGenerator.cpp +++ /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 - * - */ - -#include "UidGenerator.h" - -#include - -namespace News -{ - - UidGenerator::UidGenerator() - { - srand(static_cast(time(nullptr))); - } - - int UidGenerator::GenerateUid() - { - int uid; - do - { - uid = rand(); - } - while (std::find(m_uids.begin(), m_uids.end(), uid) != m_uids.end()); - m_uids.push_back(uid); - return uid; - } - - int UidGenerator::AddUid(int uid) - { - if (std::find(m_uids.begin(), m_uids.end(), uid) == m_uids.end()) - { - m_uids.push_back(uid); - } - return uid; - } - - void UidGenerator::RemoveUid(int uid) - { - auto it = std::find(m_uids.begin(), m_uids.end(), uid); - if (it != m_uids.end()) - { - m_uids.erase(it); - } - } - - void UidGenerator::Clear() - { - m_uids.clear(); - } - -} diff --git a/Code/Tools/News/NewsBuilder/UidGenerator.h b/Code/Tools/News/NewsBuilder/UidGenerator.h deleted file mode 100644 index 825df9e340..0000000000 --- a/Code/Tools/News/NewsBuilder/UidGenerator.h +++ /dev/null @@ -1,27 +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 News -{ - //! A simple unique id generator. - class UidGenerator - { - public: - UidGenerator(); - int GenerateUid(); - int AddUid(int uid); - void RemoveUid(int uid); - void Clear(); - - private: - std::vector m_uids; - }; -} diff --git a/Code/Tools/News/NewsBuilder/main.cpp b/Code/Tools/News/NewsBuilder/main.cpp deleted file mode 100644 index 6a43c681b1..0000000000 --- a/Code/Tools/News/NewsBuilder/main.cpp +++ /dev/null @@ -1,35 +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 "Qt/NewsBuilder.h" -#include -#include -#include -#include - - -int main(int argc, char *argv[]) -{ - // Must be set before QApplication is initialized, so that we support HighDpi monitors, like the Retina displays - // on Windows 10 - QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); - QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough); - - QApplication a(argc, argv); - AZ::IO::FixedMaxPath engineRootPath; - { - AZ::ComponentApplication componentApplication; - auto settingsRegistry = AZ::SettingsRegistry::Get(); - settingsRegistry->Get(engineRootPath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder); - } - News::NewsBuilder w(nullptr, engineRootPath); - w.show(); - return a.exec(); -} diff --git a/Code/Tools/News/NewsBuilder/news_builder.qrc b/Code/Tools/News/NewsBuilder/news_builder.qrc deleted file mode 100644 index 010ac598f1..0000000000 --- a/Code/Tools/News/NewsBuilder/news_builder.qrc +++ /dev/null @@ -1,5 +0,0 @@ - - - Resources/NewsBuilder.qss - - diff --git a/Code/Tools/News/NewsBuilder/news_builder_files.cmake b/Code/Tools/News/NewsBuilder/news_builder_files.cmake deleted file mode 100644 index c46e66a357..0000000000 --- a/Code/Tools/News/NewsBuilder/news_builder_files.cmake +++ /dev/null @@ -1,64 +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 -# -# - -set(FILES - main.cpp - S3Connector.cpp - S3Connector.h - UidGenerator.cpp - UidGenerator.h - EndpointManager.cpp - EndpointManager.h - Qt/ArticleDetails.cpp - Qt/ArticleDetails.h - Qt/ArticleDetails.ui - Qt/ArticleDetailsContainer.cpp - Qt/ArticleDetailsContainer.h - Qt/ArticleDetailsContainer.ui - Qt/AwsDialog.ui - Qt/BuilderArticleViewContainer.cpp - Qt/BuilderArticleViewContainer.h - Qt/BuilderArticleViewContainer.ui - Qt/EndpointEntryView.cpp - Qt/EndpointEntryView.h - Qt/EndpointEntryView.ui - Qt/EndpointManagerView.cpp - Qt/EndpointManagerView.h - Qt/EndpointManagerView.ui - Qt/ImageItem.cpp - Qt/ImageItem.h - Qt/ImageItem.ui - Qt/LogContainer.cpp - Qt/LogContainer.h - Qt/LogContainer.ui - Qt/NewsBuilder.cpp - Qt/NewsBuilder.h - Qt/Newsbuilder.qrc - Qt/Newsbuilder.ui - Qt/QCustomMessageBox.cpp - Qt/QCustomMessageBox.h - Qt/QCustomMessageBox.ui - Qt/SelectImage.cpp - Qt/SelectImage.h - Qt/SelectImage.ui - ResourceManagement/BuilderResourceManifest.cpp - ResourceManagement/BuilderResourceManifest.h - ResourceManagement/DeleteDescriptor.cpp - ResourceManagement/DeleteDescriptor.h - ResourceManagement/ImageDescriptor.cpp - ResourceManagement/ImageDescriptor.h - ResourceManagement/UploadDescriptor.cpp - ResourceManagement/UploadDescriptor.h -) - -set(SKIP_UNITY_BUILD_INCLUSION_FILES - # Fix for unity causing the 'News::BuilderResourceManifest::UpdateResourceA' symbol to be unresolved - Qt/ArticleDetails.cpp - # Fix for unity causing the ' Aws::S3::S3Client::GetObjectA' symbol to be unresolved - S3Connector.cpp - -) diff --git a/Code/Tools/News/NewsShared/ErrorCodes.h b/Code/Tools/News/NewsShared/ErrorCodes.h deleted file mode 100644 index 444e0c6f67..0000000000 --- a/Code/Tools/News/NewsShared/ErrorCodes.h +++ /dev/null @@ -1,51 +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 News -{ - enum class ErrorCode : int - { - None, - OutOfSync, - ManifestDownloadFail, - FailedToSync, - AlreadySyncing, - FailedToParseManifest, - MissingArticle, - NoEndpoint, - ManifestUploadFail, - S3Fail - }; - - inline extern const char* GetErrorMessage(ErrorCode errorCode) - { - static const char* errors[] - { - "", - "Your manifest is out of sync. Reopen the same endpoint and sync to resolve the conflict and try again.", - "Failed to download resource manifest", - "Failed to sync resources", - "Sync is already running", - "Failed to parse resource manifest", - "Could not find article, try syncing again", - "Missing or incorrect endpoint selected", - "Failed to upload resource manifest", - "Failed to init S3 connection" - }; - int errorCount = sizeof errors / sizeof errors[0]; - int typeIndex = static_cast(errorCode); - if (typeIndex < 0 || typeIndex >= errorCount) - { - return "Invalid error code"; - } - return errors[typeIndex]; - } -} // namespace News diff --git a/Code/Tools/News/NewsShared/Qt/ArticleErrorView.cpp b/Code/Tools/News/NewsShared/Qt/ArticleErrorView.cpp deleted file mode 100644 index 6f2a7e3c9c..0000000000 --- a/Code/Tools/News/NewsShared/Qt/ArticleErrorView.cpp +++ /dev/null @@ -1,23 +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 "ArticleErrorView.h" -#include "NewsShared/Qt/ui_ArticleErrorView.h" - -using namespace News; - -ArticleErrorView::ArticleErrorView( - QWidget* parent) - : QWidget(parent) - , m_ui(new Ui::ArticleErrorViewWidget()) -{ - m_ui->setupUi(this); -} - -ArticleErrorView::~ArticleErrorView(){} - -#include "NewsShared/Qt/moc_ArticleErrorView.cpp" diff --git a/Code/Tools/News/NewsShared/Qt/ArticleErrorView.h b/Code/Tools/News/NewsShared/Qt/ArticleErrorView.h deleted file mode 100644 index 3130690dc1..0000000000 --- a/Code/Tools/News/NewsShared/Qt/ArticleErrorView.h +++ /dev/null @@ -1,37 +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 - -#if !defined(Q_MOC_RUN) -#include -#endif - -namespace Ui -{ - class ArticleErrorViewWidget; -} - -namespace AzQtComponents -{ - class ExtendedLabel; -} - -namespace News -{ - class ArticleErrorView - : public QWidget - { - Q_OBJECT - public: - ArticleErrorView(QWidget* parent); - ~ArticleErrorView(); - - private: - QScopedPointer m_ui; - }; -} diff --git a/Code/Tools/News/NewsShared/Qt/ArticleErrorView.ui b/Code/Tools/News/NewsShared/Qt/ArticleErrorView.ui deleted file mode 100644 index c94c636720..0000000000 --- a/Code/Tools/News/NewsShared/Qt/ArticleErrorView.ui +++ /dev/null @@ -1,239 +0,0 @@ - - - ArticleErrorViewWidget - - - - 0 - 0 - 192 - 228 - - - - - 0 - 0 - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - ArticleView - - - background-color: none; text-align: left; - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - border: none; - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 14 - - - - - - - - 0 - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 14 - 20 - - - - - - - - 0 - - - - - - 160 - 90 - - - - - - - :/images/Resources/ErrorImage.jpg - - - - 160 - 90 - - - - - - - - Qt::Vertical - - - - 20 - 20 - - - - - - - - - 0 - 0 - - - - - Open Sans - 8 - 50 - false - - - - a { text-decoration: underline; color: red } - - - We couldn’t connect to the network or access our news database. To see the latest Open 3D Engine news, blogs, tutorials, and more, please visit the <a href="http://aws.amazon.com/lumberyard/">Lumberyard website</a>. - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - true - - - true - - - Qt::LinksAccessibleByMouse - - - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 14 - 20 - - - - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 10 - - - - - - - - - - - - AzQtComponents::ExtendedLabel - QLabel -
AzQtComponents/Components/ExtendedLabel.h
-
-
- - - - -
diff --git a/Code/Tools/News/NewsShared/Qt/ArticleView.cpp b/Code/Tools/News/NewsShared/Qt/ArticleView.cpp deleted file mode 100644 index 082a29d38a..0000000000 --- a/Code/Tools/News/NewsShared/Qt/ArticleView.cpp +++ /dev/null @@ -1,154 +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 "ArticleView.h" - -#include - -AZ_PUSH_DISABLE_WARNING(4251, "-Wunknown-warning-option") // 4251: '...' needs to have dll-interface to be used by clients of class '...' -#include "NewsShared/ResourceManagement/ArticleDescriptor.h" -#include "NewsShared/Qt/ui_ArticleView.h" -#include "NewsShared/Qt/ui_PinnedArticleView.h" -#include "NewsShared/ResourceManagement/ResourceManifest.h" -#include "NewsShared/ResourceManagement/Resource.h" - - -#include -#include -AZ_POP_DISABLE_WARNING - -using namespace News; - -ArticleView::ArticleView( - QWidget* parent, - const ArticleDescriptor& article, - const ResourceManifest& manifest) - : QWidget(parent) - , m_pArticle(new ArticleDescriptor(article)) - , m_manifest(manifest) - , m_icon(nullptr) -{ - -} - -void ArticleView::Update() -{ - Q_ASSERT(m_widgetImageFrame && m_widgetTitle && m_widgetBody); - - auto pResource = m_manifest.FindById(m_pArticle->GetResource().GetId()); - m_pArticle.reset(); - if (pResource) - { - m_pArticle = QSharedPointer(new ArticleDescriptor(*pResource)); - m_widgetTitle->setText(m_pArticle->GetTitle()); - m_widgetBody->setText(m_pArticle->GetBody()); - auto pImageResource = m_manifest.FindById(m_pArticle->GetImageId()); - if (pImageResource) - { - QPixmap pixmap; - if (pixmap.loadFromData(pImageResource->GetData())) - { - if (!m_icon) - { - m_icon = new AzQtComponents::ExtendedLabel(this); - m_icon->setStyleSheet("border: none;"); - m_icon->setAlignment(Qt::AlignCenter); - static_cast( - m_widgetImageFrame->layout())->insertWidget(0, m_icon); - connect(m_icon, &AzQtComponents::ExtendedLabel::clicked, this, &ArticleView::articleSelectedSlot); - } - m_icon->setPixmap(pixmap.scaled(m_widgetImageFrame->minimumWidth(), - m_widgetImageFrame->minimumHeight(), - Qt::KeepAspectRatioByExpanding)); - } - else - { - RemoveIcon(); - } - } - else - { - RemoveIcon(); - } - } -} - -void ArticleView::mousePressEvent([[maybe_unused]] QMouseEvent* event) -{ - articleSelectedSlot(); -} - -void ArticleView::RemoveIcon() -{ - if (m_icon) - { - delete m_icon; - m_icon = nullptr; - } -} - -void ArticleView::linkActivatedSlot(const QString& link) -{ - QDesktopServices::openUrl(QUrl(link)); - Q_EMIT linkActivatedSignal(link); -} - -void ArticleView::articleSelectedSlot() -{ - Q_EMIT articleSelectedSignal(m_pArticle->GetResource().GetId()); -} - -QSharedPointer ArticleView::GetArticle() const -{ - return m_pArticle; -} - -void ArticleView::SetupViewWidget(QFrame* widgetImageFrame, AzQtComponents::ExtendedLabel* widgetTitle, AzQtComponents::ExtendedLabel* widgetBody) -{ - Q_ASSERT(m_widgetImageFrame == nullptr && m_widgetTitle == nullptr && m_widgetBody == nullptr); - - m_widgetImageFrame = widgetImageFrame; - m_widgetTitle = widgetTitle; - m_widgetBody = widgetBody; - - connect(m_widgetTitle, &QLabel::linkActivated, this, &ArticleView::linkActivatedSlot); - connect(m_widgetBody, &QLabel::linkActivated, this, &ArticleView::linkActivatedSlot); - connect(m_widgetTitle, &AzQtComponents::ExtendedLabel::clicked, this, &ArticleView::articleSelectedSlot); - connect(m_widgetBody, &AzQtComponents::ExtendedLabel::clicked, this, &ArticleView::articleSelectedSlot); - - Q_ASSERT(m_widgetImageFrame && m_widgetTitle && m_widgetBody); -} - -//////////////////////////////////////////////////////////////////////////////////////////////////// -// ArticleViewDefaultWidget -//////////////////////////////////////////////////////////////////////////////////////////////////// -ArticleViewDefaultWidget::ArticleViewDefaultWidget(QWidget* parent, - const ArticleDescriptor& article, - const ResourceManifest& manifest) - : ArticleView(parent, article, manifest) - , m_ui(new Ui::ArticleViewWidget()) -{ - m_ui->setupUi(this); - SetupViewWidget(m_ui->imageFrame, m_ui->titleLabel, m_ui->bodyLabel); - Update(); -} - -//////////////////////////////////////////////////////////////////////////////////////////////////// -// ArticleViewPinnedWidget -//////////////////////////////////////////////////////////////////////////////////////////////////// -ArticleViewPinnedWidget::ArticleViewPinnedWidget(QWidget* parent, - const ArticleDescriptor& article, - const ResourceManifest& manifest) - : ArticleView(parent, article, manifest) - , m_ui(new Ui::PinnedArticleViewWidget()) -{ - m_ui->setupUi(this); - SetupViewWidget(m_ui->imageFrame, m_ui->titleLabel, m_ui->bodyLabel); - Update(); -} - -#include "NewsShared/Qt/moc_ArticleView.cpp" diff --git a/Code/Tools/News/NewsShared/Qt/ArticleView.h b/Code/Tools/News/NewsShared/Qt/ArticleView.h deleted file mode 100644 index 16a29732f0..0000000000 --- a/Code/Tools/News/NewsShared/Qt/ArticleView.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#if !defined(Q_MOC_RUN) -#include -#endif - -namespace Ui -{ - class ArticleViewWidget; - class PinnedArticleViewWidget; -} - -namespace AzQtComponents -{ - class ExtendedLabel; -} - -class QFrame; - -namespace News -{ - class ArticleDescriptor; - class ResourceManifest; - - class ArticleView - : public QWidget - { - Q_OBJECT - public: - ArticleView(QWidget* parent, - const ArticleDescriptor& article, - const ResourceManifest& manifest); - ~ArticleView() = default; - - void Update(); - QSharedPointer GetArticle() const; - - Q_SIGNALS: - void articleSelectedSignal(QString resourceId); - void linkActivatedSignal(const QString& link); - - protected: - void SetupViewWidget(QFrame* widgetImageFrame, AzQtComponents::ExtendedLabel* widgetTitle, AzQtComponents::ExtendedLabel* widgetBody); - void mousePressEvent(QMouseEvent* event); - - private: - - QFrame* m_widgetImageFrame = nullptr; - AzQtComponents::ExtendedLabel* m_widgetTitle = nullptr; - AzQtComponents::ExtendedLabel* m_widgetBody = nullptr; - AzQtComponents::ExtendedLabel* m_icon = nullptr; - - QSharedPointer m_pArticle; - const ResourceManifest& m_manifest; - - void RemoveIcon(); - - private Q_SLOTS: - void linkActivatedSlot(const QString& link); - void articleSelectedSlot(); - }; - - class ArticleViewDefaultWidget : public ArticleView - { - public: - ArticleViewDefaultWidget(QWidget* parent, - const ArticleDescriptor& article, - const ResourceManifest& manifest); - ~ArticleViewDefaultWidget() = default; - - private: - Ui::ArticleViewWidget* m_ui = nullptr; - }; - - class ArticleViewPinnedWidget : public ArticleView - { - public: - ArticleViewPinnedWidget(QWidget* parent, - const ArticleDescriptor& article, - const ResourceManifest& manifest); - ~ArticleViewPinnedWidget() = default; - - private: - Ui::PinnedArticleViewWidget* m_ui = nullptr; - }; -} diff --git a/Code/Tools/News/NewsShared/Qt/ArticleView.ui b/Code/Tools/News/NewsShared/Qt/ArticleView.ui deleted file mode 100644 index 67d1d8857b..0000000000 --- a/Code/Tools/News/NewsShared/Qt/ArticleView.ui +++ /dev/null @@ -1,244 +0,0 @@ - - - ArticleViewWidget - - - - 0 - 0 - 430 - 376 - - - - - 0 - 0 - - - - - 430 - 0 - - - - - 430 - 16777215 - - - - ArticleView - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - default - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 430 - 184 - - - - - 430 - 184 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 0 - 20 - - - - - - - - - 0 - 0 - - - - - Open Sans - 14 - 50 - false - - - - Title: - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - true - - - false - - - Qt::LinksAccessibleByMouse - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 12 - - - - - - - - - 0 - 0 - - - - - Open Sans - 8 - 50 - false - - - - Body - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - true - - - 0 - - - 0 - - - false - - - Qt::LinksAccessibleByMouse - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 0 - 24 - - - - - - - - - - - - AzQtComponents::ExtendedLabel - QLabel -
AzQtComponents/Components/ExtendedLabel.h
-
-
- - -
diff --git a/Code/Tools/News/NewsShared/Qt/ArticleViewContainer.cpp b/Code/Tools/News/NewsShared/Qt/ArticleViewContainer.cpp deleted file mode 100644 index 1d718d1bb8..0000000000 --- a/Code/Tools/News/NewsShared/Qt/ArticleViewContainer.cpp +++ /dev/null @@ -1,266 +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 "ArticleViewContainer.h" -#include "ArticleView.h" -#include "NewsShared/ResourceManagement/ResourceManifest.h" -#include "NewsShared/ResourceManagement/ArticleDescriptor.h" -#include "NewsShared/ResourceManagement/Resource.h" -#include "NewsShared/Qt/ArticleErrorView.h" -#include "NewsShared/Qt/KeepInTouchView.h" -#include "NewsShared/Qt/ui_ArticleViewContainer.h" - -#include -#include - -namespace News -{ - - ArticleViewContainer::ArticleViewContainer(QWidget* parent, ResourceManifest& manifest) - : QWidget(parent) - , m_ui(new Ui::ArticleViewContainerWidget) - , m_manifest(manifest) - , m_loadingLabel(nullptr) - , m_errorMessage(nullptr) - { - m_ui->setupUi(this); - AddLoadingMessage(); - - m_keepInTouchViewWidget = new KeepInTouchView(this); - m_keepInTouchViewWidget->setVisible(false); - connect(m_keepInTouchViewWidget, &KeepInTouchView::linkActivatedSignal, - this, &ArticleViewContainer::linkActivatedSignal); - } - - ArticleViewContainer::~ArticleViewContainer() {} - - void ArticleViewContainer::PopulateArticles() - { - Clear(); - - bool articlesFound = false; - for (auto id : m_manifest.GetOrder()) - { - auto pResource = m_manifest.FindById(id); - if (pResource && pResource->GetType().compare("article") == 0) - { - AddArticleView(ArticleDescriptor(*pResource)); - articlesFound = true; - } - } - - if (!articlesFound) - { - AddErrorMessage(); - } - else - { - auto layout = static_cast(m_ui->articleViewContents->layout()); - layout->insertWidget(layout->count() - 1, m_keepInTouchViewWidget); - m_keepInTouchViewWidget->setVisible(true); - } - - qApp->processEvents(); - } - - ArticleView* ArticleViewContainer::FindById(const QString& id) - { - auto it = std::find_if( - m_articles.begin(), - m_articles.end(), - [id](ArticleView* articleView) -> bool - { - if (!articleView) - { - return false; - } - return articleView->GetArticle()->GetResource().GetId().compare(id) == 0; - }); - if (it == m_articles.end()) - { - return nullptr; - } - return *it; - } - - void ArticleViewContainer::AddArticleView(const ArticleDescriptor& articleDesc, int articlePosition) - { - ClearError(); - - ArticleView* view = CreateArticleView(articleDesc); - if (view == nullptr) - { - return; - } - - m_articles.append(view); - - connect(view, &ArticleView::articleSelectedSignal, - this, &ArticleViewContainer::articleSelectedSlot); - connect(view, &ArticleView::linkActivatedSignal, - this, &ArticleViewContainer::linkActivatedSignal); - - auto layout = static_cast(m_ui->articleViewContents->layout()); - if (articlePosition == -1) - { - articlePosition = layout->count() - 1; - } - - layout->insertWidget(articlePosition, view); - qApp->processEvents(); - } - - void ArticleViewContainer::DeleteArticleView(ArticleView* view) - { - m_articles.removeAll(view); - m_ui->articleViewContents->layout()->removeWidget(view); - delete view; - } - - void ArticleViewContainer::ForceRefreshArticleView(ArticleView* articleView) - { - if (articleView == nullptr) - { - return; - } - - QSharedPointer articleDesc = articleView->GetArticle(); - auto layout = static_cast(m_ui->articleViewContents->layout()); - const int viewIndex = layout->indexOf(articleView); - - DeleteArticleView(articleView); - AddArticleView(*articleDesc, viewIndex); - } - - void ArticleViewContainer::ScrollToView(ArticleView* view) const - { - m_ui->previewArea->ensureWidgetVisible(view); - } - - void ArticleViewContainer::ClearError() - { - //delete loading label - if (m_loadingLabel) - { - delete m_loadingLabel; - m_loadingLabel = nullptr; - } - - //delete error message - if (m_errorMessage) - { - delete m_errorMessage; - m_errorMessage = nullptr; - } - } - - void ArticleViewContainer::articleSelectedSlot(QString id) - { - emit articleSelectedSignal(id); - } - - void ArticleViewContainer::UpdateArticleOrder(ArticleView* view, bool direction) const - { - QVBoxLayout* layout = qobject_cast(m_ui->articleViewContents->layout()); - - const int index = layout->indexOf(view); - - if (direction && index == 0) - { - return; - } - - if (!direction && index == layout->count() - 2) - { - return; - } - - const int newIndex = direction ? index - 1 : index + 1; - layout->removeWidget(view); - layout->insertWidget(newIndex, view); - } - - void ArticleViewContainer::AddLoadingMessage() - { - if (m_errorMessage) - { - delete m_errorMessage; - m_errorMessage = nullptr; - } - - if (!m_loadingLabel) - { - m_loadingLabel = new QLabel(this); - m_loadingLabel->setText("Retrieving news..."); - auto layout = static_cast(m_ui->articleViewContents->layout()); - layout->insertWidget(0, m_loadingLabel); - } - } - - void ArticleViewContainer::AddErrorMessage() - { - if (m_loadingLabel) - { - delete m_loadingLabel; - m_loadingLabel = nullptr; - } - - if (!m_errorMessage) - { - m_errorMessage = new ArticleErrorView(this); - auto layout = static_cast(m_ui->articleViewContents->layout()); - layout->insertWidget(0, m_errorMessage); - } - } - - void ArticleViewContainer::Clear() - { - ClearError(); - - for (auto articleView : m_articles) - { - delete articleView; - } - - m_articles.clear(); - } - - ArticleViewContainer::ArticleStyle ArticleViewContainer::GetArticleStyleEnumFromString(const QString& articleStyleStr) const - { - static const QMap articleStyleStringEnumMap = { - { "default", ArticleStyle::Default }, - { "pinned", ArticleStyle::Pinned } - }; - - if (articleStyleStringEnumMap.contains(articleStyleStr) == false) - { - Q_ASSERT(false); - return ArticleStyle::Default; - } - - return articleStyleStringEnumMap.value(articleStyleStr); - } - - ArticleView* ArticleViewContainer::CreateArticleView(const ArticleDescriptor& articleDesc) - { - ArticleStyle articleStyle = GetArticleStyleEnumFromString(articleDesc.GetArticleStyle()); - - switch(articleStyle) - { - case ArticleStyle::Default: - return new ArticleViewDefaultWidget(this, articleDesc, m_manifest); - case ArticleStyle::Pinned: - return new ArticleViewPinnedWidget(this, articleDesc, m_manifest); - default: - Q_ASSERT(false); - return nullptr; - } - } - -} - -#include "NewsShared/Qt/moc_ArticleViewContainer.cpp" diff --git a/Code/Tools/News/NewsShared/Qt/ArticleViewContainer.h b/Code/Tools/News/NewsShared/Qt/ArticleViewContainer.h deleted file mode 100644 index c0ae3b2701..0000000000 --- a/Code/Tools/News/NewsShared/Qt/ArticleViewContainer.h +++ /dev/null @@ -1,81 +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 - -#if !defined(Q_MOC_RUN) -#include "NewsShared/LogType.h" - -#include -#include -#endif - -class QLabel; - -namespace Ui -{ - class ArticleViewContainerWidget; -} - -namespace News -{ - class Resource; - class ArticleView; - class ArticleDescriptor; - class ResourceManifest; - class ArticleErrorView; - class KeepInTouchView; - - class ArticleViewContainer - : public QWidget - { - Q_OBJECT - - enum ArticleStyle - { - Default, - Pinned - }; - - public: - explicit ArticleViewContainer(QWidget* parent, ResourceManifest& manifest); - ~ArticleViewContainer(); - - virtual void PopulateArticles(); - ArticleView* FindById(const QString& id); - void AddArticleView(const ArticleDescriptor& articleDesc, int articlePosition = -1); - void DeleteArticleView(ArticleView* view); - void ForceRefreshArticleView(ArticleView* articleView); - void ScrollToView(ArticleView* view) const; - void UpdateArticleOrder(ArticleView* view, bool direction) const; - void AddLoadingMessage(); - void AddErrorMessage(); - void Clear(); - - Q_SIGNALS: - void articleSelectedSignal(QString resourceId); - void addArticle(Resource* article); - void logSignal(QString text, LogType logType = LogInfo); - void scrolled(); - void linkActivatedSignal(const QString& link); - - private: - QScopedPointer m_ui; - QList m_articles; - ResourceManifest& m_manifest; - QLabel* m_loadingLabel; - ArticleErrorView* m_errorMessage; - KeepInTouchView* m_keepInTouchViewWidget = nullptr; - - void ClearError(); - ArticleStyle GetArticleStyleEnumFromString(const QString& articleStyleStr) const; - ArticleView* CreateArticleView(const ArticleDescriptor& articleDesc); - - private Q_SLOTS: - virtual void articleSelectedSlot(QString id); - }; -} diff --git a/Code/Tools/News/NewsShared/Qt/ArticleViewContainer.ui b/Code/Tools/News/NewsShared/Qt/ArticleViewContainer.ui deleted file mode 100644 index dfb71ea31f..0000000000 --- a/Code/Tools/News/NewsShared/Qt/ArticleViewContainer.ui +++ /dev/null @@ -1,104 +0,0 @@ - - - ArticleViewContainerWidget - - - - 0 - 0 - 606 - 753 - - - - Form - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - QFrame::NoFrame - - - QFrame::Plain - - - 0 - - - Qt::ScrollBarAlwaysOn - - - Qt::ScrollBarAlwaysOff - - - true - - - Qt::AlignHCenter|Qt::AlignTop - - - - - 0 - 0 - 589 - 753 - - - - - 16 - - - 15 - - - 15 - - - 15 - - - 15 - - - - - Qt::Vertical - - - - 20 - 0 - - - - - - - - - - - - - diff --git a/Code/Tools/News/NewsShared/Qt/KeepInTouchView.cpp b/Code/Tools/News/NewsShared/Qt/KeepInTouchView.cpp deleted file mode 100644 index 43c32c43fc..0000000000 --- a/Code/Tools/News/NewsShared/Qt/KeepInTouchView.cpp +++ /dev/null @@ -1,82 +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 "KeepInTouchView.h" -#include "NewsShared/Qt/ui_KeepInTouchView.h" - -#include -#include -#include -#include - -namespace News -{ - KeepInTouchView::KeepInTouchView(QWidget* parent) - : QWidget(parent) - , m_ui(new Ui::KeepInTouchViewWidget()) - { - m_ui->setupUi(this); - - m_ui->twich_container->setCursor(Qt::PointingHandCursor); - m_ui->twitter_container->setCursor(Qt::PointingHandCursor); - m_ui->youtube_container->setCursor(Qt::PointingHandCursor); - m_ui->facebook_container->setCursor(Qt::PointingHandCursor); - - m_ui->twich_container->installEventFilter(this); - m_ui->twitter_container->installEventFilter(this); - m_ui->youtube_container->installEventFilter(this); - m_ui->facebook_container->installEventFilter(this); - } - - bool KeepInTouchView::eventFilter(QObject *watched, QEvent *event) - { - if (event->type() == QEvent::MouseButtonRelease) - { - if (watched == m_ui->twich_container) - { - return LaunchSocialMediaUrl(SocialMediaType::Twitch); - } - else if (watched == m_ui->twitter_container) - { - return LaunchSocialMediaUrl(SocialMediaType::Twitter); - } - else if (watched == m_ui->youtube_container) - { - return LaunchSocialMediaUrl(SocialMediaType::YouTube); - } - else if (watched == m_ui->facebook_container) - { - return LaunchSocialMediaUrl(SocialMediaType::Facebook); - } - } - - return QWidget::eventFilter(watched, event); - } - - bool KeepInTouchView::LaunchSocialMediaUrl(SocialMediaType type) - { - static const QMap socialMediaTypeToUrlMap = - { - { SocialMediaType::Twitch, m_twitchUrl }, - { SocialMediaType::Twitter, m_twitterUrl }, - { SocialMediaType::YouTube, m_youtubeUrl }, - { SocialMediaType::Facebook, m_facebookUrl } - }; - - if (socialMediaTypeToUrlMap.contains(type) == false) - { - return false; - } - - QString link = socialMediaTypeToUrlMap[type]; - Q_EMIT linkActivatedSignal(link); - - return QDesktopServices::openUrl(QUrl(link)); - } -} - -#include "NewsShared/Qt/moc_KeepInTouchView.cpp" diff --git a/Code/Tools/News/NewsShared/Qt/KeepInTouchView.h b/Code/Tools/News/NewsShared/Qt/KeepInTouchView.h deleted file mode 100644 index 5d5c6a9e36..0000000000 --- a/Code/Tools/News/NewsShared/Qt/KeepInTouchView.h +++ /dev/null @@ -1,53 +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 - -#if !defined(Q_MOC_RUN) -#include -#endif - -namespace Ui -{ - class KeepInTouchViewWidget; -} - -namespace News -{ - class KeepInTouchView - : public QWidget - { - Q_OBJECT - - enum class SocialMediaType - { - Twitch, - Twitter, - YouTube, - Facebook - }; - - public: - KeepInTouchView(QWidget* parent); - ~KeepInTouchView() = default; - - bool eventFilter(QObject *watched, QEvent *event); - - Q_SIGNALS: - void linkActivatedSignal(const QString& link); - - private: - bool LaunchSocialMediaUrl(SocialMediaType type); - - Ui::KeepInTouchViewWidget* m_ui = nullptr; - - const char* m_twitchUrl = "https://docs.aws.amazon.com/console/lumberyard/twitch"; - const char* m_twitterUrl = "https://docs.aws.amazon.com/console/lumberyard/twitter"; - const char* m_youtubeUrl = "https://docs.aws.amazon.com/console/lumberyard/youtube"; - const char* m_facebookUrl = "https://docs.aws.amazon.com/console/lumberyard/facebook"; - }; -} diff --git a/Code/Tools/News/NewsShared/Qt/KeepInTouchView.ui b/Code/Tools/News/NewsShared/Qt/KeepInTouchView.ui deleted file mode 100644 index 076059f49d..0000000000 --- a/Code/Tools/News/NewsShared/Qt/KeepInTouchView.ui +++ /dev/null @@ -1,423 +0,0 @@ - - - KeepInTouchViewWidget - - - - 0 - 0 - 430 - 336 - - - - - 0 - 0 - - - - - 430 - 0 - - - - - 430 - 16777215 - - - - ArticleView - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - 430 - 184 - - - - - 430 - 184 - - - - - - - :/images/Resources/KeepInTouchBanner.jpg - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 0 - 20 - - - - - - - - - 0 - 0 - - - - - Open Sans - 14 - 50 - false - - - - Keep in touch! - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - true - - - false - - - Qt::LinksAccessibleByMouse - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 12 - - - - - - - - - 0 - 0 - - - - - Open Sans - 8 - 50 - false - - - - Want to know the latest news at AmazonGameDev? Sign up for our newsletter and use the following links to find us! - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - true - - - 0 - - - 0 - - - false - - - Qt::LinksAccessibleByMouse - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 16 - - - - - - - - background: transparent; - - - - 20 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - 8 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - :/images/Resources/icon_twitch.png - - - - - - - Twitch - - - - - - - - - - - 0 - 0 - - - - - 8 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - :/images/Resources/icon_twitter.png - - - - - - - Twitter - - - - - - - - - - - 0 - 0 - - - - - 8 - - - 0 - - - 0 - - - 0 - - - - - - - - :/images/Resources/icon_youtube.png - - - - - - - Youtube - - - - - - - - - - - 8 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - :/images/Resources/icon_facebook.png - - - - - - - Facebook - - - - - - - - - - - - - - - - - AzQtComponents::ExtendedLabel - QLabel -
AzQtComponents/Components/ExtendedLabel.h
-
-
- - - - -
diff --git a/Code/Tools/News/NewsShared/Qt/NewsShared.qrc b/Code/Tools/News/NewsShared/Qt/NewsShared.qrc deleted file mode 100644 index 8d5b84494b..0000000000 --- a/Code/Tools/News/NewsShared/Qt/NewsShared.qrc +++ /dev/null @@ -1,10 +0,0 @@ - - - ../Resources/ErrorImage.jpg - ../Resources/KeepInTouchBanner.jpg - ../Resources/icon_facebook.png - ../Resources/icon_twitch.png - ../Resources/icon_twitter.png - ../Resources/icon_youtube.png - - diff --git a/Code/Tools/News/NewsShared/Qt/PinnedArticleView.ui b/Code/Tools/News/NewsShared/Qt/PinnedArticleView.ui deleted file mode 100644 index 928046a064..0000000000 --- a/Code/Tools/News/NewsShared/Qt/PinnedArticleView.ui +++ /dev/null @@ -1,260 +0,0 @@ - - - PinnedArticleViewWidget - - - - 0 - 0 - 430 - 376 - - - - - 0 - 0 - - - - - 430 - 0 - - - - - 430 - 16777215 - - - - ArticleView - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - pinned - - - - 12 - - - 16 - - - 16 - - - 16 - - - 16 - - - - - - 128 - 0 - - - - - 128 - 16777215 - - - - background-color: transparent; - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 128 - 96 - - - - - 128 - 96 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - Qt::Vertical - - - - 0 - 0 - - - - - - - - - - - background-color: transparent; - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - Open Sans - 14 - 50 - false - - - - Title: - - - true - - - false - - - Qt::LinksAccessibleByMouse - - - sectionTitle - - - - - - - - 0 - 0 - - - - - Open Sans - 8 - 50 - false - - - - Body - - - true - - - false - - - Qt::LinksAccessibleByMouse - - - - - - - - - - - - - - AzQtComponents::ExtendedLabel - QLabel -
AzQtComponents/Components/ExtendedLabel.h
-
-
- - -
diff --git a/Code/Tools/News/NewsShared/ResourceManagement/ArticleDescriptor.cpp b/Code/Tools/News/NewsShared/ResourceManagement/ArticleDescriptor.cpp deleted file mode 100644 index c26d2357d7..0000000000 --- a/Code/Tools/News/NewsShared/ResourceManagement/ArticleDescriptor.cpp +++ /dev/null @@ -1,81 +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 "ArticleDescriptor.h" -#include "Resource.h" - -#include -#include - -using namespace News; - -ArticleDescriptor::ArticleDescriptor( - Resource& resource) - : JsonDescriptor(resource) - , m_imageId(m_json["image"].toString()) - , m_title(m_json["title"].toString()) - , m_body(m_json["body"].toString()) - , m_order(m_json["order"].toInt()) -{ - if (m_json.contains("articleStyle") == true) - { - m_articleStyle = m_json["articleStyle"].toString(); - } -} - -void ArticleDescriptor::Update() const -{ - QJsonObject json; - json["image"] = m_imageId; - json["title"] = m_title; - json["body"] = m_body; - json["order"] = m_order; - json["articleStyle"] = m_articleStyle; - QJsonDocument doc(json); - QByteArray data = doc.toJson(QJsonDocument::Compact).toStdString().data(); - m_resource.SetData(data); -} - -const QString& ArticleDescriptor::GetArticleStyle() const -{ - return m_articleStyle; -} - -void ArticleDescriptor::SetArticleStyle(const QString& style) -{ - m_articleStyle = style; -} - -const QString& ArticleDescriptor::GetImageId() const -{ - return m_imageId; -} - -void ArticleDescriptor::SetImageId(const QString& imageId) -{ - m_imageId = imageId; -} - -const QString& ArticleDescriptor::GetTitle() const -{ - return m_title; -} - -void ArticleDescriptor::SetTitle(const QString& title) -{ - m_title = title; -} - -const QString& ArticleDescriptor::GetBody() const -{ - return m_body; -} - -void ArticleDescriptor::SetBody(const QString& body) -{ - m_body = body; -} diff --git a/Code/Tools/News/NewsShared/ResourceManagement/ArticleDescriptor.h b/Code/Tools/News/NewsShared/ResourceManagement/ArticleDescriptor.h deleted file mode 100644 index c0ca459cf4..0000000000 --- a/Code/Tools/News/NewsShared/ResourceManagement/ArticleDescriptor.h +++ /dev/null @@ -1,51 +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 "JsonDescriptor.h" - -#include - -namespace News -{ - class Resource; - - //! ArticleDescriptor represents Resource as an article - class ArticleDescriptor - : public JsonDescriptor - { - public: - explicit ArticleDescriptor(Resource& resource); - - //! If article was modified, call this to update resource data - void Update() const; - - const QString& GetArticleStyle() const; - - void SetArticleStyle(const QString& style); - - const QString& GetImageId() const; - - void SetImageId(const QString& imageId); - - const QString& GetTitle() const; - - void SetTitle(const QString& title); - - const QString& GetBody() const; - - void SetBody(const QString& body); - - private: - QString m_articleStyle = "default"; - QString m_imageId; - QString m_title; - QString m_body; - int m_order; - }; -} diff --git a/Code/Tools/News/NewsShared/ResourceManagement/Descriptor.cpp b/Code/Tools/News/NewsShared/ResourceManagement/Descriptor.cpp deleted file mode 100644 index 0d21a18c05..0000000000 --- a/Code/Tools/News/NewsShared/ResourceManagement/Descriptor.cpp +++ /dev/null @@ -1,15 +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 "Descriptor.h" - -using namespace News; - -Descriptor::Descriptor(Resource& resource) - : m_resource(resource) {} - -Descriptor::~Descriptor() {} diff --git a/Code/Tools/News/NewsShared/ResourceManagement/Descriptor.h b/Code/Tools/News/NewsShared/ResourceManagement/Descriptor.h deleted file mode 100644 index 3d56037543..0000000000 --- a/Code/Tools/News/NewsShared/ResourceManagement/Descriptor.h +++ /dev/null @@ -1,32 +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 - -namespace News -{ - class Resource; - - //! Descriptor is a simple solution to add additional functionality to a Resource - /*! - Some descriptors can only work with certain resource types, like AerticleDescriptor - */ - class Descriptor - { - public: - explicit Descriptor(Resource& resource); - virtual ~Descriptor(); - - Resource& GetResource() const - { - return m_resource; - } - - protected: - Resource& m_resource; - }; -} diff --git a/Code/Tools/News/NewsShared/ResourceManagement/JsonDescriptor.cpp b/Code/Tools/News/NewsShared/ResourceManagement/JsonDescriptor.cpp deleted file mode 100644 index 5e71c8f10b..0000000000 --- a/Code/Tools/News/NewsShared/ResourceManagement/JsonDescriptor.cpp +++ /dev/null @@ -1,20 +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 "JsonDescriptor.h" -#include "Resource.h" - -#include - -using namespace News; - -JsonDescriptor::JsonDescriptor(Resource& resource) - : Descriptor(resource) - , m_doc(QJsonDocument::fromJson(m_resource.GetData())) - , m_json(m_doc.object()) -{ -} diff --git a/Code/Tools/News/NewsShared/ResourceManagement/JsonDescriptor.h b/Code/Tools/News/NewsShared/ResourceManagement/JsonDescriptor.h deleted file mode 100644 index 286e66c4ac..0000000000 --- a/Code/Tools/News/NewsShared/ResourceManagement/JsonDescriptor.h +++ /dev/null @@ -1,28 +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 "Descriptor.h" - -#include -#include - -namespace News -{ - //! JsonDescriptor assumes Resource is a JSON file - class JsonDescriptor - : public Descriptor - { - public: - explicit JsonDescriptor(Resource& resource); - - protected: - QJsonDocument m_doc; - QJsonObject m_json; - }; -} diff --git a/Code/Tools/News/NewsShared/ResourceManagement/QtDownloadManager.cpp b/Code/Tools/News/NewsShared/ResourceManagement/QtDownloadManager.cpp deleted file mode 100644 index e70285fd31..0000000000 --- a/Code/Tools/News/NewsShared/ResourceManagement/QtDownloadManager.cpp +++ /dev/null @@ -1,58 +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 "QtDownloadManager.h" -#include "QtDownloader.h" - -namespace News -{ - -QtDownloadManager::QtDownloadManager() - : QObject() - , m_worker(new QtDownloader) // this will start the thread which does downloads -{ - // make sure the response handlers are queued connections as the worker runs in a different thread - connect(m_worker, &QtDownloader::failed, this, &QtDownloadManager::failedReply, Qt::QueuedConnection); - connect(m_worker, &QtDownloader::successfullyFinished, this, &QtDownloadManager::successfulReply, Qt::QueuedConnection); -} - -QtDownloadManager::~QtDownloadManager() -{ - // NOTE: we don't delete the QtDownloader; it deletes itself. - // We just tell it to stop - m_worker->Finish(); -} - -void QtDownloadManager::Download(const QString& url, - std::function downloadSuccessCallback, - std::function downloadFailCallback) -{ - int downloadId = m_worker->Download(url); - m_downloads[downloadId] = { downloadSuccessCallback, downloadFailCallback }; -} - -void QtDownloadManager::Abort() -{ - m_worker->Abort(); - m_downloads.clear(); -} - -void QtDownloadManager::successfulReply(int downloadId, QByteArray data) -{ - m_downloads[downloadId].downloadSuccessCallback(data); - m_downloads.remove(downloadId); -} - -void QtDownloadManager::failedReply(int downloadId) -{ - m_downloads[downloadId].downloadFailCallback(); - m_downloads.remove(downloadId); -} - -} // namespace News - -#include "NewsShared/ResourceManagement/moc_QtDownloadManager.cpp" diff --git a/Code/Tools/News/NewsShared/ResourceManagement/QtDownloadManager.h b/Code/Tools/News/NewsShared/ResourceManagement/QtDownloadManager.h deleted file mode 100644 index 6a7c93a51f..0000000000 --- a/Code/Tools/News/NewsShared/ResourceManagement/QtDownloadManager.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#if !defined(Q_MOC_RUN) -#include -#include - -#include -#include -#endif - -namespace News -{ - class QtDownloader; - - //! QtDownloadManager handles multiple asynchronous downloads - class QtDownloadManager - : public QObject - { - Q_OBJECT - public: - QtDownloadManager(); - ~QtDownloadManager(); - - //! Asynchronously download a file from the input url and return it as QByteArray via the success callback - /*! - \param url - file url to download - \param downloadSuccessCallback - if download is successful pass file's data as QByteArray - \param downloadFailCallback - if download failed, pass error message - */ - void Download(const QString& url, - std::function downloadSuccessCallback, - std::function downloadFailCallback); - - //! Aborts all currently active downloads. Success/failure callbacks will not be called. - void Abort(); - - private: - void successfulReply(int downloadId, QByteArray data); - void failedReply(int downloadId); - - QtDownloader* m_worker = nullptr; - - struct DownloadResponses - { - std::function downloadSuccessCallback; - std::function downloadFailCallback; - }; - QMap m_downloads; - }; -} diff --git a/Code/Tools/News/NewsShared/ResourceManagement/QtDownloader.cpp b/Code/Tools/News/NewsShared/ResourceManagement/QtDownloader.cpp deleted file mode 100644 index 0139ec5344..0000000000 --- a/Code/Tools/News/NewsShared/ResourceManagement/QtDownloader.cpp +++ /dev/null @@ -1,133 +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 "QtDownloader.h" - -#include -#include -#include -#include - - -namespace News -{ - QtDownloader::QtDownloader() - : m_thread(new QThread()) - { - // make sure that everything that QObject::connects to us knows we're running in a different thread - moveToThread(m_thread); - - // handle clean up of both ourselves and of our thread. - // We manage thread clean up so that it can keep running and be cleaned up later, regardless of what - // the thing that created the QtDownloader does - connect(m_thread, &QThread::finished, m_thread, [this] { - m_thread->deleteLater(); - deleteLater(); - }); - - auto abortDownloadsHandler = [this] { - auto replies = m_downloads.keys(); - for (QNetworkReply* reply : replies) - { - reply->abort(); - } - - m_downloads.clear(); - }; - - auto queueDownloadHandler = [this](int downloadId, QString url) { - if (m_networkManager) - { - QNetworkReply* reply = m_networkManager->get(QNetworkRequest(QUrl(url))); - m_downloads.insert(reply, downloadId); - } - }; - - auto createNetworkManagerHandler = [this] { - m_networkManager = new QNetworkAccessManager; - connect(m_networkManager, &QNetworkAccessManager::finished, this, &QtDownloader::downloadFinished); - }; - - auto deleteNetworkManagerHandler = [this] { - delete m_networkManager; - m_networkManager = nullptr; - }; - - auto quitHandler = [this] { - // call quit via this callback, so that it executes in the running thread. - // QThread::quit() is actually blocking and waits until everything finishes, so - // we don't want to call it in the main thread - m_thread->quit(); - }; - - // make sure the response handlers are queued connections as the worker runs in one thread, but these triggers - // will be emitted from the main thread - connect(this, &QtDownloader::triggerAbortAll, this, abortDownloadsHandler, Qt::QueuedConnection); - connect(this, &QtDownloader::triggerDownload, this, queueDownloadHandler, Qt::QueuedConnection); - connect(this, &QtDownloader::triggerQuit, this, quitHandler, Qt::QueuedConnection); - - // create/delete the QNetworkAccessManager in our thread, to ensure that any slowdowns caused by - // having to create network connectors / load drivers are done in our non-ui thread. - // make sure that these connections are direct so that network requests can't predate the network engine itself - connect(m_thread, &QThread::started, this, createNetworkManagerHandler, Qt::DirectConnection); - connect(m_thread, &QThread::finished, this, deleteNetworkManagerHandler, Qt::DirectConnection); - - m_thread->start(); - } - - QtDownloader::~QtDownloader() - { - } - - int QtDownloader::Download(const QString& url) - { - // create a unique id for this download - int downloadId = m_lastId++; - - // trigger a download running in our worker thread - Q_EMIT triggerDownload(downloadId, url); - - return downloadId; - } - - void QtDownloader::Abort() - { - // trigger an abort in our worker thread - Q_EMIT triggerAbortAll(); - } - - void QtDownloader::Finish() - { - // trigger a quit in our worker thread - Q_EMIT triggerQuit(); - } - - void QtDownloader::downloadFinished(QNetworkReply* reply) - { - // Note: this will run in our worker thread - int downloadId = m_downloads[reply]; - - // emit the signal back to the main thread indicating that we're finished, either - // successfully or unsuccessfully - if (reply->error() == QNetworkReply::NoError) - { - Q_EMIT successfullyFinished(downloadId, reply->readAll()); - } - else - { - Q_EMIT failed(downloadId); - } - - // clean up the reply; have to do this later, according to the Qt docs - reply->deleteLater(); - - // make sure to remove our reference to this reply from our list of active downloads - m_downloads.remove(reply); - } - - #include "NewsShared/ResourceManagement/moc_QtDownloader.cpp" -} diff --git a/Code/Tools/News/NewsShared/ResourceManagement/QtDownloader.h b/Code/Tools/News/NewsShared/ResourceManagement/QtDownloader.h deleted file mode 100644 index 0dcc86e951..0000000000 --- a/Code/Tools/News/NewsShared/ResourceManagement/QtDownloader.h +++ /dev/null @@ -1,66 +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 - -#if !defined(Q_MOC_RUN) -#include -#include -#include -#include -#endif - -class QNetworkAccessManager; -class QNetworkReply; -class QThread; - -namespace News -{ - //! QtDownloader is a wrapper around Qt's file download functions - /*! - The QtDownloader spins up another thread and does all downloads in that thread. - The public slot methods (Finish, Download and Abort) can all be called from any thread. - The response signals (successfullyFinished and failed) should be QObject::connect to with - Qt::QueuedConnection, as they will be emitted from the worker thread. - */ - class QtDownloader - : public QObject - { - Q_OBJECT - - public: - QtDownloader(); - ~QtDownloader(); - - public Q_SLOTS: - void Finish(); - - int Download(const QString& url); - void Abort(); - - Q_SIGNALS: - void successfullyFinished(int downloadId, QByteArray data); - void failed(int downloadId); - - // *********************************************** - // private - DO NOT CONNECT TO outside of the class! - // (qt signals can't be made private) - void triggerAbortAll(); - void triggerDownload(int downloadId, QString url); - void triggerQuit(); - // *********************************************** - - private: - void downloadFinished(QNetworkReply* reply); - - int m_lastId = 0; - - QMap m_downloads; - QNetworkAccessManager* m_networkManager = nullptr; - QThread* m_thread; - }; -} diff --git a/Code/Tools/News/NewsShared/ResourceManagement/Resource.cpp b/Code/Tools/News/NewsShared/ResourceManagement/Resource.cpp deleted file mode 100644 index d40b66d6d7..0000000000 --- a/Code/Tools/News/NewsShared/ResourceManagement/Resource.cpp +++ /dev/null @@ -1,97 +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 "Resource.h" - -#include - -using namespace News; - -Resource::Resource(const QJsonObject& json) - : Resource( - json["id"].toString(), - QByteArray(), - json["url"].toString(), - json["type"].toString(), - json["refCount"].toInt(), - json["version"].toInt()) {} - -Resource::Resource(const QString& id, const QString& type) - : Resource( - id, - QByteArray(), - "", - type, - 1, - 0) {} - -Resource::Resource(const QString& id, - const QByteArray& data, - [[maybe_unused]] const QString& url, - const QString& type, - int refCount, - int version) - : m_id(id) - , m_data(data) - , m_type(type) - , m_refCount(refCount) - , m_version(version) {} - -Resource::~Resource() {} - -void Resource::Write(QJsonObject& json) const -{ - json["id"] = m_id; - json["type"] = m_type; - json["refCount"] = m_refCount; - json["version"] = m_version; -} - -QString Resource::GetId() const -{ - return m_id; -} - -void Resource::SetId(const QString& id) -{ - m_id = id; -} - -QByteArray Resource::GetData() const -{ - return m_data; -} - -void Resource::SetData(QByteArray data) -{ - m_data = data; -} - -QString Resource::GetType() const -{ - return m_type; -} - -int Resource::GetRefCount() const -{ - return m_refCount; -} - -void Resource::SetRefCount(int refCount) -{ - m_refCount = refCount; -} - -int Resource::GetVersion() const -{ - return m_version; -} - -void Resource::SetVersion(int version) -{ - m_version = version; -} diff --git a/Code/Tools/News/NewsShared/ResourceManagement/Resource.h b/Code/Tools/News/NewsShared/ResourceManagement/Resource.h deleted file mode 100644 index 1174fea788..0000000000 --- a/Code/Tools/News/NewsShared/ResourceManagement/Resource.h +++ /dev/null @@ -1,68 +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 - -class QJsonObject; - -namespace News -{ - class Descriptor; - - //! Resource is a central element of in-editor messages - //! It represents articles, images, and anything else that is part of news feed - class Resource - { - public: - //! resources are stored as json objects in \ref News::ResourceManifest - //! this creates resource with empty data array, that can be downloaded later - //! by calling News::ResourceManifest::Sync - explicit Resource(const QJsonObject& json); - - explicit Resource(const QString& id, - const QString& type); - - Resource(const QString& id, - const QByteArray& data, - const QString& url, - const QString& type, - int refCount, - int version); - - ~Resource(); - - //! Saves resource's description to a json file - void Write(QJsonObject& json) const; - - QString GetId() const; - - void SetId(const QString& id); - - QByteArray GetData() const; - - void SetData(QByteArray data); - - QString GetType() const; - - int GetRefCount() const; - - void SetRefCount(int refCount); - - int GetVersion() const; - - void SetVersion(int version); - - private: - QString m_id; - QByteArray m_data; - QString m_type; - int m_refCount; - int m_version; - }; -} diff --git a/Code/Tools/News/NewsShared/ResourceManagement/ResourceManifest.cpp b/Code/Tools/News/NewsShared/ResourceManagement/ResourceManifest.cpp deleted file mode 100644 index 969c4ec8f1..0000000000 --- a/Code/Tools/News/NewsShared/ResourceManagement/ResourceManifest.cpp +++ /dev/null @@ -1,349 +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 "ResourceManifest.h" -#include "NewsShared/ResourceManagement/QtDownloadManager.h" -#include "NewsShared/ResourceManagement/Resource.h" -#include "NewsShared/ResourceManagement/ArticleDescriptor.h" - -#include -#include -#include -#include -#include - -namespace News -{ - - const QString ResourceManifest::MANIFEST_NAME = "resourceManifest"; - bool ResourceManifest::s_syncing = false; - - ResourceManifest::ResourceManifest( - std::function syncSuccessCallback, - std::function syncFailCallback, - std::function syncUpdateCallback) - : m_downloader(new QtDownloadManager) - , m_syncSuccessCallback(syncSuccessCallback) - , m_syncFailCallback(syncFailCallback) - , m_syncUpdateCallback(syncUpdateCallback) - { - } - - ResourceManifest::~ResourceManifest() - { - // clean everything up - DeleteResources(); - - delete m_downloader; - } - - Resource* ResourceManifest::FindById(const QString& id) const - { - return FindById(id, m_resources); - } - - Resource* ResourceManifest::FindById(const QString& id, const QList& resources) - { - auto it = std::find_if( - resources.begin(), - resources.end(), - [id](Resource* resource) -> bool - { - return resource->GetId().compare(id) == 0; - }); - if (it == resources.end()) - { - return nullptr; - } - return *it; - } - - Resource* ResourceManifest::FindById(const QString& id, - const QStack& resources) - { - auto it = std::find_if( - resources.begin(), - resources.end(), - [id](Resource* resource) -> bool - { - return resource->GetId().compare(id) == 0; - }); - if (it == resources.end()) - { - return nullptr; - } - return *it; - } - - void ResourceManifest::Sync() - { - if (s_syncing) - { - FailSync(ErrorCode::AlreadySyncing); - return; - } - s_syncing = true; - m_failed = false; - - m_syncUpdateCallback("Starting sync", LogInfo); - - ReadConfig(); - - // first download the manifest json - m_syncUpdateCallback("Downloading manifest", LogInfo); - m_downloader->Download(QString(m_url).append(MANIFEST_NAME), - std::bind(&ResourceManifest::OnDownloadSuccess, this, std::placeholders::_1), - std::bind(&ResourceManifest::OnDownloadFail, this)); - } - - void ResourceManifest::Abort() - { - m_aborted = true; - m_downloader->Abort(); - } - - void ResourceManifest::Reset() - { - if (s_syncing) - { - m_syncUpdateCallback("Sync is already running", LogError); - return; - } - - m_aborted = false; - m_failed = false; - m_version = -1; - - DeleteResources(); - - m_order.clear(); - } - - QList::const_iterator ResourceManifest::begin() const - { - return m_resources.constBegin(); - } - - QList::const_iterator ResourceManifest::end() const - { - return m_resources.constEnd(); - } - - QList ResourceManifest::GetOrder() const - { - return m_order; - } - - void ResourceManifest::OnDownloadSuccess(QByteArray data) - { - QJsonDocument doc(QJsonDocument::fromJson(data)); - if (doc.isNull()) - { - FailSync(ErrorCode::FailedToParseManifest); - return; - } - - ErrorCode error = Read(doc.object()); - if (error != ErrorCode::None) - { - FailSync(error); - return; - } - - // check how many resources to sync - PrepareForSync(); - // if there is anything to sync, do that - if (m_syncLeft > 0) - { - m_syncUpdateCallback("Syncing resources", LogInfo); - SyncResources(); - } - // otherwise just finish sync - else - { - m_syncUpdateCallback("No new resources to sync", LogInfo); - FinishSync(); - } - } - - void ResourceManifest::OnDownloadFail() - { - FailSync(ErrorCode::ManifestDownloadFail); - } - - ErrorCode ResourceManifest::Read(const QJsonObject& json) - { - m_version = json["version"].toInt(); - QJsonArray resourceArray = json["resources"].toArray(); - // initially mark ALL existing resource for deletion - QList toDelete = m_resources; - - for (auto resourceDoc : resourceArray) - { - auto pNewResource = new Resource(resourceDoc.toObject()); - // find local resource with the same id as new resource - auto pOldResource = FindById(pNewResource->GetId(), m_resources); - // if resource with the same id already exists then check its version - if (pOldResource) - { - // local resource is outdated, keep it in delete list, and download new one instead - if (pNewResource->GetVersion() > pOldResource->GetVersion()) - { - m_toDownload.push(pNewResource); - } - // local resource is newer or same version, keep it (remove from toDelete list) - // and don't need to download new one - else - { - delete pNewResource; - toDelete.removeAll(pOldResource); - } - } - // resource with same id not found - else - { - m_toDownload.push(pNewResource); - } - } - - // delete everything that's not in s3 - for (auto pResource : toDelete) - { - RemoveResource(pResource); - delete pResource; - } - - // parse order of articles - m_order.clear(); - QJsonArray orderArray = json["order"].toArray(); - for (auto idObject : orderArray) - { - m_order.append(idObject.toString()); - } - return ErrorCode::None; - } - - void ResourceManifest::PrepareForSync() - { - if (m_aborted) - { - m_syncLeft = 0; - } - - m_syncLeft = m_toDownload.count(); - } - - void ResourceManifest::SyncResources() - { - DownloadResources(); - } - - void ResourceManifest::DownloadResources() - { - while (m_toDownload.count() > 0) - { - m_syncUpdateCallback( - QString("Downloading: %1 resources left").arg(m_toDownload.count()), - LogInfo); - - auto pResource = m_toDownload.pop(); - - m_downloader->Download(QString(m_url).append(pResource->GetId()), - //download success - [&, pResource](QByteArray data) - { - pResource->SetData(data); - AppendResource(pResource); - UpdateSync(); - }, - //download fail - [&, pResource]() - { - m_failed = true; - delete pResource; - m_syncUpdateCallback("Failed to download resource", LogError); - UpdateSync(); - }); - } - } - - void ResourceManifest::ReadConfig() - { - QFile file(QCoreApplication::applicationDirPath() + "/newsConfig.txt"); - if (file.exists()) - { - if (file.open(QIODevice::ReadOnly)) - { - QTextStream in(&file); - m_url = in.readAll().trimmed(); - file.close(); - } - } - } - - void ResourceManifest::DeleteResources() - { - for (auto pResource : m_toDownload) - { - delete pResource; - } - m_toDownload.clear(); - - for (auto pResource : m_resources) - { - delete pResource; - } - m_resources.clear(); - } - - void ResourceManifest::UpdateSync() - { - m_syncLeft--; - if (m_syncLeft == 0) - { - if (!m_failed) - { - FinishSync(); - } - else - { - FailSync(ErrorCode::FailedToSync); - } - } - } - - void ResourceManifest::FinishSync() - { - if (!m_failed) - { - m_syncSuccessCallback(); - } - else - { - m_syncFailCallback(m_errorCode); - } - s_syncing = false; - } - - void ResourceManifest::FailSync(ErrorCode error) - { - m_failed = true; - m_errorCode = error; - FinishSync(); - } - - void ResourceManifest::AppendResource(Resource* pResource) - { - m_resources.append(pResource); - } - - void ResourceManifest::RemoveResource(Resource* pResource) - { - m_resources.removeAll(pResource); - } - -} diff --git a/Code/Tools/News/NewsShared/ResourceManagement/ResourceManifest.h b/Code/Tools/News/NewsShared/ResourceManagement/ResourceManifest.h deleted file mode 100644 index 3a0f31de8f..0000000000 --- a/Code/Tools/News/NewsShared/ResourceManagement/ResourceManifest.h +++ /dev/null @@ -1,134 +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 - -#include "NewsShared/LogType.h" -#include "NewsShared/ErrorCodes.h" - -class QJsonObject; - -namespace News -{ - class ArticleDescriptor; - class UidGenerator; - class S3Connector; - class QtDownloadManager; - class Descriptor; - class DownloadDescriptor; - class Resource; - - //! ResourceManifest manages resources. - /*! - Manifest contains information on resources, it handles syncing resources with s3 - */ - class ResourceManifest - { - public: - //! ResourceManifest ctor - /*! - \param syncSuccessCallback - called once when everything is synced - \param syncFailCallback - called once when sync failed - \param syncUpdateCallback - called multiple times to update information on sync process - */ - explicit ResourceManifest( - std::function syncSuccessCallback, - std::function syncFailCallback, - std::function syncUpdateCallback); - virtual ~ResourceManifest(); - - //! Find a resource that matches id - /*! - \retval Resource * - a pointer to a Resource with matching id, if none found return nullptr - */ - Resource* FindById(const QString& id) const; - static Resource* FindById(const QString& id, const QList& resources); - static Resource* FindById(const QString& id, const QStack& resources); - - //! Sync resources with s3 - /* - 1) First download resource manifest file - 2) Parse manifest - 3) Determine which resources need to be downloaded, updated, or deleted - 4) Download missing resources or resource that are out of date - 5) Call m_syncSuccessCallback - */ - virtual void Sync(); - - //! Gracegully stop sync process - /*! - Aborting works differently depending at what point during sync porocess it is called - If called before resources started to download, then skip download altogether - Otherwise gracefully abort all downloads and call m_syncFailCallback - */ - void Abort(); - - //! Called when switching endpoints to reset resource manifest to a clean state - virtual void Reset(); - - QList::const_iterator begin() const; - QList::const_iterator end() const; - - //! Get order of article resources, so they can be displayed properly in ArticleViewContainer - QList GetOrder() const; - - protected: - //! The root location of cloudfront resources - QString m_url = "https://lumberyard-data.amazon.com/"; - //! Name of resourceManifest file that links all other resources - static const QString MANIFEST_NAME; - //! Identifies whether syncing is in progress - static bool s_syncing; - //! Manifest Version - int m_version = -1; - //! Number of resources left to sync - int m_syncLeft = 0; - //! Identifies whether sync process was aborted - bool m_aborted = false; - //! Indentifies whether sync process has failed - bool m_failed = false; - ErrorCode m_errorCode = ErrorCode::None; - - QtDownloadManager* m_downloader = nullptr; - - QList m_resources; - QList m_order; - QStack m_toDownload; - - std::function m_syncSuccessCallback; - std::function m_syncFailCallback; - std::function m_syncUpdateCallback; - - //! Parse resource manifest json, and figure out which resources need to be downloaded - virtual ErrorCode Read(const QJsonObject& json); - - //! Executed before sync to figure out how many resources need to be synced - virtual void PrepareForSync(); - //! Actual sync function - virtual void SyncResources(); - //! Check whether everything is synced, if so call ResourceManifest::FinishSync - void UpdateSync(); - //! Notify that everything is synced - virtual void FinishSync(); - void FailSync(ErrorCode error); - - virtual void AppendResource(Resource* pResource); - virtual void RemoveResource(Resource* pResource); - - virtual void OnDownloadSuccess(QByteArray data); - virtual void OnDownloadFail(); - virtual void DownloadResources(); - - private: - void ReadConfig(); - void DeleteResources(); - }; -} // namespace News diff --git a/Code/Tools/News/NewsShared/Resources/ErrorImage.jpg b/Code/Tools/News/NewsShared/Resources/ErrorImage.jpg deleted file mode 100644 index 216fe14bd5..0000000000 --- a/Code/Tools/News/NewsShared/Resources/ErrorImage.jpg +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0a7430d63820b3b00e03b4a8ec73b5e8e3946659031e3aeeb355b632acca4122 -size 8857 diff --git a/Code/Tools/News/NewsShared/Resources/KeepInTouchBanner.jpg b/Code/Tools/News/NewsShared/Resources/KeepInTouchBanner.jpg deleted file mode 100644 index b47040b717..0000000000 --- a/Code/Tools/News/NewsShared/Resources/KeepInTouchBanner.jpg +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:09c1733f116c11b56c54f7c3b6b4462884116db06605ca3cdfa23c45a3695385 -size 68024 diff --git a/Code/Tools/News/NewsShared/Resources/icon_facebook.png b/Code/Tools/News/NewsShared/Resources/icon_facebook.png deleted file mode 100644 index 0fb823969b..0000000000 --- a/Code/Tools/News/NewsShared/Resources/icon_facebook.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f8b5493c81354b6757a21bea6baedd5665b8cb9ca19a6ff4fbd40afef534f35f -size 1257 diff --git a/Code/Tools/News/NewsShared/Resources/icon_twitch.png b/Code/Tools/News/NewsShared/Resources/icon_twitch.png deleted file mode 100644 index 50d7436b0d..0000000000 --- a/Code/Tools/News/NewsShared/Resources/icon_twitch.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2882aad73e2ecf310934ec3eacd0c1fa0a6ff012a4c3c9cf4ca96a72cef2fb8c -size 514 diff --git a/Code/Tools/News/NewsShared/Resources/icon_twitter.png b/Code/Tools/News/NewsShared/Resources/icon_twitter.png deleted file mode 100644 index d1cf7eb3dd..0000000000 --- a/Code/Tools/News/NewsShared/Resources/icon_twitter.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:046e14f1d90f77bb6ea0fe700bb10049748b46bb84c8ac3620642d4bca9df533 -size 954 diff --git a/Code/Tools/News/NewsShared/Resources/icon_youtube.png b/Code/Tools/News/NewsShared/Resources/icon_youtube.png deleted file mode 100644 index d3e7869387..0000000000 --- a/Code/Tools/News/NewsShared/Resources/icon_youtube.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3abaf8b178763441ac6812ae518c2f8cbea9b228aa1f84052a65836b33dc980c -size 976 diff --git a/Code/Tools/News/news_shared_files.cmake b/Code/Tools/News/news_shared_files.cmake deleted file mode 100644 index 2f20029068..0000000000 --- a/Code/Tools/News/news_shared_files.cmake +++ /dev/null @@ -1,45 +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 -# -# - -set(FILES - NewsShared/LogType.h - NewsShared/ErrorCodes.h - NewsShared/Qt/ArticleErrorView.cpp - NewsShared/Qt/ArticleErrorView.h - NewsShared/Qt/ArticleErrorView.ui - NewsShared/Qt/ArticleView.cpp - NewsShared/Qt/ArticleView.h - NewsShared/Qt/ArticleView.ui - NewsShared/Qt/PinnedArticleView.ui - NewsShared/Qt/ArticleViewContainer.cpp - NewsShared/Qt/ArticleViewContainer.h - NewsShared/Qt/ArticleViewContainer.ui - NewsShared/Qt/KeepInTouchView.cpp - NewsShared/Qt/KeepInTouchView.h - NewsShared/Qt/KeepInTouchView.ui - NewsShared/Qt/NewsShared.qrc - NewsShared/ResourceManagement/ArticleDescriptor.cpp - NewsShared/ResourceManagement/ArticleDescriptor.h - NewsShared/ResourceManagement/Descriptor.cpp - NewsShared/ResourceManagement/Descriptor.h - NewsShared/ResourceManagement/JsonDescriptor.cpp - NewsShared/ResourceManagement/JsonDescriptor.h - NewsShared/ResourceManagement/QtDownloader.cpp - NewsShared/ResourceManagement/QtDownloader.h - NewsShared/ResourceManagement/QtDownloadManager.cpp - NewsShared/ResourceManagement/QtDownloadManager.h - NewsShared/ResourceManagement/Resource.cpp - NewsShared/ResourceManagement/Resource.h - NewsShared/ResourceManagement/ResourceManifest.cpp - NewsShared/ResourceManagement/ResourceManifest.h - NewsShared/Resources/ErrorImage.jpg - NewsShared/Resources/KeepInTouchBanner.jpg - NewsShared/Resources/icon_facebook.png - NewsShared/Resources/icon_twitch.png - NewsShared/Resources/icon_twitter.png - NewsShared/Resources/icon_youtube.png -) diff --git a/Code/Tools/ProjectManager/Resources/FeatureTagClose.svg b/Code/Tools/ProjectManager/Resources/FeatureTagClose.svg new file mode 100644 index 0000000000..9ab30acd65 --- /dev/null +++ b/Code/Tools/ProjectManager/Resources/FeatureTagClose.svg @@ -0,0 +1,4 @@ + + + + diff --git a/Code/Tools/ProjectManager/Resources/ProjectManager.qrc b/Code/Tools/ProjectManager/Resources/ProjectManager.qrc index cfe4b37fbc..2e93e9eca9 100644 --- a/Code/Tools/ProjectManager/Resources/ProjectManager.qrc +++ b/Code/Tools/ProjectManager/Resources/ProjectManager.qrc @@ -34,5 +34,6 @@ Warning.svg Backgrounds/DefaultBackground.jpg Backgrounds/FtueBackground.jpg + FeatureTagClose.svg diff --git a/Code/Tools/ProjectManager/Resources/ProjectManager.qss b/Code/Tools/ProjectManager/Resources/ProjectManager.qss index d6a2476e83..74acc1c7ef 100644 --- a/Code/Tools/ProjectManager/Resources/ProjectManager.qss +++ b/Code/Tools/ProjectManager/Resources/ProjectManager.qss @@ -435,8 +435,6 @@ QProgressBar { border: none; background-color: transparent; padding: 0px; - min-height: 14px; - font-size: 2px; } QProgressBar::chunk { @@ -478,6 +476,13 @@ QProgressBar::chunk { background-color: #333333; } +/************** Filter tag widget **************/ + +#FilterTagWidgetTextLabel { + color: #94D2FF; + font-size: 10px; +} + /************** Gem Catalog (Inspector) **************/ #GemCatalogInspector { diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemFilterTagWidget.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemFilterTagWidget.cpp new file mode 100644 index 0000000000..c7925a2d6e --- /dev/null +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemFilterTagWidget.cpp @@ -0,0 +1,94 @@ +/* + * 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 O3DE::ProjectManager +{ + FilterTagWidget::FilterTagWidget(const QString& text, QWidget* parent) + : QFrame(parent) + { + setFrameShape(QFrame::NoFrame); + + auto* layout = new QHBoxLayout(); + layout->setContentsMargins(6, 5, 4, 4); + layout->setSpacing(2); + setLayout(layout); + + setStyleSheet("background-color: #555555;"); + + m_textLabel = new QLabel(); + m_textLabel->setObjectName("FilterTagWidgetTextLabel"); + m_textLabel->setText(text); + layout->addWidget(m_textLabel); + + m_closeButton = new QPushButton(); + m_closeButton->setFlat(true); + m_closeButton->setIcon(QIcon(":/FeatureTagClose.svg")); + m_closeButton->setIconSize(QSize(12, 12)); + m_closeButton->setStyleSheet("QPushButton { background-color: transparent; border: 0px }"); + layout->addWidget(m_closeButton); + connect(m_closeButton, &QPushButton::clicked, this, [=]{ emit RemoveClicked(); }); + } + + QString FilterTagWidget::text() const + { + return m_textLabel->text(); + } + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + FilterTagWidgetContainer::FilterTagWidgetContainer(QWidget* parent) + : QWidget(parent) + { + m_layout = new QHBoxLayout(); + m_layout->setMargin(0); + m_layout->setSpacing(0); + setLayout(m_layout); + } + + void FilterTagWidgetContainer::Reinit(const QVector& tags) + { + if (m_widget) + { + // Hide the old widget and request deletion. + m_widget->hide(); + m_widget->deleteLater(); + } + + m_widget = new QWidget(this); + + QHBoxLayout* hLayout = new QHBoxLayout(); + hLayout->setAlignment(Qt::AlignLeft); + hLayout->setMargin(0); + hLayout->setSpacing(8); + + for(const QString& tag : tags) + { + FilterTagWidget* tagWidget = new FilterTagWidget(tag); + + // Add the tag widget to the current row. + hLayout->addWidget(tagWidget); + + // Connect the clicked event of the close button of the tag widget to the remove tag function in the container. + connect(tagWidget, &FilterTagWidget::RemoveClicked, this, [this, tagWidget]{ emit TagRemoved(tagWidget->text()); }); + } + + QWidget* spacerWidget = new QWidget(); + spacerWidget->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed); + hLayout->addWidget(spacerWidget); + + m_widget->setLayout(hLayout); + m_layout->addWidget(m_widget); + + setFixedHeight(30); + } +} // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemFilterTagWidget.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemFilterTagWidget.h new file mode 100644 index 0000000000..0994618d4e --- /dev/null +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemFilterTagWidget.h @@ -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 + * + */ + +#pragma once + +#if !defined(Q_MOC_RUN) +#include +#include +#include +#endif + +QT_FORWARD_DECLARE_CLASS(QHBoxLayout) +QT_FORWARD_DECLARE_CLASS(QLabel) +QT_FORWARD_DECLARE_CLASS(QPushButton) +QT_FORWARD_DECLARE_CLASS(QWidget) + +namespace O3DE::ProjectManager +{ + class FilterTagWidget + : public QFrame + { + Q_OBJECT + + public: + FilterTagWidget(const QString& text, QWidget* parent = nullptr); + QString text() const; + + signals: + void RemoveClicked(); + + private: + QLabel* m_textLabel = nullptr; + QPushButton* m_closeButton = nullptr; + }; + + // Horizontally expanding filter tag container widget + class FilterTagWidgetContainer + : public QWidget + { + Q_OBJECT + + public: + FilterTagWidgetContainer(QWidget* parent = nullptr); + void Reinit(const QVector& tags); + + signals: + void TagRemoved(QString tagName); + + private: + QWidget* m_widget = nullptr; + QHBoxLayout* m_layout = nullptr; + }; +} // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemFilterWidget.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemFilterWidget.cpp index 753371ba52..268e793ee8 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemFilterWidget.cpp +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemFilterWidget.cpp @@ -14,6 +14,7 @@ #include #include #include +#include namespace O3DE::ProjectManager { @@ -485,6 +486,7 @@ namespace O3DE::ProjectManager const QString& feature = elementNames[i]; QAbstractButton* button = buttons[i]; + // Adjust the proxy model and enable or disable the clicked feature used for filtering. connect(button, &QAbstractButton::toggled, this, [=](bool checked) { QSet features = m_filterProxyModel->GetFeatures(); @@ -498,6 +500,15 @@ namespace O3DE::ProjectManager } m_filterProxyModel->SetFeatures(features); }); + + // Sync the UI state with the proxy model filtering. + connect(m_filterProxyModel, &GemSortFilterProxyModel::OnInvalidated, this, [=] + { + const QSet& filteredFeatureTags = m_filterProxyModel->GetFeatures(); + const bool isChecked = filteredFeatureTags.contains(button->text()); + QSignalBlocker signalsBlocker(button); + button->setChecked(isChecked); + }); } } } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemItemDelegate.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemItemDelegate.cpp index b9dc3e9fcc..f5bedb79eb 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemItemDelegate.cpp +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemItemDelegate.cpp @@ -102,9 +102,11 @@ namespace O3DE::ProjectManager // In case there are feature tags displayed at the bottom, decrease the size of the summary text field. const QStringList featureTags = GemModel::GetFeatures(modelIndex); - const int summaryHeight = contentRect.height() - (!featureTags.empty() * 30); + const int featureTagAreaHeight = 30; + const int summaryHeight = contentRect.height() - (!featureTags.empty() * featureTagAreaHeight); - const QSize summarySize = QSize(contentRect.width() - s_summaryStartX - s_buttonWidth - s_itemMargins.right() * 3, + const int additionalSummarySpacing = s_itemMargins.right() * 3; + const QSize summarySize = QSize(contentRect.width() - s_summaryStartX - s_buttonWidth - additionalSummarySpacing, summaryHeight); const QRect summaryRect = QRect(/*topLeft=*/QPoint(contentRect.left() + s_summaryStartX, contentRect.top()), summarySize); diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemListHeaderWidget.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemListHeaderWidget.cpp index 5e2f93c2fc..3d6fd1947c 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemListHeaderWidget.cpp +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemListHeaderWidget.cpp @@ -7,10 +7,13 @@ #include #include -#include +#include +#include +#include #include -#include #include +#include +#include namespace O3DE::ProjectManager { @@ -23,11 +26,34 @@ namespace O3DE::ProjectManager setStyleSheet("background-color: #333333;"); - vLayout->addSpacing(20); + vLayout->addSpacing(13); // Top section QHBoxLayout* topLayout = new QHBoxLayout(); + topLayout->addSpacing(16); topLayout->setMargin(0); + + auto* tagWidget = new FilterTagWidgetContainer(); + + // Adjust the proxy model and disable the given feature used for filtering. + connect(tagWidget, &FilterTagWidgetContainer::TagRemoved, this, [=](QString tagName) + { + QSet filteredFeatureTags = proxyModel->GetFeatures(); + filteredFeatureTags.remove(tagName); + proxyModel->SetFeatures(filteredFeatureTags); + }); + + // Reinitialize the tag widget in case the filter in the proxy model got invalided. + connect(proxyModel, &GemSortFilterProxyModel::OnInvalidated, this, [=] + { + const QSet& tagSet = proxyModel->GetFeatures(); + QVector sortedTags(tagSet.begin(), tagSet.end()); + std::sort(sortedTags.begin(), sortedTags.end()); + tagWidget->Reinit(sortedTags); + }); + + topLayout->addWidget(tagWidget); + topLayout->addSpacerItem(new QSpacerItem(0, 0, QSizePolicy::Expanding)); QLabel* showCountLabel = new QLabel(); @@ -43,7 +69,7 @@ namespace O3DE::ProjectManager vLayout->addLayout(topLayout); - vLayout->addSpacing(20); + vLayout->addSpacing(13); // Separating line QFrame* hLine = new QFrame(); diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemListHeaderWidget.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemListHeaderWidget.h index a9b3b3aa36..fcad58a321 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemListHeaderWidget.h +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemListHeaderWidget.h @@ -8,9 +8,8 @@ #pragma once #if !defined(Q_MOC_RUN) +#include #include -#include -#include #include #endif diff --git a/Code/Tools/ProjectManager/Source/NewProjectSettingsScreen.cpp b/Code/Tools/ProjectManager/Source/NewProjectSettingsScreen.cpp index c0c96d8281..508b7256d1 100644 --- a/Code/Tools/ProjectManager/Source/NewProjectSettingsScreen.cpp +++ b/Code/Tools/ProjectManager/Source/NewProjectSettingsScreen.cpp @@ -6,6 +6,7 @@ */ #include +#include #include #include #include @@ -117,7 +118,7 @@ namespace O3DE::ProjectManager for (int index = 0; index < m_templates.size(); ++index) { ProjectTemplateInfo projectTemplate = m_templates.at(index); - QString projectPreviewPath = projectTemplate.m_path + "/Template/preview.png"; + QString projectPreviewPath = QDir(projectTemplate.m_path).filePath(ProjectPreviewImagePath); QFileInfo doesPreviewExist(projectPreviewPath); if (!doesPreviewExist.exists() || !doesPreviewExist.isFile()) { diff --git a/Code/Tools/ProjectManager/Source/ProjectManagerDefs.h b/Code/Tools/ProjectManager/Source/ProjectManagerDefs.h index f74233db51..79ad04c43a 100644 --- a/Code/Tools/ProjectManager/Source/ProjectManagerDefs.h +++ b/Code/Tools/ProjectManager/Source/ProjectManagerDefs.h @@ -12,6 +12,7 @@ namespace O3DE::ProjectManager { inline constexpr static int ProjectPreviewImageWidth = 210; inline constexpr static int ProjectPreviewImageHeight = 280; + inline constexpr static int ProjectTemplateImageWidth = 92; static const QString ProjectBuildPathPostfix = "build/windows_vs2019"; static const QString ProjectBuildPathCmakeFiles = "CMakeFiles"; diff --git a/Code/Tools/ProjectManager/Source/ProjectUtils.cpp b/Code/Tools/ProjectManager/Source/ProjectUtils.cpp index f7a90f5e0c..83e7546670 100644 --- a/Code/Tools/ProjectManager/Source/ProjectUtils.cpp +++ b/Code/Tools/ProjectManager/Source/ProjectUtils.cpp @@ -10,11 +10,13 @@ #include #include +#include #include #include #include #include #include +#include namespace O3DE::ProjectManager { @@ -55,7 +57,42 @@ namespace O3DE::ProjectManager return false; } - static bool CopyDirectory(const QString& origPath, const QString& newPath) + typedef AZStd::function StatusFunction; + static void RecursiveGetAllFiles(const QDir& directory, QStringList& outFileList, qint64& outTotalSizeInBytes, StatusFunction statusCallback) + { + const QStringList entries = directory.entryList(QDir::Dirs | QDir::Files | QDir::NoSymLinks | QDir::NoDotAndDotDot); + for (const QString& entryPath : entries) + { + const QString filePath = QDir::toNativeSeparators(QString("%1/%2").arg(directory.path()).arg(entryPath)); + QFileInfo fileInfo(filePath); + + if (fileInfo.isDir()) + { + QDir subDirectory(filePath); + RecursiveGetAllFiles(subDirectory, outFileList, outTotalSizeInBytes, statusCallback); + } + else + { + outFileList.push_back(filePath); + outTotalSizeInBytes += fileInfo.size(); + + const int updateStatusEvery = 64; + if (outFileList.size() % updateStatusEvery == 0) + { + statusCallback(outFileList.size(), outTotalSizeInBytes); + } + } + } + } + + static bool CopyDirectory(QProgressDialog* progressDialog, + const QString& origPath, + const QString& newPath, + QStringList& filesToCopy, + int& outNumCopiedFiles, + qint64 totalSizeToCopy, + qint64& outCopiedFileSize, + bool& showIgnoreFileDialog) { QDir original(origPath); if (!original.exists()) @@ -65,19 +102,91 @@ namespace O3DE::ProjectManager for (QString directory : original.entryList(QDir::Dirs | QDir::NoDotAndDotDot)) { + if (progressDialog->wasCanceled()) + { + return false; + } + QString newDirectoryPath = newPath + QDir::separator() + directory; original.mkpath(newDirectoryPath); - if (!CopyDirectory(origPath + QDir::separator() + directory, newDirectoryPath)) + if (!CopyDirectory(progressDialog, origPath + QDir::separator() + directory, + newDirectoryPath, filesToCopy, outNumCopiedFiles, totalSizeToCopy, outCopiedFileSize, showIgnoreFileDialog)) { return false; } } + QLocale locale; + const float progressDialogRangeHalf = qFabs(progressDialog->maximum() - progressDialog->minimum()) * 0.5f; for (QString file : original.entryList(QDir::Files)) { - if (!QFile::copy(origPath + QDir::separator() + file, newPath + QDir::separator() + file)) + if (progressDialog->wasCanceled()) + { return false; + } + + // Progress window update + { + // Weight in the number of already copied files as well as the copied bytes to get a better progress indication + // for cases combining many small files and some really large files. + const float normalizedNumFiles = static_cast(outNumCopiedFiles) / filesToCopy.count(); + const float normalizedFileSize = static_cast(outCopiedFileSize) / totalSizeToCopy; + const int progress = normalizedNumFiles * progressDialogRangeHalf + normalizedFileSize * progressDialogRangeHalf; + progressDialog->setValue(progress); + + const QString copiedFileSizeString = locale.formattedDataSize(outCopiedFileSize); + const QString totalFileSizeString = locale.formattedDataSize(totalSizeToCopy); + progressDialog->setLabelText(QString("Coping file %1 of %2 (%3 of %4) ...").arg(QString::number(outNumCopiedFiles), + QString::number(filesToCopy.count()), + copiedFileSizeString, + totalFileSizeString)); + qApp->processEvents(QEventLoop::ExcludeUserInputEvents); + } + + const QString toBeCopiedFilePath = origPath + QDir::separator() + file; + const QString copyToFilePath = newPath + QDir::separator() + file; + if (!QFile::copy(toBeCopiedFilePath, copyToFilePath)) + { + // Let the user decide to ignore files that failed to copy or cancel the whole operation. + if (showIgnoreFileDialog) + { + QMessageBox ignoreFileMessageBox; + const QString text = QString("Cannot copy %1.

" + "Source: %2
" + "Destination: %3

" + "Press Yes to ignore the file, YesToAll to ignore all upcoming non-copyable files or " + "Cancel to abort duplicating the project.").arg(file, toBeCopiedFilePath, copyToFilePath); + + ignoreFileMessageBox.setModal(true); + ignoreFileMessageBox.setWindowTitle("Cannot copy file"); + ignoreFileMessageBox.setText(text); + ignoreFileMessageBox.setIcon(QMessageBox::Question); + ignoreFileMessageBox.setStandardButtons(QMessageBox::YesToAll | QMessageBox::Yes | QMessageBox::Cancel); + + int ignoreFile = ignoreFileMessageBox.exec(); + if (ignoreFile == QMessageBox::YesToAll) + { + showIgnoreFileDialog = false; + continue; + } + else if (ignoreFile == QMessageBox::Yes) + { + continue; + } + else + { + return false; + } + } + } + else + { + outNumCopiedFiles++; + + QFileInfo fileInfo(toBeCopiedFilePath); + outCopiedFileSize += fileInfo.size(); + } } return true; @@ -119,16 +228,13 @@ namespace O3DE::ProjectManager return false; } - QGuiApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); - copyResult = CopyProject(origPath, newPath); - QGuiApplication::restoreOverrideCursor(); - + copyResult = CopyProject(origPath, newPath, parent); } return copyResult; } - bool CopyProject(const QString& origPath, const QString& newPath) + bool CopyProject(const QString& origPath, const QString& newPath, QWidget* parent) { // Disallow copying from or into subdirectory if (IsDirectoryDescedent(origPath, newPath) || IsDirectoryDescedent(newPath, origPath)) @@ -136,19 +242,54 @@ namespace O3DE::ProjectManager return false; } - if (!CopyDirectory(origPath, newPath)) + QStringList filesToCopy; + qint64 totalSizeInBytes = 0; + + QProgressDialog* progressDialog = new QProgressDialog(parent); + progressDialog->setAutoClose(true); + progressDialog->setValue(0); + progressDialog->setRange(0, 1000); + progressDialog->setModal(true); + progressDialog->setWindowTitle(QObject::tr("Copying project ...")); + progressDialog->show(); + + QLocale locale; + RecursiveGetAllFiles(origPath, filesToCopy, totalSizeInBytes, [=](int fileCount, int sizeInBytes) + { + // Create a human-readable version of the file size. + const QString fileSizeString = locale.formattedDataSize(sizeInBytes); + + progressDialog->setLabelText(QString("%1 ... %2 %3, %4 %5.") + .arg(QObject::tr("Indexing files")) + .arg(QString::number(fileCount)) + .arg(QObject::tr("files found")) + .arg(fileSizeString) + .arg(QObject::tr("to copy"))); + qApp->processEvents(QEventLoop::ExcludeUserInputEvents); + }); + + int numFilesCopied = 0; + qint64 copiedFileSize = 0; + + // Phase 1: Copy files + bool showIgnoreFileDialog = true; + bool success = CopyDirectory(progressDialog, origPath, newPath, filesToCopy, numFilesCopied, totalSizeInBytes, copiedFileSize, showIgnoreFileDialog); + if (success) { - // Cleanup whatever mess was made - DeleteProjectFiles(newPath, true); - return false; + // Phase 2: Register project + success = RegisterProject(newPath); } - if (!RegisterProject(newPath)) + if (!success) { + progressDialog->setLabelText(QObject::tr("Duplicating project failed/cancelled, removing already copied files ...")); + qApp->processEvents(QEventLoop::ExcludeUserInputEvents); + DeleteProjectFiles(newPath, true); } - return true; + progressDialog->deleteLater(); + return success; } bool DeleteProjectFiles(const QString& path, bool force) @@ -184,7 +325,7 @@ namespace O3DE::ProjectManager if (!newDirectory.rename(origPath, newPath)) { // Likely failed because trying to move to another partition, try copying - if (!CopyProject(origPath, newPath)) + if (!CopyProject(origPath, newPath, parent)) { return false; } @@ -272,7 +413,6 @@ namespace O3DE::ProjectManager bool IsVS2019Installed() { static bool vs2019Installed = IsVS2019Installed_internal(); - return vs2019Installed; } diff --git a/Code/Tools/ProjectManager/Source/ProjectUtils.h b/Code/Tools/ProjectManager/Source/ProjectUtils.h index 786ff34b88..2829a45180 100644 --- a/Code/Tools/ProjectManager/Source/ProjectUtils.h +++ b/Code/Tools/ProjectManager/Source/ProjectUtils.h @@ -17,7 +17,7 @@ namespace O3DE::ProjectManager bool RegisterProject(const QString& path); bool UnregisterProject(const QString& path); bool CopyProjectDialog(const QString& origPath, QWidget* parent = nullptr); - bool CopyProject(const QString& origPath, const QString& newPath); + bool CopyProject(const QString& origPath, const QString& newPath, QWidget* parent); bool DeleteProjectFiles(const QString& path, bool force = false); bool MoveProject(QString origPath, QString newPath, QWidget* parent = nullptr, bool ignoreRegister = false); diff --git a/Code/Tools/ProjectManager/Source/PythonBindings.cpp b/Code/Tools/ProjectManager/Source/PythonBindings.cpp index 167cf6d10e..f8e90b0a59 100644 --- a/Code/Tools/ProjectManager/Source/PythonBindings.cpp +++ b/Code/Tools/ProjectManager/Source/PythonBindings.cpp @@ -394,13 +394,20 @@ namespace O3DE::ProjectManager if (pybind11::isinstance(o3deData)) { engineInfo.m_path = Py_To_String(enginePath); - engineInfo.m_defaultGemsFolder = Py_To_String(o3deData["default_gems_folder"]); - engineInfo.m_defaultProjectsFolder = Py_To_String(o3deData["default_projects_folder"]); - engineInfo.m_defaultRestrictedFolder = Py_To_String(o3deData["default_restricted_folder"]); - engineInfo.m_defaultTemplatesFolder = Py_To_String(o3deData["default_templates_folder"]); + auto defaultGemsFolder = m_manifest.attr("get_o3de_gems_folder")(); + engineInfo.m_defaultGemsFolder = Py_To_String_Optional(o3deData, "default_gems_folder", Py_To_String(defaultGemsFolder)); + + auto defaultProjectsFolder = m_manifest.attr("get_o3de_projects_folder")(); + engineInfo.m_defaultProjectsFolder = Py_To_String_Optional(o3deData, "default_projects_folder", Py_To_String(defaultProjectsFolder)); + + auto defaultRestrictedFolder = m_manifest.attr("get_o3de_restricted_folder")(); + engineInfo.m_defaultRestrictedFolder = Py_To_String_Optional(o3deData, "default_restricted_folder", Py_To_String(defaultRestrictedFolder)); + + auto defaultTemplatesFolder = m_manifest.attr("get_o3de_templates_folder")(); + engineInfo.m_defaultTemplatesFolder = Py_To_String_Optional(o3deData, "default_templates_folder", Py_To_String(defaultTemplatesFolder)); auto defaultThirdPartyFolder = m_manifest.attr("get_o3de_third_party_folder")(); - engineInfo.m_thirdPartyPath = Py_To_String_Optional(o3deData,"default_third_party_folder", Py_To_String(defaultThirdPartyFolder)); + engineInfo.m_thirdPartyPath = Py_To_String_Optional(o3deData, "default_third_party_folder", Py_To_String(defaultThirdPartyFolder)); } auto engineData = m_manifest.attr("get_engine_json_data")(pybind11::none(), enginePath); diff --git a/Code/Tools/ProjectManager/Source/TemplateButtonWidget.cpp b/Code/Tools/ProjectManager/Source/TemplateButtonWidget.cpp index d20b91ac8e..638b821e5d 100644 --- a/Code/Tools/ProjectManager/Source/TemplateButtonWidget.cpp +++ b/Code/Tools/ProjectManager/Source/TemplateButtonWidget.cpp @@ -6,6 +6,7 @@ */ #include +#include #include #include @@ -16,7 +17,6 @@ namespace O3DE::ProjectManager { - TemplateButton::TemplateButton(const QString& imagePath, const QString& labelText, QWidget* parent) : QPushButton(parent) { @@ -31,8 +31,8 @@ namespace O3DE::ProjectManager QLabel* image = new QLabel(this); image->setObjectName("templateImage"); - image->setPixmap( - QPixmap(imagePath).scaled(QSize(s_templateImageWidth,s_templateImageHeight) , Qt::KeepAspectRatio, Qt::SmoothTransformation)); + image->setPixmap(QPixmap(imagePath).scaled( + QSize(ProjectTemplateImageWidth, ProjectTemplateImageWidth), Qt::KeepAspectRatio, Qt::SmoothTransformation)); vLayout->addWidget(image); QLabel* label = new QLabel(labelText, this); diff --git a/Code/Tools/ProjectManager/Source/TemplateButtonWidget.h b/Code/Tools/ProjectManager/Source/TemplateButtonWidget.h index 2b2b3474c2..0607b8fbfe 100644 --- a/Code/Tools/ProjectManager/Source/TemplateButtonWidget.h +++ b/Code/Tools/ProjectManager/Source/TemplateButtonWidget.h @@ -24,9 +24,5 @@ namespace O3DE::ProjectManager protected slots: void onToggled(); - - private: - inline constexpr static int s_templateImageWidth = 92; - inline constexpr static int s_templateImageHeight = 122; }; } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/project_manager_files.cmake b/Code/Tools/ProjectManager/project_manager_files.cmake index a5632f082c..07c649624e 100644 --- a/Code/Tools/ProjectManager/project_manager_files.cmake +++ b/Code/Tools/ProjectManager/project_manager_files.cmake @@ -71,6 +71,8 @@ set(FILES Source/GemCatalog/GemCatalogHeaderWidget.cpp Source/GemCatalog/GemCatalogScreen.h Source/GemCatalog/GemCatalogScreen.cpp + Source/GemCatalog/GemFilterTagWidget.h + Source/GemCatalog/GemFilterTagWidget.cpp Source/GemCatalog/GemFilterWidget.h Source/GemCatalog/GemFilterWidget.cpp Source/GemCatalog/GemInfo.h diff --git a/Code/Tools/TestImpactFramework/Runtime/Code/Source/Dependency/TestImpactDynamicDependencyMap.cpp b/Code/Tools/TestImpactFramework/Runtime/Code/Source/Dependency/TestImpactDynamicDependencyMap.cpp index 9959ccf5cd..28f8d9bb4e 100644 --- a/Code/Tools/TestImpactFramework/Runtime/Code/Source/Dependency/TestImpactDynamicDependencyMap.cpp +++ b/Code/Tools/TestImpactFramework/Runtime/Code/Source/Dependency/TestImpactDynamicDependencyMap.cpp @@ -346,7 +346,8 @@ namespace TestImpact return orphans; } - ChangeDependencyList DynamicDependencyMap::ApplyAndResoveChangeList(const ChangeList& changeList) + ChangeDependencyList DynamicDependencyMap::ApplyAndResoveChangeList( + const ChangeList& changeList, Policy::IntegrityFailure integrityFailurePolicy) { AZStd::vector createDependencies; AZStd::vector updateDependencies; @@ -364,11 +365,15 @@ namespace TestImpact { if (sourceDependency->GetNumCoveringTestTargets()) { - const AZStd::string msg = AZStd::string::format("The newly-created file %s belongs to a build target yet " + const AZStd::string msg = AZStd::string::format("The newly-created file '%s' belongs to a build target yet " "still has coverage data in the source covering test list implying that a delete CRUD operation has been " - "missed, thus the integrity of the source covering test list has been compromised", createdFile.c_str()); + "missed, thus the integrity of the source covering test list has been compromised.", createdFile.c_str()); AZ_Error("File Creation", false, msg.c_str()); - throw DependencyException(msg); + + if (integrityFailurePolicy == Policy::IntegrityFailure::Abort) + { + throw DependencyException(msg); + } } if (sourceDependency->GetNumParentTargets()) @@ -418,18 +423,26 @@ namespace TestImpact { if (sourceDependency->GetNumCoveringTestTargets()) { - const AZStd::string msg = AZStd::string::format("The deleted file %s still belongs to a build target and still " + const AZStd::string msg = AZStd::string::format("The deleted file '%s' still belongs to a build target and still " "has coverage data in the source covering test list, implying that the integrity of both the source to target " - "mappings and the source covering test list has been compromised", deletedFile.c_str()); + "mappings and the source covering test list has been compromised.", deletedFile.c_str()); AZ_Error("File Delete", false, msg.c_str()); - throw DependencyException(msg); + + if (integrityFailurePolicy == Policy::IntegrityFailure::Abort) + { + throw DependencyException(msg); + } } else { - const AZStd::string msg = AZStd::string::format("The deleted file %s still belongs to a build target implying " - "that the integrity of the source to target mappings has been compromised", deletedFile.c_str()); + const AZStd::string msg = AZStd::string::format("The deleted file '%s' still belongs to a build target implying " + "that the integrity of the source to target mappings has been compromised.", deletedFile.c_str()); AZ_Error("File Delete", false, msg.c_str()); - throw DependencyException(msg); + + if (integrityFailurePolicy == Policy::IntegrityFailure::Abort) + { + throw DependencyException(msg); + } } } else diff --git a/Code/Tools/TestImpactFramework/Runtime/Code/Source/Dependency/TestImpactDynamicDependencyMap.h b/Code/Tools/TestImpactFramework/Runtime/Code/Source/Dependency/TestImpactDynamicDependencyMap.h index 35f90930f8..d021851c25 100644 --- a/Code/Tools/TestImpactFramework/Runtime/Code/Source/Dependency/TestImpactDynamicDependencyMap.h +++ b/Code/Tools/TestImpactFramework/Runtime/Code/Source/Dependency/TestImpactDynamicDependencyMap.h @@ -8,6 +8,7 @@ #pragma once #include +#include #include #include @@ -91,8 +92,10 @@ namespace TestImpact //! Applies the specified change list to the dependency map and resolves the change list to a change dependency list //! containing the updated source dependencies for each source file in the change list. //! @param changeList The change list to apply and resolve. + //! @param integrityFailurePolicy The policy to use for handling integrity errors in the source dependency map. //! @returns The change list as resolved to the appropriate source dependencies. - [[nodiscard]] ChangeDependencyList ApplyAndResoveChangeList(const ChangeList& changeList); + [[nodiscard]] ChangeDependencyList ApplyAndResoveChangeList( + const ChangeList& changeList, Policy::IntegrityFailure integrityFailurePolicy); //! Removes the specified test target from all source coverage. void RemoveTestTargetFromSourceCoverage(const TestTarget* testTarget); diff --git a/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestImpactRuntime.cpp b/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestImpactRuntime.cpp index af6f02fa20..e325463324 100644 --- a/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestImpactRuntime.cpp +++ b/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestImpactRuntime.cpp @@ -205,7 +205,7 @@ namespace TestImpact AZStd::vector discardedTestTargets; // Select and prioritize the test targets pertinent to this change list - const auto changeDependencyList = m_dynamicDependencyMap->ApplyAndResoveChangeList(changeList); + const auto changeDependencyList = m_dynamicDependencyMap->ApplyAndResoveChangeList(changeList, m_integrationFailurePolicy); const auto selectedTestTargets = m_testSelectorAndPrioritizer->SelectTestTargets(changeDependencyList, testPrioritizationPolicy); // Populate a set with the selected test targets so that we can infer the discarded test target not selected for this change list diff --git a/Gems/AWSClientAuth/Code/Source/AWSClientAuthSystemComponent.cpp b/Gems/AWSClientAuth/Code/Source/AWSClientAuthSystemComponent.cpp index c8c16cd26f..a6ba5812a1 100644 --- a/Gems/AWSClientAuth/Code/Source/AWSClientAuthSystemComponent.cpp +++ b/Gems/AWSClientAuth/Code/Source/AWSClientAuthSystemComponent.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -163,7 +164,11 @@ namespace AWSClientAuth void AWSClientAuthSystemComponent::OnSDKInitialized() { - Aws::Client::ClientConfiguration clientConfiguration; + AWSCore::AwsApiJobConfig* defaultConfig; + AWSCore::AWSCoreRequestBus::BroadcastResult(defaultConfig, &AWSCore::AWSCoreRequests::GetDefaultConfig); + Aws::Client::ClientConfiguration clientConfiguration = + defaultConfig ? defaultConfig->GetClientConfiguration() : Aws::Client::ClientConfiguration(); + AZStd::string region; AWSCore::AWSResourceMappingRequestBus::BroadcastResult(region, &AWSCore::AWSResourceMappingRequests::GetDefaultRegion); diff --git a/Gems/AWSClientAuth/Code/Tests/AWSClientAuthGemMock.h b/Gems/AWSClientAuth/Code/Tests/AWSClientAuthGemMock.h index cf6364fa00..dc9a84bc0a 100644 --- a/Gems/AWSClientAuth/Code/Tests/AWSClientAuthGemMock.h +++ b/Gems/AWSClientAuth/Code/Tests/AWSClientAuthGemMock.h @@ -113,6 +113,27 @@ namespace AWSClientAuthUnitTest MOCK_METHOD1(ReloadConfigFile, void(bool isReloadingConfigFileName)); }; + class AWSCoreRequestBusMock + : public AWSCore::AWSCoreRequestBus::Handler + { + public: + AWSCoreRequestBusMock() + { + AWSCore::AWSCoreRequestBus::Handler::BusConnect(); + + ON_CALL(*this, GetDefaultJobContext).WillByDefault(testing::Return(nullptr)); + ON_CALL(*this, GetDefaultConfig).WillByDefault(testing::Return(nullptr)); + } + + ~AWSCoreRequestBusMock() + { + AWSCore::AWSCoreRequestBus::Handler::BusDisconnect(); + } + + MOCK_METHOD0(GetDefaultJobContext, AZ::JobContext*()); + MOCK_METHOD0(GetDefaultConfig, AWSCore::AwsApiJobConfig*()); + }; + class HttpRequestorRequestBusMock : public HttpRequestor::HttpRequestorRequestBus::Handler { diff --git a/Gems/AWSClientAuth/Code/Tests/AWSClientAuthSystemComponentTest.cpp b/Gems/AWSClientAuth/Code/Tests/AWSClientAuthSystemComponentTest.cpp index 7a5ddc1f61..1b4fe3b3a1 100644 --- a/Gems/AWSClientAuth/Code/Tests/AWSClientAuthSystemComponentTest.cpp +++ b/Gems/AWSClientAuth/Code/Tests/AWSClientAuthSystemComponentTest.cpp @@ -161,6 +161,7 @@ public: testing::NiceMock *m_awsClientAuthSystemsComponent; testing::NiceMock *m_awsCoreSystemsComponent; testing::NiceMock m_awsResourceMappingRequestBusMock; + testing::NiceMock m_awsCoreRequestBusMock; AZ::Entity* m_entity = nullptr; }; @@ -176,6 +177,7 @@ TEST_F(AWSClientAuthSystemComponentTest, ActivateDeactivate_Success) EXPECT_CALL(*m_awsCoreSystemsComponent, Init()).Times(1).InSequence(s1); EXPECT_CALL(*m_awsClientAuthSystemsComponent, Init()).Times(1).InSequence(s1); EXPECT_CALL(*m_awsCoreSystemsComponent, Activate()).Times(1).InSequence(s1); + EXPECT_CALL(m_awsCoreRequestBusMock, GetDefaultConfig()).Times(1).InSequence(s1); EXPECT_CALL(m_awsResourceMappingRequestBusMock, GetDefaultRegion()).Times(1).InSequence(s1); EXPECT_CALL(*m_awsClientAuthSystemsComponent, Activate()).Times(1).InSequence(s1); diff --git a/Gems/AWSCore/Assets/Certificates/AWS/cacert.pem b/Gems/AWSCore/Assets/Certificates/AWS/cacert.pem new file mode 100644 index 0000000000..cb8f3ada5c --- /dev/null +++ b/Gems/AWSCore/Assets/Certificates/AWS/cacert.pem @@ -0,0 +1,4043 @@ +## +## Bundle of CA Root Certificates +## +## Certificate data from Mozilla as of: Wed Jan 18 04:12:05 2017 GMT +## +## This is a bundle of X.509 certificates of public Certificate Authorities +## (CA). These were automatically extracted from Mozilla's root certificates +## file (certdata.txt). This file can be found in the mozilla source tree: +## https://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt +## +## It contains the certificates in PEM format and therefore +## can be directly used with curl / libcurl / php_curl, or with +## an Apache+mod_ssl webserver for SSL client authentication. +## Just configure this file as the SSLCACertificateFile. +## +## Conversion done with mk-ca-bundle.pl version 1.27. +## SHA256: dffa79e6aa993f558e82884abf7bb54bf440ab66ee91d82a27a627f6f2a4ace4 +## + + +GlobalSign Root CA +================== +-----BEGIN CERTIFICATE----- +MIIDdTCCAl2gAwIBAgILBAAAAAABFUtaw5QwDQYJKoZIhvcNAQEFBQAwVzELMAkGA1UEBhMCQkUx +GTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jvb3QgQ0ExGzAZBgNVBAMTEkds +b2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAwMDBaFw0yODAxMjgxMjAwMDBaMFcxCzAJBgNV +BAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYD +VQQDExJHbG9iYWxTaWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDa +DuaZjc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavpxy0Sy6sc +THAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp1Wrjsok6Vjk4bwY8iGlb +Kk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdGsnUOhugZitVtbNV4FpWi6cgKOOvyJBNP +c1STE4U6G7weNLWLBYy5d4ux2x8gkasJU26Qzns3dLlwR5EiUWMWea6xrkEmCMgZK9FGqkjWZCrX +gzT/LCrBbBlDSgeF59N89iFo7+ryUp9/k5DPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNV +HRMBAf8EBTADAQH/MB0GA1UdDgQWBBRge2YaRQ2XyolQL30EzTSo//z9SzANBgkqhkiG9w0BAQUF +AAOCAQEA1nPnfE920I2/7LqivjTFKDK1fPxsnCwrvQmeU79rXqoRSLblCKOzyj1hTdNGCbM+w6Dj +Y1Ub8rrvrTnhQ7k4o+YviiY776BQVvnGCv04zcQLcFGUl5gE38NflNUVyRRBnMRddWQVDf9VMOyG +j/8N7yy5Y0b2qvzfvGn9LhJIZJrglfCm7ymPAbEVtQwdpf5pLGkkeB6zpxxxYu7KyJesF12KwvhH +hm4qxFYxldBniYUr+WymXUadDKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveC +X4XSQRjbgbMEHMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A== +-----END CERTIFICATE----- + +GlobalSign Root CA - R2 +======================= +-----BEGIN CERTIFICATE----- +MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4GA1UECxMXR2xv +YmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkdsb2Jh +bFNpZ24wHhcNMDYxMjE1MDgwMDAwWhcNMjExMjE1MDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxT +aWduIFJvb3QgQ0EgLSBSMjETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2ln +bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKbPJA6+Lm8omUVCxKs+IVSbC9N/hHD6 +ErPLv4dfxn+G07IwXNb9rfF73OX4YJYJkhD10FPe+3t+c4isUoh7SqbKSaZeqKeMWhG8eoLrvozp +s6yWJQeXSpkqBy+0Hne/ig+1AnwblrjFuTosvNYSuetZfeLQBoZfXklqtTleiDTsvHgMCJiEbKjN +S7SgfQx5TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzdC9XZzPnqJworc5HGnRusyMvo4KD0L5CL +TfuwNhv2GXqF4G3yYROIXJ/gkwpRl4pazq+r1feqCapgvdzZX99yqWATXgAByUr6P6TqBwMhAo6C +ygPCm48CAwEAAaOBnDCBmTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4E +FgQUm+IHV2ccHsBqBt5ZtJot39wZhi4wNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL2NybC5nbG9i +YWxzaWduLm5ldC9yb290LXIyLmNybDAfBgNVHSMEGDAWgBSb4gdXZxwewGoG3lm0mi3f3BmGLjAN +BgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4GsJ0/WwbgcQ3izDJr86iw8bmEbTUsp +9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4h4hO291xNBrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu +01yiPqFbQfXf5WRDLenVOavSot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG7 +9G+dwfCMNYxdAfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmgQWpzU/qlULRuJQ/7 +TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg== +-----END CERTIFICATE----- + +Verisign Class 3 Public Primary Certification Authority - G3 +============================================================ +-----BEGIN CERTIFICATE----- +MIIE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AQEA +ERSWwauSCPc/L8my/uRan2Te2yFPhpk0djZX3dAVL8WtfxUfN2JzPtTnX84XA9s1+ivbrmAJXx5f +j267Cz3qWhMeDGBvtcC1IyIuBwvLqXTLR7sdwdela8wv0kL9Sd2nic9TutoAWii/gt/4uhMdUIaC +/Y4wjylGsB49Ndo4YhYYSq3mtlFs3q9i6wHQHiT+eo8SGhJouPtmmRQURVyu565pF4ErWjfJXir0 +xuKhXFSbplQAz/DxwceYMBo7Nhbbo27q/a2ywtrvAkcTisDxszGtTxzhT5yvDwyd93gN2PQ1VoDa +t20Xj50egWTh/sVFuq1ruQp6Tk9LhO5L8X3dEQ== +-----END CERTIFICATE----- + +Entrust.net Premium 2048 Secure Server CA +========================================= +-----BEGIN CERTIFICATE----- +MIIEKjCCAxKgAwIBAgIEOGPe+DANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChMLRW50cnVzdC5u +ZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9DUFNfMjA0OCBpbmNvcnAuIGJ5IHJlZi4gKGxp +bWl0cyBsaWFiLikxJTAjBgNVBAsTHChjKSAxOTk5IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNV +BAMTKkVudHJ1c3QubmV0IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ICgyMDQ4KTAeFw05OTEyMjQx +NzUwNTFaFw0yOTA3MjQxNDE1MTJaMIG0MRQwEgYDVQQKEwtFbnRydXN0Lm5ldDFAMD4GA1UECxQ3 +d3d3LmVudHJ1c3QubmV0L0NQU18yMDQ4IGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxpYWIuKTEl +MCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEGA1UEAxMqRW50cnVzdC5u +ZXQgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgKDIwNDgpMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A +MIIBCgKCAQEArU1LqRKGsuqjIAcVFmQqK0vRvwtKTY7tgHalZ7d4QMBzQshowNtTK91euHaYNZOL +Gp18EzoOH1u3Hs/lJBQesYGpjX24zGtLA/ECDNyrpUAkAH90lKGdCCmziAv1h3edVc3kw37XamSr +hRSGlVuXMlBvPci6Zgzj/L24ScF2iUkZ/cCovYmjZy/Gn7xxGWC4LeksyZB2ZnuU4q941mVTXTzW +nLLPKQP5L6RQstRIzgUyVYr9smRMDuSYB3Xbf9+5CFVghTAp+XtIpGmG4zU/HoZdenoVve8AjhUi +VBcAkCaTvA5JaJG/+EfTnZVCwQ5N328mz8MYIWJmQ3DW1cAH4QIDAQABo0IwQDAOBgNVHQ8BAf8E +BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUVeSB0RGAvtiJuQijMfmhJAkWuXAwDQYJ +KoZIhvcNAQEFBQADggEBADubj1abMOdTmXx6eadNl9cZlZD7Bh/KM3xGY4+WZiT6QBshJ8rmcnPy +T/4xmf3IDExoU8aAghOY+rat2l098c5u9hURlIIM7j+VrxGrD9cv3h8Dj1csHsm7mhpElesYT6Yf +zX1XEC+bBAlahLVu2B064dae0Wx5XnkcFMXj0EyTO2U87d89vqbllRrDtRnDvV5bu/8j72gZyxKT +J1wDLW8w0B62GqzeWvfRqqgnpv55gcR5mTNXuhKwqeBCbJPKVt7+bYQLCIt+jerXmCHG8+c8eS9e +nNFMFY3h7CI3zJpDC5fcgJCNs2ebb0gIFVbPv/ErfF6adulZkMV8gzURZVE= +-----END CERTIFICATE----- + +Baltimore CyberTrust Root +========================= +-----BEGIN CERTIFICATE----- +MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJRTESMBAGA1UE +ChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYDVQQDExlCYWx0aW1vcmUgQ3li +ZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoXDTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMC +SUUxEjAQBgNVBAoTCUJhbHRpbW9yZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFs +dGltb3JlIEN5YmVyVHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKME +uyKrmD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjrIZ3AQSsB +UnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeKmpYcqWe4PwzV9/lSEy/C +G9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSuXmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9 +XbIGevOF6uvUA65ehD5f/xXtabz5OTZydc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjpr +l3RjM71oGDHweI12v/yejl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoI +VDaGezq1BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEB +BQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT929hkTI7gQCvlYpNRh +cL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3WgxjkzSswF07r51XgdIGn9w/xZchMB5 +hbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsa +Y71k5h+3zvDyny67G7fyUIhzksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9H +RCwBXbsdtTLSR9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp +-----END CERTIFICATE----- + +AddTrust Low-Value Services Root +================================ +-----BEGIN CERTIFICATE----- +MIIEGDCCAwCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBlMQswCQ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6X7f1yFqZzR1r0693p9db7RcwpiURdv0Y5PejuvE1Uhh4dbOMXJ0Ph +iVYrqW9yTkkz43J8KiOavD7/KCrto/8cI7pDVwlnTUtiBi34/2ydYB7YHEt9tTEv2dB8Xfjea4MY +eDdXL+gzB2ffHsdrKpV2ro9Xo/D0UrSpUwjP4E/TelOL/bscVjby/rK25Xa71SJlpz/+0WatC7xr +mYbvP33zGDLKe8bjq2RGlfgmadlVg3sslgf/WSxEo8bl6ancoWOAWiFeIc9TVPC6b4nbqKqVz4vj +ccweGyBECMB6tkD9xOQ14R0WHNC8K47Wcdk= +-----END CERTIFICATE----- + +AddTrust External Root +====================== +-----BEGIN CERTIFICATE----- +MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEUMBIGA1UEChML +QWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFsIFRUUCBOZXR3b3JrMSIwIAYD +VQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEw +NDgzOFowbzELMAkGA1UEBhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRU +cnVzdCBFeHRlcm5hbCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0Eg +Um9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALf3GjPm8gAELTngTlvtH7xsD821 ++iO2zt6bETOXpClMfZOfvUq8k+0DGuOPz+VtUFrWlymUWoCwSXrbLpX9uMq/NzgtHj6RQa1wVsfw +Tz/oMp50ysiQVOnGXw94nZpAPA6sYapeFI+eh6FqUNzXmk6vBbOmcZSccbNQYArHE504B4YCqOmo +aSYYkKtMsE8jqzpPhNjfzp/haW+710LXa0Tkx63ubUFfclpxCDezeWWkWaCUN/cALw3CknLa0Dhy +2xSoRcRdKn23tNbE7qzNE0S3ySvdQwAl+mG5aWpYIxG3pzOPVnVZ9c0p10a3CitlttNCbxWyuHv7 +7+ldU9U0WicCAwEAAaOB3DCB2TAdBgNVHQ4EFgQUrb2YejS0Jvf6xCZU7wO94CTLVBowCwYDVR0P +BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wgZkGA1UdIwSBkTCBjoAUrb2YejS0Jvf6xCZU7wO94CTL +VBqhc6RxMG8xCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRUcnVzdCBBQjEmMCQGA1UECxMdQWRk +VHJ1c3QgRXh0ZXJuYWwgVFRQIE5ldHdvcmsxIjAgBgNVBAMTGUFkZFRydXN0IEV4dGVybmFsIENB +IFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBALCb4IUlwtYj4g+WBpKdQZic2YR5gdkeWxQHIzZl +j7DYd7usQWxHYINRsPkyPef89iYTx4AWpb9a/IfPeHmJIZriTAcKhjW88t5RxNKWt9x+Tu5w/Rw5 +6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvCNr4TDea9Y355 +e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEXc4g/VhsxOBi0cQ+azcgOno4u +G+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5amnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ= +-----END CERTIFICATE----- + +AddTrust Public Services Root +============================= +-----BEGIN CERTIFICATE----- +MIIEFTCCAv2gAwIBAgIBATANBgkqhkiG9w0BAQUFADBkMQswCQYDVQQGEwJTRTEUMBIGA1UEChML +QWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSAwHgYDVQQDExdBZGRU +cnVzdCBQdWJsaWMgQ0EgUm9vdDAeFw0wMDA1MzAxMDQxNTBaFw0yMDA1MzAxMDQxNTBaMGQxCzAJ +BgNVBAYTAlNFMRQwEgYDVQQ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CtoAlEmEBqCQTcAARJl/6NVDFSMwGR+gn2HCNX2TmoUQmXiLsks3/QppEIW1cxeMiHV9H +EufOX1362KqxMy3ZdvJOOjMMK7MtkAY= +-----END CERTIFICATE----- + +AddTrust Qualified Certificates Root +==================================== +-----BEGIN CERTIFICATE----- +MIIEHjCCAwagAwIBAgIBATANBgkqhkiG9w0BAQUFADBnMQswCQYDVQQGEwJTRTEUMBIGA1UEChML +QWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSMwIQYDVQQDExpBZGRU +cnVzdCBRdWFsaWZpZWQgQ0EgUm9vdDAeFw0wMDA1MzAxMDQ0NTBaFw0yMDA1MzAxMDQ0NTBaMGcx +CzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRUcnVzdCBBQjEdMBsGA1UECxMUQWRkVHJ1c3QgVFRQ +IE5ldHdvcmsxIzAhBgNVBAMTGkFkZFRydXN0IFF1YWxpZmllZCBDQSBSb290MIIBIjANBgkqhkiG +9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5B6a/twJWoekn0e+EV+vhDTbYjx5eLfpMLXsDBwqxBb/4Oxx +64r1EW7tTw2R0hIYLUkVAcKkIhPHEWT/IhKauY5cLwjPcWqzZwFZ8V1G87B4pfYOQnrjfxvM0PC3 +KP0q6p6zsLkEqv32x7SxuCqg+1jxGaBvcCV+PmlKfw8i2O+tCBGaKZnhqkRFmhJePp1tUvznoD1o +L/BLcHwTOK28FSXx1s6rosAx1i+f4P8UWfyEk9mHfExUE+uf0S0R+Bg6Ot4l2ffTQO2kBhLEO+GR +wVY18BTcZTYJbqukB8c10cIDMzZbdSZtQvESa0NvS3GU+jQd7RNuyoB/mC9suWXY6QIDAQABo4HU +MIHRMB0GA1UdDgQWBBQ5lYtii1zJ1IC6WA+XPxUIQ8yYpzALBgNVHQ8EBAMCAQYwDwYDVR0TAQH/ +BAUwAwEB/zCBkQYDVR0jBIGJMIGGgBQ5lYtii1zJ1IC6WA+XPxUIQ8yYp6FrpGkwZzELMAkGA1UE +BhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMR0wGwYDVQQLExRBZGRUcnVzdCBUVFAgTmV0d29y +azEjMCEGA1UEAxMaQWRkVHJ1c3QgUXVhbGlmaWVkIENBIFJvb3SCAQEwDQYJKoZIhvcNAQEFBQAD +ggEBABmrder4i2VhlRO6aQTvhsoToMeqT2QbPxj2qC0sVY8FtzDqQmodwCVRLae/DLPt7wh/bDxG +GuoYQ992zPlmhpwsaPXpF/gxsxjE1kh9I0xowX67ARRvxdlu3rsEQmr49lx95dr6h+sNNVJn0J6X +dgWTP5XHAeZpVTh/EGGZyeNfpso+gmNIquIISD6q8rKFYqa0p9m9N5xotS1WfbC3P6CxB9bpT9ze +RXEwMn8bLgn5v1Kh7sKAPgZcLlVAwRv1cEWw3F369nJad9Jjzc9YiQBCYz95OdBEsIJuQRno3eDB +iFrRHnGTHyQwdOUeqN48Jzd/g66ed8/wMLH/S5noxqE= +-----END CERTIFICATE----- + +Entrust Root Certification Authority +==================================== +-----BEGIN CERTIFICATE----- +MIIEkTCCA3mgAwIBAgIERWtQVDANBgkqhkiG9w0BAQUFADCBsDELMAkGA1UEBhMCVVMxFjAUBgNV +BAoTDUVudHJ1c3QsIEluYy4xOTA3BgNVBAsTMHd3dy5lbnRydXN0Lm5ldC9DUFMgaXMgaW5jb3Jw +b3JhdGVkIGJ5IHJlZmVyZW5jZTEfMB0GA1UECxMWKGMpIDIwMDYgRW50cnVzdCwgSW5jLjEtMCsG +A1UEAxMkRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA2MTEyNzIwMjM0 +MloXDTI2MTEyNzIwNTM0MlowgbAxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMu +MTkwNwYDVQQLEzB3d3cuZW50cnVzdC5uZXQvQ1BTIGlzIGluY29ycG9yYXRlZCBieSByZWZlcmVu +Y2UxHzAdB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tGPPAUO6nIPcj2A781q0 +tHuu2guQOHXvgR1m0vdXcDazv/wor3ElhVsT/h5/WrQ8 +-----END CERTIFICATE----- + +GeoTrust Global CA +================== +-----BEGIN CERTIFICATE----- +MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVTMRYwFAYDVQQK +Ew1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9iYWwgQ0EwHhcNMDIwNTIxMDQw +MDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5j +LjEbMBkGA1UEAxMSR2VvVHJ1c3QgR2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB +CgKCAQEA2swYYzD99BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjo +BbdqfnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDviS2Aelet +8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU1XupGc1V3sjs0l44U+Vc +T4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+bw8HHa8sHo9gOeL6NlMTOdReJivbPagU +vTLrGAMoUgRx5aszPeE4uwc2hGKceeoWMPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTAD +AQH/MB0GA1UdDgQWBBTAephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVk +DBF9qn1luMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKInZ57Q +zxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfStQWVYrmm3ok9Nns4 +d0iXrKYgjy6myQzCsplFAMfOEVEiI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/wQEAwIBhjANBgkqhkiG9w0BAQUFAAOCAQEAA/e1K6tdEPx7 +srJerJsOflN4WT5CBP51o62sgU7XAotexC3IUnbHLB/8gTKY0UvGkpMzNTEv/NgdRN3ggX+d6Yvh +ZJFiCzkIjKx0nVnZellSlxG5FntvRdOW2TF9AjYPnDtuzywNA0ZF66D0f0hExghAzN4bcLUprbqL +OzRldRtxIR0sFAqwlpW41uryZfspuk/qkZN0abby/+Ea0AzRdoXLiiW9l14sbxWZJue2Kf8i7MkC +x1YAzUm5s2x7UwQa4qjJqhIFI8LO57sEAszAR6LkxCkvW0VXiVHuPOtSCP8HNR6fNWpHSlaY0VqF +H4z1Ir+rzoPz4iIprn2DQKi6bA== +-----END CERTIFICATE----- + +GeoTrust Universal CA +===================== +-----BEGIN CERTIFICATE----- +MIIFaDCCA1CgAwIBAgIBATANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQGEwJVUzEWMBQGA1UEChMN +R2VvVHJ1c3QgSW5jLjEeMBwGA1UEAxMVR2VvVHJ1c3QgVW5pdmVyc2FsIENBMB4XDTA0MDMwNDA1 +MDAwMFoXDTI5MDMwNDA1MDAwMFowRTELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IElu +Yy4xHjAcBgNVBAMTFUdlb1RydXN0IFVuaXZlcnNhbCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIP +ADCCAgoCggIBAKYVVaCjxuAfjJ0hUNfBvitbtaSeodlyWL0AG0y/YckUHUWCq8YdgNY96xCcOq9t +JPi8cQGeBvV8Xx7BDlXKg5pZMK4ZyzBIle0iN430SppyZj6tlcDgFgDgEB8rMQ7XlFTTQjOgNB0e +RXbdT8oYN+yFFXoZCPzVx5zw8qkuEKmS5j1YPakWaDwvdSEYfyh3peFhF7em6fgemdtzbvQKoiFs +7tqqhZJmr/Z6a4LauiIINQ/PQvE1+mrufislzDoR5G2vc7J2Ha3QsnhnGqQ5HFELZ1aD/ThdDc7d +8Lsrlh/eezJS/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nmUxwPi1xpZQomyB40w11Re9epnAahNt3ViZS82eQtDF4JbAiXfKM9fJP/P6EU +p8+1Xevb2xzEdt+Iub1FBZUbrvxGakyvSOPOrg/SfuvmbJxPgWp6ZKy7PtXny3YuxadIwVyQD8vI +P/rmMuGNG2+k5o7Y+SlIis5z/iw= +-----END CERTIFICATE----- + +GeoTrust Universal CA 2 +======================= +-----BEGIN CERTIFICATE----- +MIIFbDCCA1SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBHMQswCQYDVQQGEwJVUzEWMBQGA1UEChMN +R2VvVHJ1c3QgSW5jLjEgMB4GA1UEAxMXR2VvVHJ1c3QgVW5pdmVyc2FsIENBIDIwHhcNMDQwMzA0 +MDUwMDAwWhcNMjkwMzA0MDUwMDAwWjBHMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3Qg +SW5jLjEgMB4GA1UEAxMXR2VvVHJ1c3QgVW5pdmVyc2FsIENBIDIwggIiMA0GCSqGSIb3DQEBAQUA +A4ICDwAwggIKAoICAQCzVFLByT7y2dyxUxpZKeexw0Uo5dfR7cXFS6GqdHtXr0om/Nj1XqduGdt0 +DE81WzILAePb63p3NeqqWuDW6KFXlPCQo3RWlEQwAx5cTiuFJnSCegx2oG9NzkEtoBUGFF+3Qs17 +j1hhNNwqCPkuwwGmIkQcTAeC5lvO0Ep8BNMZcyfwqph/Lq9O64ceJHdqXbboW0W63MOhBW9Wjo8Q +JqVJwy7XQYci4E+GymC16qFjwAGXEHm9ADwSbSsVsaxLse4YuU6W3Nx2/zu+z18DwPw76L5GG//a +QMJS9/7jOvdqdzXQ2o3rXhhqMcceujwbKNZrVMaqW9eiLBsZzKIC9ptZvTdrhrVtgrrY6slWvKk2 +WP0+GfPtDCapkzj4T8FdIgbQl+rhrcZV4IErKIM6+vR7IVEAvlI4zs1meaj0gVbi0IMJR1FbUGrP +20gaXT73y/Zl92zxlfgCOzJWgjl6W70viRu/obTo/3+NjN8D8WBOWBFM66M/ECuDmgFz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5fui/fbGKhtcbP3LBfQdCVp9/5rPJS+TUtBjE7ic9DjkCJzQ83z7+pz +zkWKsKZJ/0x9nXGIxHYdkFsd7v3M9+79YKWxehZx0RbQfBI8bGmX265fOZpwLwU8GUYEmSA20GBu +YQa7FkKMcPcw++DbZqMAAb3mLNqRX6BGi01qnD093QVG/na/oAo85ADmJ7f/hC3euiInlhBx6yLt +398znM/jra6O1I7mT1GvFpLgXPYHDw== +-----END CERTIFICATE----- + +Certum Root CA +============== +-----BEGIN CERTIFICATE----- +MIIDDDCCAfSgAwIBAgIDAQAgMA0GCSqGSIb3DQEBBQUAMD4xCzAJBgNVBAYTAlBMMRswGQYDVQQK +ExJVbml6ZXRvIFNwLiB6IG8uby4xEjAQBgNVBAMTCUNlcnR1bSBDQTAeFw0wMjA2MTExMDQ2Mzla +Fw0yNzA2MTExMDQ2MzlaMD4xCzAJBgNVBAYTAlBMMRswGQYDVQQKExJVbml6ZXRvIFNwLiB6IG8u +by4xEjAQBgNVBAMTCUNlcnR1bSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM6x +wS7TT3zNJc4YPk/EjG+AanPIW1H4m9LcuwBcsaD8dQPugfCI7iNS6eYVM42sLQnFdvkrOYCJ5JdL +kKWoePhzQ3ukYbDYWMzhbGZ+nPMJXlVjhNWo7/OxLjBos8Q82KxujZlakE403Daaj4GIULdtlkIJ +89eVgw1BS7Bqa/j8D35in2fE7SZfECYPCE/wpFcozo+47UX2bu4lXapuOb7kky/ZR6By6/qmW6/K +Uz/iDsaWVhFu9+lmqSbYf5VT7QqFiLpPKaVCjF62/IUgAKpoC6EahQGcxEZjgoi2IrHu/qpGWX7P +NSzVttpd90gzFFS269lvzs2I1qsb2pY7HVkCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkq +hkiG9w0BAQUFAAOCAQEAuI3O7+cUus/usESSbLQ5PqKEbq24IXfS1HeCh+YgQYHu4vgRt2PRFze+ +GXYkHAQaTOs9qmdvLdTN/mUxcMUbpgIKumB7bVjCmkn+YzILa+M6wKyrO7Do0wlRjBCDxjTgxSvg +GrZgFCdsMneMvLJymM/NzD+5yCRCFNZX/OYmQ6kd5YCQzgNUKD73P9P4Te1qCjqTE5s7FCMTY5w/ +0YcneeVMUeMBrYVdGjux1XMQpNPyvG5k9VpWkKjHDkx0Dy5xO/fIR/RpbxXyEV6DHpx8Uq79AtoS +qFlnGNu8cN2bsWntgM6JQEhqDjXKKWYVIZQs6GAqm4VKQPNriiTsBhYscw== +-----END CERTIFICATE----- + +Comodo AAA Services root +======================== +-----BEGIN CERTIFICATE----- +MIIEMjCCAxqgAwIBAgIBATANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJHQjEbMBkGA1UECAwS +R3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0Eg +TGltaXRlZDEhMB8GA1UEAwwYQUFBIENlcnRpZmljYXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAw +MFoXDTI4MTIzMTIzNTk1OVowezELMAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hl +c3RlcjEQMA4GA1UEBwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxITAfBgNV +BAMMGEFBQSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC +ggEBAL5AnfRu4ep2hxxNRUSOvkbIgwadwSr+GB+O5AL686tdUIoWMQuaBtDFcCLNSS1UY8y2bmhG +C1Pqy0wkwLxyTurxFa70VJoSCsN6sjNg4tqJVfMiWPPe3M/vg4aijJRPn2jymJBGhCfHdr/jzDUs +i14HZGWCwEiwqJH5YZ92IFCokcdmtet4YgNW8IoaE+oxox6gmf049vYnMlhvB/VruPsUK6+3qszW +Y19zjNoFmag4qMsXeDZRrOme9Hg6jc8P2ULimAyrL58OAd7vn5lJ8S3frHRNG5i1R8XlKdH5kBjH +Ypy+g8cmez6KJcfA3Z3mNWgQIJ2P2N7Sw4ScDV7oL8kCAwEAAaOBwDCBvTAdBgNVHQ4EFgQUoBEK +Iz6W8Qfs4q8p74Klf9AwpLQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wewYDVR0f +BHQwcjA4oDagNIYyaHR0cDovL2NybC5jb21vZG9jYS5jb20vQUFBQ2VydGlmaWNhdGVTZXJ2aWNl +cy5jcmwwNqA0oDKGMGh0dHA6Ly9jcmwuY29tb2RvLm5ldC9BQUFDZXJ0aWZpY2F0ZVNlcnZpY2Vz +LmNybDANBgkqhkiG9w0BAQUFAAOCAQEACFb8AvCb6P+k+tZ7xkSAzk/ExfYAWMymtrwUSWgEdujm +7l3sAg9g1o1QGE8mTgHj5rCl7r+8dFRBv/38ErjHT1r0iWAFf2C3BUrz9vHCv8S5dIa2LX1rzNLz +Rt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2G9w84FoVxp7Z +8VlIMCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsil2D4kF501KKaU73yqWjgom7C +12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg== +-----END CERTIFICATE----- + +Comodo Secure Services root +=========================== +-----BEGIN CERTIFICATE----- +MIIEPzCCAyegAwIBAgIBATANBgkqhkiG9w0BAQUFADB+MQswCQYDVQQGEwJHQjEbMBkGA1UECAwS +R3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0Eg +TGltaXRlZDEkMCIGA1UEAwwbU2VjdXJlIENlcnRpZmljYXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAw +MDAwMFoXDTI4MTIzMTIzNTk1OVowfjELMAkGA1UEBhMCR0IxGzAZ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Ty9IT4rcuO81rUBcJaD61JlfutuC23bkpgHl9j6Pw +pCikFcSF9CfUa7/lXORlAnZUtOM3ZiTTGWHIUhDlizeauan5Hb/qmZJhlv8BzaFfDbxxvA6sCx1H +RR3B7Hzs/Sk= +-----END CERTIFICATE----- + +Comodo Trusted Services root +============================ +-----BEGIN CERTIFICATE----- +MIIEQzCCAyugAwIBAgIBATANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJHQjEbMBkGA1UECAwS +R3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0Eg +TGltaXRlZDElMCMGA1UEAwwcVHJ1c3RlZCBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczAeFw0wNDAxMDEw +MDAwMDBaFw0yODEyMzEyMzU5NTlaMH8xCzAJBgNVBAYTAkdCMRswGQYDVQQIDBJHcmVhdGVyIE1h +bmNoZXN0ZXIxEDAOBgNVBAcMB1NhbGZvcmQxGjAYBgNVBAoMEUNvbW9kbyBDQSBMaW1pdGVkMSUw +IwYDVQQDDBxUcnVzdGVkIENlcnRpZmljYXRlIFNlcnZpY2VzMIIBIjANBgkqhkiG9w0BAQEFAAOC +AQ8AMIIBCgKCAQEA33FvNlhTWvI2VFeAxHQIIO0Yfyod5jWaHiWsnOWWfnJSoBVC21ndZHoa0Lh7 +3TkVvFVIxO06AOoxEbrycXQaZ7jPM8yoMa+j49d/vzMtTGo87IvDktJTdyR0nAducPy9C1t2ul/y +/9c3S0pgePfw+spwtOpZqqPOSC+pw7ILfhdyFgymBwwbOM/JYrc/oJOlh0Hyt3BAd9i+FHzjqMB6 +juljatEPmsbS9Is6FARW1O24zG71++IsWL1/T2sr92AkWCTOJu80kTrV44HQsvAEAtdbtz6SrGsS +ivnkBbA7kUlcsutT6vifR4buv5XAwAaf0lteERv0xwQ1KdJVXOTt6wIDAQABo4HJMIHGMB0GA1Ud +DgQWBBTFe1i97doladL3WRaoszLAeydb9DAO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yBMaW1pdGVkMSUwIwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0 +aG9yaXR5MS4wLAYDVQQDEyVRdW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggQ6 +tlCLMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEAitQUtf70mpKnGdSkfnIYj9lo +fFIk3WdvOXrEql494liwTXCYhGHoG+NpGA7O+0dQoE7/8CQfvbLO9Sf87C9TqnN7Az10buYWnuul +LsS/VidQK2K6vkscPFVcQR0kvoIgR13VRH56FmjffU1RcHhXHTMe/QKZnAzNCgVPx7uOpHX6Sm2x +gI4JVrmcGmD+XcHXetwReNDWXcG31a0ymQM6isxUJTkxgXsTIlG6Rmyhu576BGxJJnSP0nPrzDCi +5upZIof4l/UO/erMkqQWxFIY6iHOsfHmhIHluqmGKPJDWl0Snawe2ajlCmqnf6CHKc/yiU3U7MXi +5nrQNiOKSnQ2+Q== +-----END CERTIFICATE----- + +QuoVadis Root CA 2 +================== +-----BEGIN CERTIFICATE----- +MIIFtzCCA5+gAwIBAgICBQkwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoT +EFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJvb3QgQ0EgMjAeFw0wNjExMjQx +ODI3MDBaFw0zMTExMjQxODIzMzNaMEUxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM +aW1pdGVkMRswGQYDVQQDExJRdW9WYWRpcyBSb290IENBIDIwggIiMA0GCSqGSIb3DQEBAQUAA4IC +DwAwggIKAoICAQCaGMpLlA0ALa8DKYrwD4HIrkwZhR0In6spRIXzL4GtMh6QRr+jhiYaHv5+HBg6 +XJxgFyo6dIMzMH1hVBHL7avg5tKifvVrbxi3Cgst/ek+7wrGsxDp3MJGF/hd/aTa/55JWpzmM+Yk +lvc/ulsrHHo1wtZn/qtmUItt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QjZRG4T7wlP0QADj1O+hA4bRuVhogzG9Yje0uRY/W6ZM/57Es3zrW +IozchLsib9D45MY56QSIPMO661V6bYCZJPVsAfv4l7CUW+v90m/xd2gNNWQjrLhVoQPRTUIZ3Ph1 +WVaj+ahJefivDrkRoHy3au000LYmYjgahwz46P0u05B/B5EqHdZ+XIWDmbA4CD/pXvk1B+TJYm5X +f6dQlfe6yJvmjqIBxdZmv3lh8zwc4bmCXF2gw+nYSL0ZohEUGW6yhhtoPkg3Goi3XZZenMfvJ2II +4pEZXNLxId26F0KCl3GBUzGpn/Z9Yr9y4aOTHcyKJloJONDO1w2AFrR4pTqHTI2KpdVGl/IsELm8 +VCLAAVBpQ570su9t+Oza8eOx79+Rj1QqCyXBJhnEUhAFZdWCEOrCMc0u +-----END CERTIFICATE----- + +QuoVadis Root CA 3 +================== +-----BEGIN CERTIFICATE----- +MIIGnTCCBIWgAwIBAgICBcYwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoT +EFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJvb3QgQ0EgMzAeFw0wNjExMjQx +OTExMjNaFw0zMTExMjQxOTA2NDRaMEUxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM +aW1pdGVkMRswGQYDVQQDExJRdW9WYWRpcyBSb290IENBIDMwggIiMA0GCSqGSIb3DQEBAQUAA4IC +DwAwggIKAoICAQDMV0IWVJzmmNPTTe7+7cefQzlKZbPoFog02w1ZkXTPkrgEQK0CSzGrvI2RaNgg +DhoB4hp7Thdd4oq3P5kazethq8Jlph+3t723j/z9cI8LoGe+AaJZz3HmDyl2/7FWeUUrH556VOij +KTVopAFPD6QuN+8bv+OPEKhyq1hX51SGyMnzW9os2l2ObjyjPtr7guXd8lyyBTNvijbO0BNO/79K +DDRMpsMhvVAEVeuxu537RR5kFd5VAYwCdrXLoT9CabwvvWhDFlaJKjdhkf2mrk7Ayx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Hon24QRiSemd1o417+s +hvzuXYO8BsbRd2sPbSQvS3pspweWyuOEn62Iix2rFo1bZhfZFvSLgNLd+LJ2w/w4E6oM3kJpK27z +POuAJ9v1pkQNn1pVWQvVDVJIxa6f8i+AxeoyUDUSly7B4f/xI4hROJ/yZlZ25w9Rl6VSDE1JUZU2 +Pb+iSwwQHYaZTKrzchGT5Or2m9qoXadNt54CrnMAyNojA+j56hl0YgCUyyIgvpSnWbWCar6ZeXqp +8kokUvd0/bpO5qgdAm6xDYBEwa7TIzdfu4V8K5Iu6H6li92Z4b8nby1dqnuH/grdS/yO9SbkbnBC +bjPsMZ57k8HkyWkaPcBrTiJt7qtYTcbQQcEr6k8Sh17rRdhs9ZgC06DYVYoGmRmioHfRMJ6szHXu +g/WwYjnPbFfiTNKRCw51KBuav/0aQ/HKd/s7j2G4aSgWQgRecCocIdiP4b0jWy10QJLZYxkNc91p +vGJHvOB0K7Lrfb5BG7XARsWhIstfTsEokt4YutUqKLsRixeTmJlglFwjz1onl14LBQaTNx47aTbr +qZ5hHY8y2o4M1nQ+ewkk2gF3R8Q7zTSMmfXK4SVhM7JZG+Ju1zdXtg2pEto= +-----END CERTIFICATE----- + +Security Communication Root CA +============================== +-----BEGIN CERTIFICATE----- +MIIDWjCCAkKgAwIBAgIBADANBgkqhkiG9w0BAQUFADBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP +U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw +HhcNMDMwOTMwMDQyMDQ5WhcNMjMwOTMwMDQyMDQ5WjBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP +U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw +ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCzs/5/022x7xZ8V6UMbXaKL0u/ZPtM7orw +8yl89f/uKuDp6bpbZCKamm8sOiZpUQWZJtzVHGpxxpp9Hp3dfGzGjGdnSj74cbAZJ6kJDKaVv0uM +DPpVmDvY6CKhS3E4eayXkmmziX7qIWgGmBSWh9JhNrxtJ1aeV+7AwFb9Ms+k2Y7CI9eNqPPYJayX +5HA49LY6tJ07lyZDo6G8SVlyTCMwhwFY9k6+HGhWZq/NQV3Is00qVUarH9oe4kA92819uZKAnDfd +DJZkndwi92SL32HeFZRSFaB9UslLqCHJxrHty8OVYNEP8Ktw+N/LTX7s1vqr2b1/VPKl6Xn62dZ2 +JChzAgMBAAGjPzA9MB0GA1UdDgQWBBSgc0mZaNyFW2XjmygvV5+9M7wHSDALBgNVHQ8EBAMCAQYw +DwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAaECpqLvkT115swW1F7NgE+vGkl3g +0dNq/vu+m22/xwVtWSDEHPC32oRYAmP6SBbvT6UL90qY8j+eG61Ha2POCEfrUj94nK9NrvjVT8+a +mCoQQTlSxN3Zmw7vkwGusi7KaEIkQmywszo+zenaSMQVy+n5Bw+SUEmK3TGXX8npN6o7WWWXlDLJ +s58+OmJYxUmtYg5xpTKqL8aJdkNAExNnPaJUJRDL8Try2frbSVa7pv6nQTXD4IhhyYjH3zYQIphZ +6rBK+1YWc26sTfcioU+tHXotRSflMMFe8toTyyVCUZVHA4xsIcx0Qu1T/zOLjw9XARYvz6buyXAi +FL39vmwLAw== +-----END CERTIFICATE----- + +Sonera Class 2 Root CA +====================== +-----BEGIN CERTIFICATE----- +MIIDIDCCAgigAwIBAgIBHTANBgkqhkiG9w0BAQUFADA5MQswCQYDVQQGEwJGSTEPMA0GA1UEChMG +U29uZXJhMRkwFwYDVQQDExBTb25lcmEgQ2xhc3MyIENBMB4XDTAxMDQwNjA3Mjk0MFoXDTIxMDQw +NjA3Mjk0MFowOTELMAkGA1UEBhMCRkkxDzANBgNVBAoTBlNvbmVyYTEZMBcGA1UEAxMQU29uZXJh +IENsYXNzMiBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJAXSjWdyvANlsdE+hY3 +/Ei9vX+ALTU74W+oZ6m/AxxNjG8yR9VBaKQTBME1DJqEQ/xcHf+Js+gXGM2RX/uJ4+q/Tl18GybT +dXnt5oTjV+WtKcT0OijnpXuENmmz/V52vaMtmdOQTiMofRhj8VQ7Jp12W5dCsv+u8E7s3TmVToMG +f+dJQMjFAbJUWmYdPfz56TwKnoG4cPABi+QjVHzIrviQHgCWctRUz2EjvOr7nQKV0ba5cTppCD8P +tOFCx4j1P5iop7oc4HFx71hXgVB6XGt0Rg6DA5jDjqhu8nYybieDwnPz3BjotJPqdURrBGAgcVeH +nfO+oJAjPYok4doh28MCAwEAAaMzMDEwDwYDVR0TAQH/BAUwAwEB/zARBgNVHQ4ECgQISqCqWITT +XjwwCwYDVR0PBAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQBazof5FnIVV0sd2ZvnoiYw7JNn39Yt +0jSv9zilzqsWuasvfDXLrNAPtEwr/IDva4yRXzZ299uzGxnq9LIR/WFxRL8oszodv7ND6J+/3DEI +cbCdjdY0RzKQxmUk96BKfARzjzlvF4xytb1LyHr4e4PDKE6cCepnP7JnBBvDFNr450kkkdAdavph +Oe9r5yF1BgfYErQhIHBCcYHaPJo2vqZbDWpsmh+Re/n570K6Tk6ezAyNlNzZRZxe7EJQY670XcSx +EtzKO6gunRRaBXW37Ndj4ro1tgQIkejanZz2ZrUYrAqmVCY0M9IbwdR/GjqOC6oybtv8TyWf2TLH +llpwrN9M +-----END CERTIFICATE----- + +UTN USERFirst Hardware Root CA +============================== +-----BEGIN CERTIFICATE----- +MIIEdDCCA1ygAwIBAgIQRL4Mi1AAJLQR0zYq/mUK/TANBgkqhkiG9w0BAQUFADCBlzELMAkGA1UE +BhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEeMBwGA1UEChMVVGhl +IFVTRVJUUlVTVCBOZXR3b3JrMS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//bey1WiCuFMVGWTYGufEpytXoMs61quwOQt9ABjHbjAbPLPSbtNk28GpgoiskliCE7/yMgUsogW +XecB5BKV5UU0s4tpvc+0hY91UZ59Ojg6FEgSxvunOxqNDYJAB+gECJChicsZUN/KHAG8HQQZexB2 +lzvukJDKxA4fFm517zP4029bHpbj4HR3dHuKom4t3XbWOTCC8KucUvIqx69JXn7HaOWCgchqJ/kn +iCrVWFCVH/A7HFe7fRQ5YiuayZSSKqMiDP+JJn1fIytH1xUdqWqeUQ0qUZ6B+dQ7XnASfxAynB67 +nfhmqA== +-----END CERTIFICATE----- + +Camerfirma Chambers of Commerce Root +==================================== +-----BEGIN CERTIFICATE----- +MIIEvTCCA6WgAwIBAgIBADANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJFVTEnMCUGA1UEChMe +QUMgQ2FtZXJmaXJtYSBTQSBDSUYgQTgyNzQzMjg3MSMwIQYDVQQLExpodHRwOi8vd3d3LmNoYW1i +ZXJzaWduLm9yZzEiMCAGA1UEAxMZQ2hhbWJlcnMgb2YgQ29tbWVyY2UgUm9vdDAeFw0wMzA5MzAx +NjEzNDNaFw0zNzA5MzAxNjEzNDRaMH8xCzAJBgNVBAYTAkVVMScwJQYDVQQKEx5BQyBDYW1lcmZp +cm1hIFNBIENJRiBBODI3NDMyODcxIzAhBgNVBAsTGmh0dHA6Ly93d3cuY2hhbWJlcnNpZ24ub3Jn +MSIwIAYDVQQDExlDaGFtYmVycyBvZiBDb21tZXJjZSBSb290MIIBIDANBgkqhkiG9w0BAQEFAAOC +AQ0AMIIBCAKCAQEAtzZV5aVdGDDg2olUkfzIx1L4L1DZ77F1c2VHfRtbunXF/KGIJPov7coISjlU +xFF6tdpg6jg8gbLL8bvZkSM/SAFwdakFKq0fcfPJVD0dBmpAPrMMhe5cG3nCYsS4No41XQEMIwRH +NaqbYE6gZj3LJgqcQKH0XZi/caulAGgq7YN6D6IUtdQis4CwPAxaUWktWBiP7Zme8a7ileb2R6jW +DA+wWFjbw2Y3npuRVDM30pQcakjJyfKl2qUMI/cjDpwyVV5xnIQFUZot/eZOKjRa3spAN2cMVCFV +d9oKDMyXroDclDZK9D7ONhMeU+SsTjoF7Nuucpw4i9A5O4kKPnf+dQIBA6OCAUQwggFAMBIGA1Ud +EwEB/wQIMAYBAf8CAQwwPAYDVR0fBDUwMzAxoC+gLYYraHR0cDovL2NybC5jaGFtYmVyc2lnbi5v +cmcvY2hhbWJlcnNyb290LmNybDAdBgNVHQ4EFgQU45T1sU3p26EpW1eLTXYGduHRooowDgYDVR0P +AQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQEAwIABzAnBgNVHREEIDAegRxjaGFtYmVyc3Jvb3RAY2hh +bWJlcnNpZ24ub3JnMCcGA1UdEgQgMB6BHGNoYW1iZXJzcm9vdEBjaGFtYmVyc2lnbi5vcmcwWAYD +VR0gBFEwTzBNBgsrBgEEAYGHLgoDATA+MDwGCCsGAQUFBwIBFjBodHRwOi8vY3BzLmNoYW1iZXJz +aWduLm9yZy9jcHMvY2hhbWJlcnNyb290Lmh0bWwwDQYJKoZIhvcNAQEFBQADggEBAAxBl8IahsAi +fJ/7kPMa0QOx7xP5IV8EnNrJpY0nbJaHkb5BkAFyk+cefV/2icZdp0AJPaxJRUXcLo0waLIJuvvD +L8y6C98/d3tGfToSJI6WjzwFCm/SlCgdbQzALogi1djPHRPH8EjX1wWnz8dHnjs8NMiAT9QUu/wN +UPf6s+xCX6ndbcj0dc97wXImsQEcXCz9ek60AcUFV7nnPKoF2YjpB0ZBzu9Bga5Y34OirsrXdx/n +ADydb47kMgkdTXg0eDQ8lJsm7U9xxhl6vSAiSFr+S30Dt+dYvsYyTnQeaN2oaFuzPu5ifdmA6Ap1 +erfutGWaIZDgqtCYvDi1czyL+Nw= +-----END CERTIFICATE----- + +Camerfirma Global Chambersign Root +================================== +-----BEGIN CERTIFICATE----- +MIIExTCCA62gAwIBAgIBADANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJFVTEnMCUG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AEW5p5JYXMP80kWNyOO7MHAGjHZQopDH2esRU1/blMVgDoszOYtuURXO1v0XJJLXVggKt +I3lpjbi2Tc7PTMozI+gciKqdi0FuFskg5YmezTvacPd+mSYgFFQlq25zheabIZ0KbIIOqPjCDPoQ +HmyW74cNxA9hi63ugyuV+I6ShHI56yDqg+2DzZduCLzrTia2cyvk0/ZM/iZx4mERdEr/VxqHD3VI +Ls9RaRegAhJhldXRQLIQTO7ErBBDpqWeCtWVYpoNz4iCxTIM5CufReYNnyicsbkqWletNw+vHX/b +vZ8= +-----END CERTIFICATE----- + +Starfield Class 2 CA +==================== +-----BEGIN CERTIFICATE----- +MIIEDzCCAvegAwIBAgIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJVUzElMCMGA1UEChMc +U3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMpU3RhcmZpZWxkIENsYXNzIDIg +Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQwNjI5MTczOTE2WhcNMzQwNjI5MTczOTE2WjBo +MQswCQYDVQQGEwJVUzElMCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAG +A1UECxMpU3RhcmZpZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEgMA0GCSqG +SIb3DQEBAQUAA4IBDQAwggEIAoIBAQC3Msj+6XGmBIWtDBFk385N78gDGIc/oav7PKaf8MOh2tTY +bitTkPskpD6E8J7oX+zlJ0T1KKY/e97gKvDIr1MvnsoFAZMej2YcOadN+lq2cwQlZut3f+dZxkqZ +JRRU6ybH838Z1TBwj6+wRir/resp7defqgSHo9T5iaU0X9tDkYI22WY8sbi5gv2cOj4QyDvvBmVm +epsZGD3/cVE8MC5fvj13c7JdBmzDI1aaK4UmkhynArPkPw2vCHmCuDY96pzTNbO8acr1zJ3o/WSN +F4Azbl5KXZnJHoe0nRrA1W4TNSNe35tfPe/W93bC6j67eA0cQmdrBNj41tpvi/JEoAGrAgEDo4HF +MIHCMB0GA1UdDgQWBBS/X7fRzt0fhvRbVazc1xDCDqmI5zCBkgYDVR0jBIGKMIGHgBS/X7fRzt0f +hvRbVazc1xDCDqmI56FspGowaDELMAkGA1UEBhMCVVMxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNo +bm9sb2dpZXMsIEluYy4xMjAwBgNVBAsTKVN0YXJmaWVsZCBDbGFzcyAyIENlcnRpZmljYXRpb24g +QXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAAWdP4id0ckaVaGs +afPzWdqbAYcaT1epoXkJKtv3L7IezMdeatiDh6GX70k1PncGQVhiv45YuApnP+yz3SFmH8lU+nLM +PUxA2IGvd56Deruix/U0F47ZEUD0/CwqTRV/p2JdLiXTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJl +xy16paq8U4Zt3VekyvggQQto8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynpVSJYACPq4xJD +KVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEYWQPJIrSPnNVeKtelttQKbfi3 +QBFGmh95DmK/D5fs4C8fF5Q= +-----END CERTIFICATE----- + +StartCom Certification Authority +================================ +-----BEGIN CERTIFICATE----- +MIIHyTCCBbGgAwIBAgIBATANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJJTDEWMBQGA1UEChMN +U3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmlu +ZzEpMCcGA1UEAxMgU3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDYwOTE3MTk0 +NjM2WhcNMzYwOTE3MTk0NjM2WjB9MQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRk +LjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdG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fAii6w0TiYiBKGHLHVKt+V9E9e4DGTANtLJL4YSjCMJwRuCO3NJo2pXh5Tl +1njFmUNj403gdy3hZZlyaQQaRwnmDwFWJPsfvw55qVguucQJAX6Vum0ABj6y6koQOdjQK/W/7HW/ +lwLFCRsI3FU34oH7N4RDYiDK51ZLZer+bMEkkyShNOsF/5oirpt9P/FlUQqmMGqz9IgcgA38coro +g14= +-----END CERTIFICATE----- + +Taiwan GRCA +=========== +-----BEGIN CERTIFICATE----- +MIIFcjCCA1qgAwIBAgIQH51ZWtcvwgZEpYAIaeNe9jANBgkqhkiG9w0BAQUFADA/MQswCQYDVQQG +EwJUVzEwMC4GA1UECgwnR292ZXJubWVudCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4X +DTAyMTIwNTEzMjMzM1oXDTMyMTIwNTEzMjMzM1owPzELMAkGA1UEBhMCVFcxMDAuBgNVBAoMJ0dv +dmVybm1lbnQgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCAiIwDQYJKoZIhvcNAQEBBQAD +ggIPADCCAgoCggIBAJoluOzMonWoe/fOW1mKydGGEghU7Jzy50b2iPN86aXfTEc2pBsBHH8eV4qN +w8XRIePaJD9IK/ufLqGU5ywck9G/GwGHU5nOp/UKIXZ3/6m3xnOUT0b3EEk3+qhZSV1qgQdW8or5 +BtD3cCJNtLdBuTK4sfCxw5w/cP1T3YGq2GN49thTbqGsaoQkclSGxtKyyhwOeYHWtXBiCAEuTk8O +1RGvqa/lmr/czIdtJuTJV6L7lvnM4T9TjGxMfptTCAtsF/tnyMKtsc2AtJfcdgEWFelq16TheEfO +htX7MfP6Mb40qij7cEwdScevLJ1tZqa2jWR+tSBqnTuBto9AAGdLiYa4zGX+FVPpBMHWXx1E1wov +J5pGfaENda1UhhXcSTvxls4Pm6Dso3pdvtUqdULle96ltqqvKKyskKw4t9VoNSZ63Pc78/1Fm9G7 +Q3hub/FCVGqY8A2tl+lSXunVanLeavcbYBT0peS2cWeqH+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2Y0EQs3MevNP6yn0WR+Kn1dCjigoIlmJWbjTb2QK5MHXjBNLnj8KwEUAKrNVxAmKLMb7dxiNY +MUJDLXT5xp6mig/p/r+D5kNXJLrvRjSq1xIBOO0CAwEAAaOBhjCBgzAOBgNVHQ8BAf8EBAMCAYYw +HQYDVR0hBBYwFDASBgdghXQBUwABBgdghXQBUwABMBIGA1UdEwEB/wQIMAYBAf8CAQcwHwYDVR0j +BBgwFoAUAyUv3m+CATpcLNwroWm1Z9SM0/0wHQYDVR0OBBYEFAMlL95vggE6XCzcK6FptWfUjNP9 +MA0GCSqGSIb3DQEBBQUAA4ICAQA1EMvspgQNDQ/NwNurqPKIlwzfky9NfEBWMXrrpA9gzXrzvsMn +jgM+pN0S734edAY8PzHyHHuRMSG08NBsl9Tpl7IkVh5WwzW9iAUPWxAaZOHHgjD5Mq2eUCzneAXQ +MbFamIp1TpBcahQq4FJHgmDmHtqBsfsUC1rxn9KVuj7QG9YVHaO+htXbD8BJZLsuUBlL0iT43R4H +VtA4oJVwIHaM190e3p9xxCPvgxNcoyQVTSlAPGrEqdi3pkSlDfTgnXceQHAm/NrZNuR55LU/vJtl +vrsRls/bxig5OgjOR1tTWsWZ/l2p3e9M1MalrQLmjAcSHm8D0W+go/MpvRLHUKKwf4ipmXeascCl +OS5cfGniLLDqN2qk4Vrh9VDlg++luyqI54zb/W1elxmofmZ1a3Hqv7HHb6D0jqTsNFFbjCYDcKF3 +1QESVwA12yPeDooomf2xEG9L/zgtYE4snOtnta1J7ksfrK/7DZBaZmBwXarNeNQk7shBoJMBkpxq +nvy5JMWzFYJ+vq6VK+uxwNrjAWALXmmshFZhvnEX/h0TD/7Gh0Xp/jKgGg0TpJRVcaUWi7rKibCy +x/yP2FS1k2Kdzs9Z+z0YzirLNRWCXf9UIltxUvu3yf5gmwBBZPCqKuy2QkPOiWaByIufOVQDJdMW +NY6E0F/6MBr1mmz0DlP5OlvRHA== +-----END CERTIFICATE----- + +DigiCert Assured ID Root CA +=========================== +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JiwgvT2zKIn3X/8i4peEH+ll74fg38Fn +SbNd67IJKusm7Xi+fT8r87cmNW1fiQG2SVufAQWbqz0lwcy2f8Lxb4bG+mRo64EtlOtCt/qMHt1i +8b5QZ7dsvfPxH2sMNgcWfzd8qVttevESRmCD1ycEvkvOl77DZypoEd+A5wwzZr8TDRRu838fYxAe ++o0bJW1sj6W3YQGx0qMmoRBxna3iw/nDmVG3KwcIzi7mULKn+gpFL6Lw8g== +-----END CERTIFICATE----- + +DigiCert Global Root CA +======================= +-----BEGIN CERTIFICATE----- +MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBhMQswCQYDVQQG +EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw +HgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAw +MDAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3 +dy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkq +hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsBCSDMAZOn +TjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97nh6Vfe63SKMI2tavegw5 +BmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt43C/dxC//AH2hdmoRBBYMql1GNXRor5H +4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7PT19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y +7vrTC0LUq7dBMtoM1O/4gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQAB +o2MwYTAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbRTLtm +8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUwDQYJKoZIhvcNAQEF +BQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/EsrhMAtudXH/vTBH1jLuG2cenTnmCmr +EbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIt +tep3Sp+dWOIrWcBAI+0tKIJFPnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886 +UAb3LujEV0lsYSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk +CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4= +-----END CERTIFICATE----- + +DigiCert High Assurance EV Root CA +================================== +-----BEGIN CERTIFICATE----- +MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBsMQswCQYDVQQG +EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSsw +KQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5jZSBFViBSb290IENBMB4XDTA2MTExMDAwMDAw +MFoXDTMxMTExMDAwMDAwMFowbDELMAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZ +MBcGA1UECxMQd3d3LmRpZ2ljZXJ0LmNvbTErMCkGA1UEAxMiRGlnaUNlcnQgSGlnaCBBc3N1cmFu +Y2UgRVYgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbM5XPm+9S75S0t +Mqbf5YE/yc0lSbZxKsPVlDRnogocsF9ppkCxxLeyj9CYpKlBWTrT3JTWPNt0OKRKzE0lgvdKpVMS +OO7zSW1xkX5jtqumX8OkhPhPYlG++MXs2ziS4wblCJEMxChBVfvLWokVfnHoNb9Ncgk9vjo4UFt3 +MRuNs8ckRZqnrG0AFFoEt7oT61EKmEFBIk5lYYeBQVCmeVyJ3hlKV9Uu5l0cUyx+mM0aBhakaHPQ +NAQTXKFx01p8VdteZOE3hzBWBOURtCmAEvF5OYiiAhF8J2a3iLd48soKqDirCmTCv2ZdlYTBoSUe +h10aUAsgEsxBu24LUTi4S8sCAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMB +Af8wHQYDVR0OBBYEFLE+w2kD+L9HAdSYJhoIAu9jZCvDMB8GA1UdIwQYMBaAFLE+w2kD+L9HAdSY +JhoIAu9jZCvDMA0GCSqGSIb3DQEBBQUAA4IBAQAcGgaX3NecnzyIZgYIVyHbIUf4KmeqvxgydkAQ +V8GK83rZEWWONfqe/EW1ntlMMUu4kehDLI6zeM7b41N5cdblIZQB2lWHmiRk9opmzN6cN82oNLFp +myPInngiK3BD41VHMWEZ71jFhS9OMPagMRYjyOfiZRYzy78aG6A9+MpeizGLYAiJLQwGXFK3xPkK +mNEVX58Svnw2Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe +vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep+OkuE6N36B9K +-----END CERTIFICATE----- + +Certplus Class 2 Primary CA +=========================== +-----BEGIN CERTIFICATE----- +MIIDkjCCAnqgAwIBAgIRAIW9S/PY2uNp9pTXX8OlRCMwDQYJKoZIhvcNAQEFBQAwPTELMAkGA1UE +BhMCRlIxETAPBgNVBAoTCENlcnRwbHVzMRswGQYDVQQDExJDbGFzcyAyIFByaW1hcnkgQ0EwHhcN +OTkwNzA3MTcwNTAwWhcNMTkwNzA2MjM1OTU5WjA9MQswC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N0ZHN0LmNvbS9jZXJ0aWZpY2F0ZXMvcG9saWN5L0FDRVMtaW5kZXguaHRtbDAdBgNVHQ4EFgQU +CXIGThhDD+XWzMNqizF7eI+og7gwDQYJKoZIhvcNAQEFBQADggEBAKPYjtay284F5zLNAdMEA+V2 +5FYrnJmQ6AgwbN99Pe7lv7UkQIRJ4dEorsTCOlMwiPH1d25Ryvr/ma8kXxug/fKshMrfqfBfBC6t +Fr8hlxCBPeP/h40y3JTlR4peahPJlJU90u7INJXQgNStMgiAVDzgvVJT11J8smk/f3rPanTK+gQq +nExaBqXpIK1FZg9p8d2/6eMyi/rgwYZNcjwu2JN4Cir42NInPRmJX1p7ijvMDNpRrscL9yuwNwXs +vFcj4jjSm2jzVhKIT0J8uDHEtdvkyCE06UgRNe76x5JXxZ805Mf29w4LTJxoeHtxMcfrHuBnQfO3 +oKfN5XozNmr6mis= +-----END CERTIFICATE----- + +SwissSign Gold CA - G2 +====================== +-----BEGIN CERTIFICATE----- +MIIFujCCA6KgAwIBAgIJALtAHEP1Xk+wMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNVBAYTAkNIMRUw +EwYDVQQKEwxTd2lzc1NpZ24gQUcxHzAdBgNVBAMTFlN3aXNzU2lnbiBHb2xkIENBIC0gRzIwHhcN +MDYxMDI1MDgzMDM1WhcNMzYxMDI1MDgzMDM1WjBFMQswCQYDVQQGEwJDSDEVMBMGA1UEChMMU3dp +c3NTaWduIEFHMR8wHQYDVQQDExZTd2lzc1NpZ24gR29sZCBDQSAtIEcyMIICIjANBgkqhkiG9w0B +AQEFAAOCAg8AMIICCgKCAgEAr+TufoskDhJuqVAtFkQ7kpJcyrhdhJJCEyq8ZVeCQD5XJM1QiyUq +t2/876LQwB8CJEoTlo8jE+YoWACjR8cGp4QjK7u9lit/VcyLwVcfDmJlD909Vopz2q5+bbqBHH5C +jCA12UNNhPqE21Is8w4ndwtrvxEvcnifLtg+5hg3Wipy+dpikJKVyh+c6bM8K8vzARO/Ws/BtQp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6oJxp +mo/a77KwPJ+HbBIrZXAVUjEaJM9vMSNQH4xPjyPDdEFjHFWoFN0+4FFQz/EbMFYOkrCChdiDyyJk +vC24JdVUorgG6q2SpCSgwYa1ShNqR88uC1aVVMvOmttqtKay20EIhid392qgQmwLOM7XdVAyksLf +KzAiSNDVQTglXaTpXZ/GlHXQRf0wl0OPkKsKx4ZzYEppLd6leNcG2mqeSz53OiATIgHQv2ieY2Br +NU0LbbqhPcCT4H8js1WtciVORvnSFu+wZMEBnunKoGqYDs/YYPIvSbjkQuE4NRb0yG5P94FW6Lqj +viOvrv1vA+ACOzB2+httQc8Bsem4yWb02ybzOqR08kkkW8mw0FfB+j564ZfJ +-----END CERTIFICATE----- + +SwissSign Silver CA - G2 +======================== +-----BEGIN CERTIFICATE----- +MIIFvTCCA6WgAwIBAgIITxvUL1S7L0swDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCQ0gxFTAT +BgNVBAoTDFN3aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMB4X +DTA2MTAyNTA4MzI0NloXDTM2MTAyNTA4MzI0NlowRzELMAkGA1UEBhMCQ0gxFTATBgNVBAoTDFN3 +aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMIICIjANBgkqhkiG +9w0BAQEFAAOCAg8AMIICCgKCAgEAxPGHf9N4Mfc4yfjDmUO8x/e8N+dOcbpLj6VzHVxumK4DV644 +N0MvFz0fyM5oEMF4rhkDKxD6LHmD9ui5aLlV8gREpzn5/ASLHvGiTSf5YXu6t+WiE7brYT7QbNHm ++/pe7R20nqA1W6GSy/BJkv6FCgU+5tkL4k+73JU3/JHpMjUi0R86TieFnbAVlDLaYQ1HTWBCrpJH +6INaUFjpiou5XaHc3ZlKHzZnu0jkg7Y360g6rw9njxcH6ATK72oxh9TAtvmUcXtnZLi2kUpCe2Uu +MGoM9ZDulebyzYLs2aFK7PayS+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V8X5pGyq7O70luJpaPXJhkGaH7gzWTdQRdAtq/gsD/KNVV4n+Ssuu +WxcFyPKNIzFTONItaj+CuY0IavdeQXRuwxF+B6wpYJE/OMpXEA29MC/HpeZBoNquBYeaoKRlbEwJ +DIm6uNO5wJOKMPqN5ZprFQFOZ6raYlY+hAhm0sQ2fac+EPyI4NSA5QC9qvNOBqN6avlicuMJT+ub +DgEj8Z+7fNzcbBGXJbLytGMU0gYqZ4yD9c7qB9iaah7s5Aq7KkzrCWA5zspi2C5u +-----END CERTIFICATE----- + +GeoTrust Primary Certification Authority +======================================== +-----BEGIN CERTIFICATE----- +MIIDfDCCAmSgAwIBAgIQGKy1av1pthU6Y2yv2vrEoTANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQG +EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjExMC8GA1UEAxMoR2VvVHJ1c3QgUHJpbWFyeSBD +ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjExMjcwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMFgx +CzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTEwLwYDVQQDEyhHZW9UcnVzdCBQ +cmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB +CgKCAQEAvrgVe//UfH1nrYNke8hCUy3f9oQIIGHWAVlqnEQRr+92/ZV+zmEwu3qDXwK9AWbK7hWN +b6EwnL2hhZ6UOvNWiAAxz9juapYC2e0DjPt1befquFUWBRaa9OBesYjAZIVcFU2Ix7e64HXprQU9 +nceJSOC7KMgD4TCTZF5SwFlwIjVXiIrxlQqD17wxcwE07e9GceBrAqg1cmuXm2bgyxx5X9gaBGge +RwLmnWDiNpcB3841kt++Z8dtd1k7j53WkBWUvEI0EME5+bEnPn7WinXFsq+W06Lem+SYvn3h6YGt +tm/81w7a4DSwDRp35+MImO9Y+pyEtzavwt+s0v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G9ubHkxHzAdBgNVBAMT +FnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCs +oPD7gFnUnMekz52hWXMJEEUMDSxuaPFsW0hoSVk3/AszGcJ3f8wQLZU0HObrTQmnHNK4yZc2AreJ +1CRfBsDMRJSUjQJib+ta3RGNKJpchJAQeg29dGYvajig4tVUROsdB58Hum/u6f1OCyn1PoSgAfGc +q/gcfomk6KHYcWUNo1F77rzSImANuVud37r8UVsLr5iy6S7pBOhih94ryNdOwUxkHt3Ph1i6Sk/K +aAcdHJ1KxtUvkcx8cXIcxcBn6zL9yZJclNqFwJu/U30rCfSMnZEfl2pSy94JNqR32HuHUETVPm4p +afs5SSYeCaWAe0At6+gnhcn+Yf1+5nyXHdWdAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYD +VR0PAQH/BAQDAgEGMB0GA1UdDgQWBBR7W0XPr87Lev0xkhpqtvNG61dIUDANBgkqhkiG9w0BAQUF +AAOCAQEAeRHAS7ORtvzw6WfUDW5FvlXok9LOAz/t2iWwHVfLHjp2oEzsUHboZHIMpKnxuIvW1oeE +uzLlQRHAd9mzYJ3rG9XRbkREqaYB7FViHXe4XI5ISXycO1cRrK1zN44veFyQaEfZYGDm/Ac9IiAX +xPcW6cTYcvnIc3zfFi8VqT79aie2oetaupgf1eNNZAqdE8hhuvU5HIe6uL17In/2/qxAeeWsEG89 +jxt5dovEN7MhGITlNgDrYyCZuen+MwS7QcjBAvlEYyCegc5C09Y/LHbTY5xZ3Y+m4Q6gLkH3LpVH +z7z9M/P2C2F+fpErgUfCJzDupxBdN49cOSvkBPB7jVaMaA== +-----END CERTIFICATE----- + +VeriSign Class 3 Public Primary Certification Authority - G5 +============================================================ +-----BEGIN CERTIFICATE----- +MIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjNzGs7SjANBgkqhkiG9w0BAQUFADCByjELMAkGA1UE +BhMCVVMxFzA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ZDRIuJK58bRQKfJPIx/abKwfROHdI3hRW8cW +-----END CERTIFICATE----- + +COMODO Certification Authority +============================== +-----BEGIN CERTIFICATE----- +MIIEHTCCAwWgAwIBAgIQToEtioJl4AsC7j41AkblPTANBgkqhkiG9w0BAQUFADCBgTELMAkGA1UE +BhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgG +A1UEChMRQ09NT0RPIENBIExpbWl0ZWQxJzAlBgNVBAMTHkNPTU9ETyBDZXJ0aWZpY2F0aW9uIEF1 +dGhvcml0eTAeFw0wNjEyMDEwMDAwMDBaFw0yOTEyMzEyMzU5NTlaMIGBMQswCQYDVQQGEwJHQjEb +MBkGA1UECBMSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRowGAYDVQQKExFD +T01PRE8gQ0EgTGltaXRlZDEnMCUGA1UEAxMeQ09NT0RPIENlcnRpZmljYXRpb24gQXV0aG9yaXR5 +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0ECLi3LjkRv3UcEbVASY06m/weaKXTuH ++7uIzg3jLz8GlvCiKVCZrts7oVewdFFxze1CkU1B/qnI2GqGd0S7WWaXUF601CxwRM/aN5VCaTww +xHGzUvAhTaHYujl8HJ6jJJ3ygxaYqhZ8Q5sVW7euNJH+1GImGEaaP+vB+fGQV+useg2L23IwambV +4EajcNxo2f8ESIl33rXp+2dtQem8Ob0y2WIC8bGoPW43nOIv4tOiJovGuFVDiOEjPqXSJDlqR6sA +1KGzqSX+DT+nHbrTUcELpNqsOO9VUCQFZUaTNE8tja3G1CEZ0o7KBWFxB3NH5YoZEr0ETc5OnKVI +rLsm9wIDAQABo4GOMIGLMB0GA1UdDgQWBBQLWOWLxkwVN6RAqTCpIb5HNlpW/zAOBgNVHQ8BAf8E +BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zBJBgNVHR8EQjBAMD6gPKA6hjhodHRwOi8vY3JsLmNvbW9k +b2NhLmNvbS9DT01PRE9DZXJ0aWZpY2F0aW9uQXV0aG9yaXR5LmNybDANBgkqhkiG9w0BAQUFAAOC +AQEAPpiem/Yb6dc5t3iuHXIYSdOH5EOC6z/JqvWote9VfCFSZfnVDeFs9D6Mk3ORLgLETgdxb8CP +OGEIqB6BCsAvIC9Bi5HcSEW88cbeunZrM8gALTFGTO3nnc+IlP8zwFboJIYmuNg4ON8qa90SzMc/ +RxdMosIGlgnW2/4/PEZB31jiVg88O8EckzXZOFKs7sjsLjBOlDW0JB9LeGna8gI4zJVSk/BwJVmc +IGfE7vmLV2H0knZ9P4SNVbfo5azV8fUZVqZa+5Acr5Pr5RzUZ5ddBA6+C4OmF4O5MBKgxTMVBbkN ++8cFduPYSo38NBejxiEovjBFMR7HeL5YYTisO+IBZQ== +-----END CERTIFICATE----- + +Network Solutions Certificate Authority +======================================= +-----BEGIN CERTIFICATE----- +MIID5jCCAs6gAwIBAgIQV8szb8JcFuZHFhfjkDFo4DANBgkqhkiG9w0BAQUFADBiMQswCQYDVQQG +EwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMuMTAwLgYDVQQDEydOZXR3b3Jr +IFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDYxMjAxMDAwMDAwWhcNMjkxMjMx +MjM1OTU5WjBiMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMu +MTAwLgYDVQQDEydOZXR3b3JrIFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0G +CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDkvH6SMG3G2I4rC7xGzuAnlt7e+foS0zwzc7MEL7xx +jOWftiJgPl9dzgn/ggwbmlFQGiaJ3dVhXRncEg8tCqJDXRfQNJIg6nPPOCwGJgl6cvf6UDL4wpPT +aaIjzkGxzOTVHzbRijr4jGPiFFlp7Q3Tf2vouAPlT2rlmGNpSAW+Lv8ztumXWWn4Zxmuk2GWRBXT +crA/vGp97Eh/jcOrqnErU2lBUzS1sLnFBgrEsEX1QV1uiUV7PTsmjHTC5dLRfbIR1PtYMiKagMnc +/Qzpf14Dl847ABSHJ3A4qY5usyd2mFHgBeMhqxrVhSI8KbWaFsWAqPS7azCPL0YCorEMIuDTAgMB +AAGjgZcwgZQwHQYDVR0OBBYEFCEwyfsA106Y2oeqKtCnLrFAMadMMA4GA1UdDwEB/wQEAwIBBjAP +BgNVHRMBAf8EBTADAQH/MFIGA1UdHwRLMEkwR6BFoEOGQWh0dHA6Ly9jcmwubmV0c29sc3NsLmNv +bS9OZXR3b3JrU29sdXRpb25zQ2VydGlmaWNhdGVBdXRob3JpdHkuY3JsMA0GCSqGSIb3DQEBBQUA +A4IBAQC7rkvnt1frf6ott3NHhWrB5KUd5Oc86fRZZXe1eltajSU24HqXLjjAV2CDmAaDn7l2em5Q +4LqILPxFzBiwmZVRDuwduIj/h1AcgsLj4DKAv6ALR8jDMe+ZZzKATxcheQxpXN5eNK4CtSbqUN9/ +GGUsyfJj4akH/nxxH2szJGoeBfcFaMBqEssuXmHLrijTfsK0ZpEmXzwuJF/LWA/rKOyvEZbz3Htv +wKeI8lN3s2Berq4o2jUsbzRF0ybh3uxbTydrFny9RAQYgrOJeRcQcT16ohZO9QHNpGxlaKFJdlxD +ydi8NmdspZS11My5vWo1ViHe2MPr+8ukYEywVaCge1ey +-----END CERTIFICATE----- + +WellsSecure Public Root Certificate Authority +============================================= +-----BEGIN CERTIFICATE----- +MIIEvTCCA6WgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBhTELMAkGA1UEBhMCVVMxIDAeBgNVBAoM +F1dlbGxzIEZhcmdvIFdlbGxzU2VjdXJlMRwwGgYDVQQLDBNXZWxscyBGYXJnbyBCYW5rIE5BMTYw +NAYDVQQDDC1XZWxsc1NlY3VyZSBQdWJsaWMgUm9vdCBD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ZpY2F0ZSBBdXRob3JpdHmCAQEwDQYJKoZIhvcNAQEFBQADggEBALkVsUSRzCPI +K0134/iaeycNzXK7mQDKfGYZUMbVmO2rvwNa5U3lHshPcZeG1eMd/ZDJPHV3V3p9+N701NX3leZ0 +bh08rnyd2wIDBSxxSyU+B+NemvVmFymIGjifz6pBA4SXa5M4esowRBskRDPQ5NHcKDj0E0M1NSlj +qHyita04pO2t/caaH/+Xc/77szWnk4bGdpEA5qxRFsQnMlzbc9qlk1eOPm01JghZ1edE13YgY+es +E2fDbbFwRnzVlhE9iW9dqKHrjQrawx0zbKPqZxmamX9LPYNRKh3KL4YMon4QLSvUFpULB6ouFJJJ +tylv2G0xffX8oRAHh84vWdw+WNs= +-----END CERTIFICATE----- + +COMODO ECC Certification Authority +================================== +-----BEGIN CERTIFICATE----- +MIICiTCCAg+gAwIBAgIQH0evqmIAcFBUTAGem2OZKjAKBggqhkjOPQQDAzCBhTELMAkGA1UEBhMC +R0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UE +ChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBB +dXRob3JpdHkwHhcNMDgwMzA2MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMCR0Ix +GzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMR +Q09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBBdXRo +b3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQDR3svdcmCFYX7deSRFtSrYpn1PlILBs5BAH+X +4QokPB0BBO490o0JlwzgdeT6+3eKKvUDYEs2ixYjFq0JcfRK9ChQtP6IHG4/bC8vCVlbpVsLM5ni +wz2J+Wos77LTBumjQjBAMB0GA1UdDgQWBBR1cacZSBm8nZ3qQUfflMRId5nTeTAOBgNVHQ8BAf8E +BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjEA7wNbeqy3eApyt4jf/7VG +FAkK+qDmfQjGGoe9GKhzvSbKYAydzpmfz1wPMOG+FDHqAjAU9JM8SaczepBGR7NjfRObTrdvGDeA +U/7dIOA1mjbRxwG55tzd8/8dLDoWV9mSOdY= +-----END CERTIFICATE----- + +Security Communication EV RootCA1 +================================= +-----BEGIN CERTIFICATE----- +MIIDfTCCAmWgAwIBAgIBADANBgkqhkiG9w0BAQUFADBgMQswCQYDVQQGEwJKUDElMCMGA1UEChMc +U0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEqMCgGA1UECxMhU2VjdXJpdHkgQ29tbXVuaWNh +dGlvbiBFViBSb290Q0ExMB4XDTA3MDYwNjAyMTIzMloXDTM3MDYwNjAyMTIzMlowYDELMAkGA1UE +BhMCSlAxJTAjBgNVBAoTHFNFQ09NIFRydXN0IFN5c3RlbXMgQ08uLExURC4xKjAoBgNVBAsTIVNl +Y3VyaXR5IENvbW11bmljYXRpb24gRVYgUm9vdENBMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC +AQoCggEBALx/7FebJOD+nLpCeamIivqA4PUHKUPqjgo0No0c+qe1OXj/l3X3L+SqawSERMqm4miO +/VVQYg+kcQ7OBzgtQoVQrTyWb4vVog7P3kmJPdZkLjjlHmy1V4qe70gOzXppFodEtZDkBp2uoQSX +WHnvIEqCa4wiv+wfD+mEce3xDuS4GBPMVjZd0ZoeUWs5bmB2iDQL87PRsJ3KYeJkHcFGB7hj3R4z +ZbOOCVVSPbW9/wfrrWFVGCypaZhKqkDFMxRldAD5kd6vA0jFQFTcD4SQaCDFkpbcLuUCRarAX1T4 +bepJz11sS6/vmsJWXMY1VkJqMF/Cq/biPT+zyRGPMUzXn0kCAwEAAaNCMEAwHQYDVR0OBBYEFDVK +9U2vP9eCOKyrcWUXdYydVZPmMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqG +SIb3DQEBBQUAA4IBAQCoh+ns+EBnXcPBZsdAS5f8hxOQWsTvoMpfi7ent/HWtWS3irO4G8za+6xm +iEHO6Pzk2x6Ipu0nUBsCMCRGef4Eh3CXQHPRwMFXGZpppSeZq51ihPZRwSzJIxXYKLerJRO1RuGG +Av8mjMSIkh1W/hln8lXkgKNrnKt34VFxDSDbEJrbvXZ5B3eZKK2aXtqxT0QsNY6llsf9g/BYxnnW +mHyojf6GPgcWkuF75x3sM3Z+Qi5KhfmRiWiEA4Glm5q+4zfFVKtWOxgtQaQM+ELbmaDgcm+7XeEW +T1MKZPlO9L9OVL14bIjqv5wTJMJwaaJ/D8g8rQjJsJhAoyrniIPtd490 +-----END CERTIFICATE----- + +OISTE WISeKey Global Root GA CA +=============================== +-----BEGIN CERTIFICATE----- +MIID8TCCAtmgAwIBAgIQQT1yx/RrH4FDffHSKFTfmjANBgkqhkiG9w0BAQUFADCBijELMAkGA1UE +BhMCQ0gxEDAOBgNVBAoTB1dJU2VLZXkxGzAZBgNVBAsTEkNvcHlyaWdodCAoYykgMjAwNTEiMCAG +A1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNlZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBH +bG9iYWwgUm9vdCBHQSBDQTAeFw0wNTEyMTExNjAzNDRaFw0zNzEyMTExNjA5NTFaMIGKMQswCQYD +VQQGEwJDSDEQMA4GA1UEChMHV0lTZUtleTEbMBkGA1UECxMSQ29weXJpZ2h0IChjKSAyMDA1MSIw +IAYDVQQLExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5 +IEdsb2JhbCBSb290IEdBIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAy0+zAJs9 +Nt350UlqaxBJH+zYK7LG+DKBKUOVTJoZIyEVRd7jyBxRVVuuk+g3/ytr6dTqvirdqFEr12bDYVxg +Asj1znJ7O7jyTmUIms2kahnBAbtzptf2w93NvKSLtZlhuAGio9RN1AU9ka34tAhxZK9w8RxrfvbD +d50kc3vkDIzh2TbhmYsFmQvtRTEJysIA2/dyoJaqlYfQjse2YXMNdmaM3Bu0Y6Kff5MTMPGhJ9vZ +/yxViJGg4E8HsChWjBgbl0SOid3gF27nKu+POQoxhILYQBRJLnpB5Kf+42TMwVlxSywhp1t94B3R +LoGbw9ho972WG6xwsRYUC9tguSYBBQIDAQABo1EwTzALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUw +AwEB/zAdBgNVHQ4EFgQUswN+rja8sHnR3JQmthG+IbJphpQwEAYJKwYBBAGCNxUBBAMCAQAwDQYJ +KoZIhvcNAQEFBQADggEBAEuh/wuHbrP5wUOxSPMowB0uyQlB+pQAHKSkq0lPjz0e701vvbyk9vIm +MMkQyh2I+3QZH4VFvbBsUfk2ftv1TDI6QU9bR8/oCy22xBmddMVHxjtqD6wU2zz0c5ypBd8A3HR4 ++vg1YFkCExh8vPtNsCBtQ7tgMHpnM1zFmdH4LTlSc/uMqpclXHLZCB6rTjzjgTGfA6b7wP4piFXa +hNVQA7bihKOmNqoROgHhGEvWRGizPflTdISzRpFGlgC3gCy24eMQ4tui5yiPAZZiFj4A4xylNoEY +okxSdsARo27mHbrjWr42U8U+dY+GaSlYU7Wcu2+fXMUY7N0v4ZjJ/L7fCg0= +-----END CERTIFICATE----- + +Microsec e-Szigno Root CA +========================= +-----BEGIN CERTIFICATE----- +MIIHqDCCBpCgAwIBAgIRAMy4579OKRr9otxmpRwsDxEwDQYJKoZIhvcNAQEFBQAwcjELMAkGA1UE +BhMCSFUxETAPBgNVBAcTCEJ1ZGFwZXN0MRYwFAYDVQQKEw1NaWNyb3NlYyBMdGQuMRQwEgYDVQQL +EwtlLVN6aWdubyBDQTEiMCAGA1UEAx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4EFgQUGu3+QTmQ +tCRZvgHyUtVF9lo53BEwZAYDVR0jBF0wW4AUGu3+QTmQtCRZvgHyUtVF9lo53BGhOKQ2MDQxCzAJ +BgNVBAYTAkZSMRIwEAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hggkA/tzjAQ/J +SP8wDgYDVR0PAQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG9w0BAQUFAAOCAQEA +hQMeknH2Qq/ho2Ge6/PAD/Kl1NqV5ta+aDY9fm4fTIrv0Q8hbV6lUmPOEvjvKtpv6zf+EwLHyzs+ +ImvaYS5/1HI93TDhHkxAGYwP15zRgzB7mFncfca5DClMoTOi62c6ZYTTluLtdkVwj7Ur3vkj1klu +PBS1xp81HlDQwY9qcEQCYsuuHWhBp6pX6FOqB9IG9tUUBguRA3UsbHK1YZWaDYu5Def131TN3ubY +1gkIl2PlwS6wt0QmwCbAr1UwnjvVNioZBPRcHv/PLLf/0P2HQBHVESO7SMAhqaQoLf0V+LBOK/Qw +WyH8EZE0vkHve52Xdf+XlcCWWC/qu0bXu+TZLg== +-----END CERTIFICATE----- + +Deutsche Telekom Root CA 2 +========================== +-----BEGIN CERTIFICATE----- +MIIDnzCCAoegAwIBAgIBJjANBgkqhkiG9w0BAQUFADBxMQswCQYDVQQGEwJERTEcMBoGA1UEChMT +RGV1dHNjaGUgVGVsZWtvbSBBRzEfMB0GA1UECxMWVC1UZWxlU2VjIFRydXN0IENlbnRlcjEjMCEG +A1UEAxMaRGV1dHNjaGUgVGVsZWtvbSBSb290IENBIDIwHhcNOTkwNzA5MTIxMTAwWhcNMTkwNzA5 +MjM1OTAwWjBxMQswCQYDVQQGEwJERTEcMBoGA1UEChMTRGV1dHNjaGUgVGVsZWtvbSBBRzEfMB0G +A1UECxMWVC1UZWxlU2VjIFRydXN0IENlbnRlcjEjMCEGA1UEAxMaRGV1dHNjaGUgVGVsZWtvbSBS +b290IENBIDIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCrC6M14IspFLEUha88EOQ5 +bzVdSq7d6mGNlUn0b2SjGmBmpKlAIoTZ1KXleJMOaAGtuU1cOs7TuKhCQN/Po7qCWWqSG6wcmtoI +KyUn+WkjR/Hg6yx6m/UTAtB+NHzCnjwAWav12gz1MjwrrFDa1sPeg5TKqAyZMg4ISFZbavva4VhY +AUlfckE8FQYBjl2tqriTtM2e66foai1SNNs671x1Udrb8zH57nGYMsRUFUQM+ZtV7a3fGAigo4aK +Se5TBY8ZTNXeWHmb0mocQqvF1afPaA+W5OFhmHZhyJF81j4A4pFQh+GdCuatl9Idxjp9y7zaAzTV +jlsB9WoHtxa2bkp/AgMBAAGjQjBAMB0GA1UdDgQWBBQxw3kbuvVT1xfgiXotF2wKsyudMzAPBgNV +HRMECDAGAQH/AgEFMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEAlGRZrTlk5ynr +E/5aw4sTV8gEJPB0d8Bg42f76Ymmg7+Wgnxu1MM9756AbrsptJh6sTtU6zkXR34ajgv8HzFZMQSy +zhfzLMdiNlXiItiJVbSYSKpk+tYcNthEeFpaIzpXl/V6ME+un2pMSyuOoAPjPuCp1NJ70rOo4nI8 +rZ7/gFnkm0W09juwzTkZmDLl6iFhkOQxIY40sfcvNUqFENrnijchvllj4PKFiDFT1FQUhXB59C4G +dyd1Lx+4ivn+xbrYNuSD7Odlt79jWvNGr4GUN9RBjNYj1h7P9WgbRGOiWrqnNVmh5XAFmw4jV5mU +Cm26OWMohpLzGITY+9HPBVZkVw== +-----END CERTIFICATE----- + +Cybertrust Global Root +====================== +-----BEGIN CERTIFICATE----- +MIIDoTCCAomgAwIBAgILBAAAAAABD4WqLUgwDQYJKoZIhvcNAQEFBQAwOzEYMBYGA1UEChMPQ3li +ZXJ0cnVzdCwgSW5jMR8wHQYDVQQDExZDeWJlcnRydXN0IEdsb2JhbCBSb290MB4XDTA2MTIxNTA4 +MDAwMFoXDTIxM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jW +WL1WMRJOEcgh4LMRkWXbtKaIOM5V +-----END CERTIFICATE----- + +ePKI Root Certification Authority +================================= +-----BEGIN CERTIFICATE----- +MIIFsDCCA5igAwIBAgIQFci9ZUdcr7iXAF7kBtK8nTANBgkqhkiG9w0BAQUFADBeMQswCQYDVQQG +EwJUVzEjMCEGA1UECgwaQ2h1bmdod2EgVGVsZWNvbSBDby4sIEx0ZC4xKjAoBgNVBAsMIWVQS0kg +Um9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNDEyMjAwMjMxMjdaFw0zNDEyMjAwMjMx +MjdaMF4xCzAJBgNVBAYTAlRXMSMwIQYDVQQKDBpDaHVuZ2h3YSBUZWxlY29tIENvLiwgTHRkLjEq +MCgGA1UECwwhZVBLSSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkqhkiG9w0B +AQEFAAOCAg8AMIICCgKCAgEA4SUP7o3biDN1Z82tH306Tm2d0y8U82N0ywEhajfqhFAHSyZbCUNs +IZ5qyNUD9WBpj8zwIuQf5/dqIjG3LBXy4P4AakP/h2XGtRrBp0xtInAhijHyl3SJCRImHJ7K2RKi +lTza6We/CKBk49ZCt0Xvl/T29de1ShUCWH2YWEtgvM3XDZoTM1PRYfl61dd4s5oz9wCGzh1NlDiv +qOx4UXCKXBCDUSH3ET00hl7lSM2XgYI1TBnsZfZrxQWh7kcT1rMhJ5QQCtkkO7q+RBNGMD+XPNjX +12ruOzjjK9SXDrkb5wdJfzcq+Xd4z1TtW0ado4AOkUPB1ltfFLqfpo0kR0BZv3I4sjZsN/+Z0V0O +WQqraffAsgRFelQArr5T9rXn4fg8ozHSqf4hUmTFpmfwdQcGlBSBVcYn5AGPF8Fqcde+S/uUWH1+ +ETOxQvdibBjWzwloPn9s9h6PYq2lY9sJpx8iQkEeb5mKPtf5P0B6ebClAZLSnT0IFaUQAS2zMnao +lQ2zepr7BxB4EW/hj8e6DyUadCrlHJhBmd8hh+iVBmoKs2pHdmX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sa\xC4\x9Flay\xc4\xb1\x63\xc4\xb1s\xc4\xb1 - S\xC3\xBCr\xC3\xBCm 3 +============================================================================================================================= +-----BEGIN CERTIFICATE----- +MIIFFzCCA/+gAwIBAgIBETANBgkqhkiG9w0BAQUFADCCASsxCzAJBgNVBAYTAlRSMRgwFgYDVQQH +DA9HZWJ6ZSAtIEtvY2FlbGkxRzBFBgNVBAoMPlTDvHJraXllIEJpbGltc2VsIHZlIFRla25vbG9q +aWsgQXJhxZ90xLFybWEgS3VydW11IC0gVMOcQsSwVEFLMUgwRgYDVQQLDD9VbHVzYWwgRWxla3Ry +b25payB2ZSBLcmlwdG9sb2ppIEFyYcWfdMSxcm1hIEVuc3RpdMO8c8O8IC0gVUVLQUUxIzAhBgNV +BAsMGkthbXUgU2VydGlmaWthc3lvbiBNZXJrZXppMUowSAYDVQQDDEFUw5xCxLBUQUsgVUVLQUUg +S8O2ayBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsSAtIFPDvHLDvG0gMzAeFw0wNzA4 +MjQxMTM3MDdaFw0xNzA4MjExMTM3MDdaMIIBKzELMAkGA1UEBhMCVFIxGDAWBgNVBAcMD0dlYnpl +IC0gS29jYWVsaTFHMEUGA1UECgw+VMO8cmtpeWUgQmlsaW1zZWwgdmUgVGVrbm9sb2ppayBBcmHF +n3TEsXJtYSBLdXJ1bXUgLSBUw5xCxLBUQUsxSDBGBgNVBAsMP1VsdXNhbCBFbGVrdHJvbmlrIHZl +IEtyaXB0b2xvamkgQXJhxZ90xLFybWEgRW5zdGl0w7xzw7wgLSBVRUtBRTEjMCEGA1UECwwaS2Ft +dSBTZXJ0aWZpa2FzeW9uIE1lcmtlemkxSjBIBgNVBAMMQVTDnELEsFRBSyBVRUtBRSBLw7ZrIFNl +cnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxIC0gU8O8csO8bSAzMIIBIjANBgkqhkiG9w0B +AQEFAAOCAQ8AMIIBCgKCAQEAim1L/xCIOsP2fpTo6iBkcK4hgb46ezzb8R1Sf1n68yJMlaCQvEhO +Eav7t7WNeoMojCZG2E6VQIdhn8WebYGHV2yKO7Rm6sxA/OOqbLLLAdsyv9Lrhc+hDVXDWzhXcLh1 +xnnRFDDtG1hba+818qEhTsXOfJlfbLm4IpNQp81McGq+agV/E5wrHur+R84EpW+sky58K5+eeROR +6Oqeyjh1jmKwlZMq5d/pXpduIF9fhHpEORlAHLpVK/swsoHvhOPc7Jg4OQOFCKlUAwUp8MmPi+oL +hmUZEdPpCSPeaJMDyTYcIW7OjGbxmTDY17PDHfiBLqi9ggtm/oLL4eAagsNAgQIDAQABo0IwQDAd +BgNVHQ4EFgQUvYiHyY/2pAoLquvF/pEjnatKijIwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQF +MAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAB18+kmPNOm3JpIWmgV050vQbTlswyb2zrgxvMTfvCr4 +N5EY3ATIZJkrGG2AA1nJrvhY0D7twyOfaTyGOBye79oneNGEN3GKPEs5z35FBtYt2IpNeBLWrcLT +y9LQQfMmNkqblWwM7uXRQydmwYj3erMgbOqwaSvHIOgMA8RBBZniP+Rr+KCGgceExh/VS4ESshYh +LBOhgLJeDEoTniDYYkCrkOpkSi+sDQESeUWoL4cZaMjihccwsnX5OD+ywJO0a+IDRM5noN+J1q2M +dqMTw5RhK2vZbMEHCiIHhWyFJEapvj+LeISCfiQMnf2BN+MlqO02TpUsyZyQ2uypQjyttgI= +-----END CERTIFICATE----- + +certSIGN ROOT CA +================ +-----BEGIN CERTIFICATE----- +MIIDODCCAiCgAwIBAgIGIAYFFnACMA0GCSqGSIb3DQEBBQUAMDsxCzAJBgNVBAYTAlJPMREwDwYD +VQQKEwhjZXJ0U0lHTjEZMBcGA1UECxMQY2VydFNJR04gUk9PVCBDQTAeFw0wNjA3MDQxNzIwMDRa +Fw0zMTA3MDQxNzIwMDRaMDsxCzAJBgNVBAYTAlJPMREwDwYDVQQKEwhj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+ +ApplicationCA - Japanese Government +=================================== +-----BEGIN CERTIFICATE----- +MIIDoDCCAoigAwIBAgIBMTANBgkqhkiG9w0BAQUFADBDMQswCQYDVQQGEwJKUDEcMBoGA1UEChMT +SmFwYW5lc2UgR292ZXJubWVudDEWMBQGA1UECxMNQXBwbGljYXRpb25DQTAeFw0wNzEyMTIxNTAw +MDBaFw0xNzEyMTIxNTAwMDBaMEMxCzAJBgNVBAYTAkpQMRwwGgYDVQQKExNKYXBhbmVzZSBHb3Zl +cm5tZW50MRYwFAYDVQQLEw1BcHBsaWNhdGlvbkNBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB +CgKCAQEAp23gdE6Hj6UG3mii24aZS2QNcfAKBZuOquHMLtJqO8F6tJdhjYq+xpqcBrSGUeQ3DnR4 +fl+Kf5Sk10cI/VBaVuRorChzoHvpfxiSQE8tnfWuREhzNgaeZCw7NCPbXCbkcXmP1G55IrmTwcrN +wVbtiGrXoDkhBFcsovW8R0FPXjQilbUfKW1eSvNNcr5BViCH/OlQR9cwFO5cjFW6WY2H/CPek9AE +jP3vbb3QesmlOmpyM8ZKDQUXKi17safY1vC+9D/qDihtQWEjdnjDuGWk81quzMKq2edY3rZ+nYVu +nyoKb58DKTCXKB28t89UKU5RMfkntigm/qJj5kEW8DOYRwIDAQABo4GeMIGbMB0GA1UdDgQWBBRU +WssmP3HMlEYNllPqa0jQk/5CdTAOBgNVHQ8BAf8EBAMCAQYwWQYDVR0RBFIwUKROMEwxCzAJBgNV +BAYTAkpQMRgwFgYDVQQKDA/ml6XmnKzlm73mlL/lupwxIzAhBgNVBAsMGuOCouODl+ODquOCseOD +vOOCt+ODp+ODs0NBMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBADlqRHZ3ODrs +o2dGD/mLBqj7apAxzn7s2tGJfHrrLgy9mTLnsCTWw//1sogJhyzjVOGjprIIC8CFqMjSnHH2HZ9g +/DgzE+Ge3Atf2hZQKXsvcJEPmbo0NI2VdMV+eKlmXb3KIXdCEKxmJj3ekav9FfBv7WxfEPjzFvYD +io+nEhEMy/0/ecGc/WLuo89UDNErXxc+4z6/wCs+CZv+iKZ+tJIX/COUgb1up8WMwusRRdv4QcmW +dupwX3kSa+SjB1oF7ydJzyGfikwJcGapJsErEU4z0g781mzSDjJkaP+tBXhfAx2o45CsJOAPQKdL +rosot4LKGAfmt1t06SAZf7IbiVQ= +-----END CERTIFICATE----- + +GeoTrust Primary Certification Authority - G3 +============================================= +-----BEGIN CERTIFICATE----- +MIID/jCCAuagAwIBAgIQFaxulBmyeUtB9iepwxgPHzANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UE +BhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsTMChjKSAyMDA4IEdlb1RydXN0 +IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE2MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFy +eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEczMB4XDTA4MDQwMjAwMDAwMFoXDTM3MTIwMTIz +NTk1OVowgZgxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAo +YykgMjAwOCBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0BgNVBAMT +LUdlb1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBANziXmJYHTNXOTIz+uvLh4yn1ErdBojqZI4xmKU4kB6Yzy5j +K/BGvESyiaHAKAxJcCGVn2TAppMSAmUmhsalifD614SgcK9PGpc/BkTVyetyEH3kMSj7HGHmKAdE +c5IiaacDiGydY8hS2pgn5whMcD60yRLBxWeDXTPzAxHsatBT4tG6NmCUgLthY2xbF37fQJQeqw3C +IShwiP/WJmxsYAQlTlV+fe+/lEjetx3dcI0FX4ilm/LC7urRQEFtYjgdVgbFA0dRIBn8exALDmKu +dlW/X3e+PkkBUz2YJQN2JFodtNuJ6nnltrM7P7pMKEF/BqxqjsHQ9gUdfeZChuOl1UcCAwEAAaNC +MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMR5yo6hTgMdHNxr +2zFblD4/MH8tMA0GCSqGSIb3DQEBCwUAA4IBAQAtxRPPVoB7eni9n64smefv2t+UXglpp+duaIy9 +cr5HqQ6XErhK8WTTOd8lNNTBzU6B8A8ExCSzNJbGpqow32hhc9f5joWJ7w5elShKKiePEI4ufIbE +Ap7aDHdlDkQNkv39sxY2+hENHYwOB4lqKVb3cvTdFZx3NWZXqxNT2I7BQMXXExZacse3aQHEerGD +AWh9jUGhlBjBJVz88P6DAod8DQ3PLghcSkANPuyBYeYk28rgDi0Hsj5W3I31QYUHSJsMC8tJP33s +t/3LjWeJGqvtux6jAAgIFyqCXDFdRootD4abdNlF+9RAsXqqaC2Gspki4cErx5z481+oghLrGREt +-----END CERTIFICATE----- + +thawte Primary Root CA - G2 +=========================== +-----BEGIN CERTIFICATE----- +MIICiDCCAg2gAwIBAgIQNfwmXNmET8k9Jj1Xm67XVjAKBggqhkjOPQQDAzCBhDELMAkGA1UEBhMC +VVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjE4MDYGA1UECxMvKGMpIDIwMDcgdGhhd3RlLCBJbmMu +IC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxJDAiBgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3Qg +Q0EgLSBHMjAeFw0wNzExMDUwMDAwMDBaFw0zODAxMTgyMzU5NTlaMIGEMQswCQYDVQQGEwJVUzEV +MBMGA1UEChMMdGhhd3RlLCBJbmMuMTgwNgYDVQQLEy8oYykgMjAwNyB0aGF3dGUsIEluYy4gLSBG +b3IgYXV0aG9yaXplZCB1c2Ugb25seTEkMCIGA1UEAxMbdGhhd3RlIFByaW1hcnkgUm9vdCBDQSAt +IEcyMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEotWcgnuVnfFSeIf+iha/BebfowJPDQfGAFG6DAJS +LSKkQjnE/o/qycG+1E3/n3qe4rF8mq2nhglzh9HnmuN6papu+7qzcMBniKI11KOasf2twu8x+qi5 +8/sIxpHR+ymVo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQU +mtgAMADna3+FGO6Lts6KDPgR4bswCgYIKoZIzj0EAwMDaQAwZgIxAN344FdHW6fmCsO99YCKlzUN +G4k8VIZ3KMqh9HneteY4sPBlcIx/AlTCv//YoT7ZzwIxAMSNlPzcU9LcnXgWHxUzI1NS41oxXZ3K +rr0TKUQNJ1uo52icEvdYPy5yAlejj6EULg== +-----END CERTIFICATE----- + +thawte Primary Root CA - G3 +=========================== +-----BEGIN CERTIFICATE----- +MIIEKjCCAxKgAwIBAgIQYAGXt0an6rS0mtZLL/eQ+zANBgkqhkiG9w0BAQsFADCBrjELMAkGA1UE +BhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2 +aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIwMDggdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhv +cml6ZWQgdXNlIG9ubHkxJDAiBgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EgLSBHMzAeFw0w +ODA0MDIwMDAwMDBaFw0zNzEyMDEyMzU5NTlaMIGuMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMdGhh +d3RlLCBJbmMuMSgwJgYDVQQLEx9DZXJ0aWZpY2F0aW9uIFNlcnZpY2VzIERpdmlzaW9uMTgwNgYD +VQQLEy8oYykgMjAwOCB0aGF3dGUsIEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTEkMCIG +A1UEAxMbdGhhd3RlIFByaW1hcnkgUm9vdCBDQSAtIEczMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A +MIIBCgKCAQEAsr8nLPvb2FvdeHsbnndmgcs+vHyu86YnmjSjaDFxODNi5PNxZnmxqWWjpYvVj2At +P0LMqmsywCPLLEHd5N/8YZzic7IilRFDGF/Eth9XbAoFWCLINkw6fKXRz4aviKdEAhN0cXMKQlkC ++BsUa0Lfb1+6a4KinVvnSr0eAXLbS3ToO39/fR8EtCab4LRarEc9VbjXsCZSKAExQGbY2SS99irY +7CFJXJv2eul/VTV+lmuNk5Mny5K76qxAwJ/C+IDPXfRa3M50hqY+bAtTyr2SzhkGcuYMXDhpxwTW +vGzOW/b3aJzcJRVIiKHpqfiYnODz1TEoYRFsZ5aNOZnLwkUkOQIDAQABo0IwQDAPBgNVHRMBAf8E +BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUrWyqlGCc7eT/+j4KdCtjA/e2Wb8wDQYJ +KoZIhvcNAQELBQADggEBABpA2JVlrAmSicY59BDlqQ5mU1143vokkbvnRFHfxhY0Cu9qRFHqKweK +A3rD6z8KLFIWoCtDuSWQP3CpMyVtRRooOyfPqsMpQhvfO0zAMzRbQYi/aytlryjvsvXDqmbOe1bu +t8jLZ8HJnBoYuMTDSQPxYA5QzUbF83d597YV4Djbxy8ooAw/dyZ02SUS2jHaGh7cKUGRIjxpp7sC +8rZcJwOJ9Abqm+RyguOhCcHpABnTPtRwa7pxpqpYrvS76Wy274fMm7v/OeZWYdMKp8RcTGB7BXcm +er/YB1IsYvdwY9k5vG8cwnncdimvzsUsZAReiDZuMdRAGmI0Nj81Aa6sY6A= +-----END CERTIFICATE----- + +GeoTrust Primary Certification Authority - G2 +============================================= +-----BEGIN CERTIFICATE----- +MIICrjCCAjWgAwIBAgIQPLL0SAoA4v7rJDteYD7DazAKBggqhkjOPQQDAzCBmDELMAkGA1UEBhMC +VVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsTMChjKSAyMDA3IEdlb1RydXN0IElu +Yy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE2MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFyeSBD +ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMB4XDTA3MTEwNTAwMDAwMFoXDTM4MDExODIzNTk1 +OVowgZgxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAoYykg +MjAwNyBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0BgNVBAMTLUdl +b1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMjB2MBAGByqGSM49AgEG +BSuBBAAiA2IABBWx6P0DFUPlrOuHNxFi79KDNlJ9RVcLSo17VDs6bl8VAsBQps8lL33KSLjHUGMc +KiEIfJo22Av+0SbFWDEwKCXzXV2juLaltJLtbCyf691DiaI8S0iRHVDsJt/WYC69IaNCMEAwDwYD +VR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBVfNVdRVfslsq0DafwBo/q+ +EVXVMAoGCCqGSM49BAMDA2cAMGQCMGSWWaboCd6LuvpaiIjwH5HTRqjySkwCY/tsXzjbLkGTqQ7m +ndwxHLKgpxgceeHHNgIwOlavmnRs9vuD4DPTCF+hnMJbn0bWtsuRBmOiBuczrD6ogRLQy7rQkgu2 +npaqBA+K +-----END CERTIFICATE----- + +VeriSign Universal Root Certification Authority +=============================================== +-----BEGIN CERTIFICATE----- +MIIEuTCCA6GgAwIBAgIQQBrEZCGzEyEDDrvkEhrFHTANBgkqhkiG9w0BAQsFADCBvTELMAkGA1UE +BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO +ZXR3b3JrM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B0GA1Ud +DgQWBBS2d/ppSEefUxLVwuoHMnYH0ZcHGTANBgkqhkiG9w0BAQsFAAOCAQEASvj4sAPmLGd75JR3 +Y8xuTPl9Dg3cyLk1uXBPY/ok+myDjEedO2Pzmvl2MpWRsXe8rJq+seQxIcaBlVZaDrHC1LGmWazx +Y8u4TB1ZkErvkBYoH1quEPuBUDgMbMzxPcP1Y+Oz4yHJJDnp/RVmRvQbEdBNc6N9Rvk97ahfYtTx +P/jgdFcrGJ2BtMQo2pSXpXDrrB2+BxHw1dvd5Yzw1TKwg+ZX4o+/vqGqvz0dtdQ46tewXDpPaj+P +wGZsY6rp2aQW9IHRlRQOfc2VNNnSj3BzgXucfr2YYdhFh5iQxeuGMMY1v/D/w1WIg0vvBZIGcfK4 +mJO37M2CYfE45k+XmCpajQ== +-----END CERTIFICATE----- + +VeriSign Class 3 Public Primary Certification Authority - G4 +============================================================ +-----BEGIN CERTIFICATE----- +MIIDhDCCAwqgAwIBAgIQL4D+I4wOIg9IZxIokYesszAKBggqhkjOPQQDAzCByjELMAkGA1UEBhMC +VVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3 +b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVz +ZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmlj +YXRpb24gQXV0aG9yaXR5IC0gRzQwHhcNMDcxMTA1MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCByjEL +MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBU +cnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRo +b3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5 +IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzQwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAASnVnp8 +Utpkmw4tXNherJI9/gHmGUo9FANL+mAnINmDiWn6VMaaGF5VKmTeBvaNSjutEDxlPZCIBIngMGGz +rl0Bp3vefLK+ymVhAIau2o970ImtTR1ZmkGxvEeA3J5iw/mjgbIwga8wDwYDVR0TAQH/BAUwAwEB +/zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmMCEw +HzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVyaXNpZ24u +Y29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFLMWkf3upm7ktS5Jj4d4gYDs5bG1MAoGCCqGSM49BAMD +A2gAMGUCMGYhDBgmYFo4e1ZC4Kf8NoRRkSAsdk1DPcQdhCPQrNZ8NQbOzWm9kA3bbEhCHQ6qQgIx +AJw9SDkjOVgaFRJZap7v1VmyHVIsmXHNxynfGyphe3HR3vPA5Q06Sqotp9iGKt0uEA== +-----END CERTIFICATE----- + +NetLock Arany (Class Gold) Főtanúsítvány +======================================== +-----BEGIN CERTIFICATE----- +MIIEFTCCAv2gAwIBAgIGSUEs5AAQMA0GCSqGSIb3DQEBCwUAMIGnMQswCQYDVQQGEwJIVTERMA8G +A1UEBwwIQnVkYXBlc3QxFTATBgNVBAoMDE5ldExvY2sgS2Z0LjE3MDUGA1UECwwuVGFuw7pzw610 +dsOhbnlraWFkw7NrIChDZXJ0aWZpY2F0aW9uIFNlcnZpY2VzKTE1MDMGA1UEAwwsTmV0TG9jayBB +cmFueSAoQ2xhc3MgR29sZCkgRsWRdGFuw7pzw610dsOhbnkwHhcNMDgxMjExMTUwODIxWhcNMjgx +MjA2MTUwODIxWjCBpzEL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YNkbQu +dZWAUWpLMKawYqGT8ZvYzsRjdT9ZR7E= +-----END CERTIFICATE----- + +Staat der Nederlanden Root CA - G2 +================================== +-----BEGIN CERTIFICATE----- +MIIFyjCCA7KgAwIBAgIEAJiWjDANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJOTDEeMBwGA1UE +CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSswKQYDVQQDDCJTdGFhdCBkZXIgTmVkZXJsYW5kZW4g +Um9vdCBDQSAtIEcyMB4XDTA4MDMyNjExMTgxN1oXDTIwMDMyNTExMDMxMFowWjELMAkGA1UEBhMC +TkwxHjAcBgNVBAoMFVN0YWF0IGRlciBOZWRlcmxhbmRlbjErMCkGA1UEAwwiU3RhYXQgZGVyIE5l +ZGVybGFuZGVuIFJvb3QgQ0EgLSBHMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMVZ +5291qj5LnLW4rJ4L5PnZyqtdj7U5EILXr1HgO+EASGrP2uEGQxGZqhQlEq0i6ABtQ8SpuOUfiUtn +vWFI7/3S4GCI5bkYYCjDdyutsDeqN95kWSpGV+RLufg3fNU254DBtvPUZ5uW6M7XxgpT0GtJlvOj +CwV3SPcl5XCsMBQgJeN/dVrlSPhOewMHBPqCYYdu8DvEpMfQ9XQ+pV0aCPKbJdL2rAQmPlU6Yiil +e7Iwr/g3wtG61jj99O9JMDeZJiFIhQGp5Rbn3JBV3w/oOM2ZNyFPXfUib2rFEhZgF1XyZWampzCR +OME4HYYEhLoaJXhena/MUGDWE4dS7WMfbWV9whUYdMrhfmQpjHLYFhN9C0lK8SgbIHRrxT3dsKpI +CT0ugpTNGmXZK4iambwYfp/ufWZ8Pr2UuIHOzZgweMFvZ9C+X+Bo7d7iscksWXiSqt8rYGPy5V65 +48r6f1CGPqI0GAwJaCgRHOThuVw+R7oyPxjMW4T182t0xHJ04eOLoEq9jWYv6q012iDTiIJh8BIi +trzQ1aTsr1SIJSQ8p22xcik/Plemf1WvbibG/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post Root CA 1 +======================= +-----BEGIN CERTIFICATE----- +MIIDMDCCAhigAwIBAgICA+gwDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCSEsxFjAUBgNVBAoT +DUhvbmdrb25nIFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3QgUm9vdCBDQSAxMB4XDTAzMDUx +NTA1MTMxNFoXDTIzMDUxNTA0NTIyOVowRzELMAkGA1UEBhMCSEsxFjAUBgNVBAoTDUhvbmdrb25n +IFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3QgUm9vdCBDQSAxMIIBIjANBgkqhkiG9w0BAQEF +AAOCAQ8AMIIBCgKCAQEArP84tulmAknjorThkPlAj3n54r15/gK97iSSHSL22oVyaf7XPwnU3ZG1 +ApzQjVrhVcNQhrkpJsLj2aDxaQMoIIBFIi1WpztUlVYiWR8o3x8gPW2iNr4joLFutbEnPzlTCeqr +auh0ssJlXI6/fMN4hM2eFvz1Lk8gKgifd/PFHsSaUmYeSF7jEAaPIpjhZY4bXSNmO7ilMlHIhqqh +qZ5/dpTCpmy3QfDVyAY45tQM4vM7TG1QjMSDJ8EThFk9nnV0ttgCXjqQesBCNnLsak3c78QA3xMY +V18meMjWCnl3v/evt3a5pQuEF10Q6m/hq5URX208o1xNg1vysxmKgIsLhwIDAQABoyYwJDASBgNV +HRMBAf8ECDAGAQH/AgEDMA4GA1UdDwEB/wQEAwIBxjANBgkqhkiG9w0BAQUFAAOCAQEADkbVPK7i +h9legYsCmEEIjEy82tvuJxuC52pF7BaLT4Wg87JwvVqWuspube5Gi27nKi6Wsxkz67SfqLI37pio +l7Yutmcn1KZJ/RyTZXaeQi/cImyaT/JaFTmxcdcrUehtHJjA2Sr0oYJ71clBoiMBdDhViw+5Lmei +IAQ32pwL0xch4I+XeTRvhEgCIDMb5jREn5Fw9IBehEPCKdJsEhTkYY2sEJCehFC78JZvRZ+K88ps +T/oROhUVRsPNH4NbLUES7VBnQRM9IauUiqpOfMGx+6fWtScvl6tu4B3i0RwsH0Ti/L6RoZz71ilT +c4afU9hDDl3WY4JxHYB0yvbiAmvZWg== +-----END CERTIFICATE----- + +SecureSign RootCA11 +=================== +-----BEGIN CERTIFICATE----- +MIIDbTCCAlWgAwIBAgIBATANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQGEwJKUDErMCkGA1UEChMi +SmFwYW4gQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcywgSW5jLjEcMBoGA1UEAxMTU2VjdXJlU2lnbiBS +b290Q0ExMTAeFw0wOTA0MDgwNDU2NDdaFw0yOTA0MDgwNDU2NDdaMFgxCzAJBgNVBAYTAkpQMSsw +KQYDVQQKEyJKYXBhbiBDZXJ0aWZpY2F0aW9uIFNlcnZpY2VzLCBJbmMuMRwwGgYDVQQDExNTZWN1 +cmVTaWduIFJvb3RDQTExMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA/XeqpRyQBTvL +TJszi1oURaTnkBbR31fSIRCkF/3frNYfp+TbfPfs37gD2pRY/V1yfIw/XwFndBWW4wI8h9uuywGO +wvNmxoVF9ALGOrVisq/6nL+k5tSAMJjzDbaTj6nU2DbysPyKyiyhFTOVMdrAG/LuYpmGYz+/3ZMq +g6h2uRMft85OQoWPIucuGvKVCbIFtUROd6EgvanyTgp9UK31BQ1FT0Zx/Sg+U/sE2C3XZR1KG/rP +O7AxmjVuyIsG0wCR8pQIZUyxNAYAeoni8McDWc/V1uinMrPmmECGxc0nEovMe863ETxiYAcjPitA +bpSACW22s293bzUIUPsCh8U+iQIDAQABo0IwQDAdBgNVHQ4EFgQUW/hNT7KlhtQ60vFjmqC+CfZX +t94wDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAKCh +OBZmLqdWHyGcBvod7bkixTgm2E5P7KN/ed5GIaGHd48HCJqypMWvDzKYC3xmKbabfSVSSUOrTC4r +bnpwrxYO4wJs+0LmGJ1F2FXI6D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+MCwXEGCSn1WHElkQwg9naRHMTh5+Spqtr0CodaxWkHS4oJyleW/c6RrIaQXpuvoDs3zk4E7Czp3o +tkYNbn5XOmeUwssfnHdKZ05phkOTOPu220+DkdRgfks+KzgHVZhepA== +-----END CERTIFICATE----- + +Microsec e-Szigno Root CA 2009 +============================== +-----BEGIN CERTIFICATE----- +MIIECjCCAvKgAwIBAgIJAMJ+QwRORz8ZMA0GCSqGSIb3DQEBCwUAMIGCMQswCQYDVQQGEwJIVTER +MA8GA1UEBwwIQnVkYXBlc3QxFjAUBgNVBAoMDU1pY3Jvc2VjIEx0ZC4xJzAlBgNVBAMMHk1pY3Jv +c2VjIGUtU3ppZ25vIFJvb3QgQ0EgMjAwOTEfMB0GCSqGSIb3DQEJARYQaW5mb0BlLXN6aWduby5o +dTAeFw0wOTA2MTYxMTMwMThaFw0yOTEyMzAxMTMwMThaMIGCMQswCQYDVQQGEwJIVTERMA8GA1UE +BwwIQnVkYXBlc3QxFjAUBgNVBAoMDU1pY3Jvc2VjIEx0ZC4xJzAlBgNVBAMMHk1pY3Jvc2VjIGUt +U3ppZ25vIFJvb3QgQ0EgMjAwOTEfMB0GCSqGSIb3DQEJARYQaW5mb0BlLXN6aWduby5odTCCASIw +DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOn4j/NjrdqG2KfgQvvPkd6mJviZpWNwrZuuyjNA +fW2WbqEORO7hE52UQlKavXWFdCyoDh2Tthi3jCyoz/tccbna7P7ofo/kLx2yqHWH2Leh5TvPmUpG +0IMZfcChEhyVbUr02MelTTMuhTlAdX4UfIASmFDHQWe4oIBhVKZsTh/gnQ4H6cm6M+f+wFUoLAKA +pxn1ntxVUwOXewdI/5n7N4okxFnMUBBjjqqpGrCEGob5X7uxUG6k0QrM1XF+H6cbfPVTbiJfyyvm +1HxdrtbCxkzlBQHZ7Vf8wSN5/PrIJIOV87VqUQHQd9bpEqH5GoP7ghu5sJf0dgYzQ0mg/wu1+rUC +AwEAAaOBgDB+MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTLD8bf +QkPMPcu1SCOhGnqmKrs0aDAfBgNVHSMEGDAWgBTLD8bfQkPMPcu1SCOhGnqmKrs0aDAbBgNVHREE +FDASgRBpbmZvQGUtc3ppZ25vLmh1MA0GCSqGSIb3DQEBCwUAA4IBAQDJ0Q5eLtXMs3w+y/w9/w0o +lZMEyL/azXm4Q5DwpL7v8u8hmLzU1F0G9u5C7DBsoKqpyvGvivo/C3NqPuouQH4frlRheesuCDfX +I/OMn74dseGkddug4lQUsbocKaQY9hK6ohQU4zE1yED/t+AFdlfBHFny+L/k7SViXITwfn4fs775 +tyERzAMBVnCnEJIeGzSBHq2cGsMEPO0CYdYeBvNfOofyK/FFh+U9rNHHV4S9a67c2Pm2G2JwCz02 +yULyMtd6YebS2z3PyKnJm9zbWETXbzivf3jTo60adbocwTZ8jx5tHMN1Rq41Bab2XD0h7lbwyYIi +LXpUq3DDfSJlgnCW +-----END CERTIFICATE----- + +GlobalSign Root CA - R3 +======================= +-----BEGIN CERTIFICATE----- +MIIDXzCCAkegAwIBAgILBAAAAAABIVhTCKIwDQYJKoZIhvcNAQELBQAwTDEgMB4GA1UECxMXR2xv +YmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkdsb2Jh +bFNpZ24wHhcNMDkwMzE4MTAwMDAwWhcNMjkwMzE4MTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxT +aWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2ln +bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWt +iHL8RgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsTgHeMCOFJ +0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmmKPZpO/bLyCiR5Z2KYVc3 +rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zdQQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjl +OCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZXriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2 +xmmFghcCAwEAAaNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE +FI/wS3+oLkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZURUm7 +lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMpjjM5RcOO5LlXbKr8 +EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK6fBdRoyV3XpYKBovHd7NADdBj+1E +bddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQXmcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18 +YIvDQVETI53O9zJrlAGomecsMx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7r +kpeDMdmztcpHWD9f +-----END CERTIFICATE----- + +Autoridad de Certificacion Firmaprofesional CIF A62634068 +========================================================= +-----BEGIN CERTIFICATE----- +MIIGFDCCA/ygAwIBAgIIU+w77vuySF8wDQYJKoZIhvcNAQEFBQAwUTELMAkGA1UEBhMCRVMxQjBA +BgNVBAMMOUF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2 +MjYzNDA2ODAeFw0wOTA1MjAwODM4MTVaFw0zMDEyMzEwODM4MTVaMFExCzAJBgNVBAYTAkVTMUIw +QAYDVQQDDDlBdXRvcmlkYWQgZGUgQ2VydGlmaWNhY2lvbiBGaXJtYXByb2Zlc2lvbmFs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wADgAMAAx +ADcwDQYJKoZIhvcNAQEFBQADggIBABd9oPm03cXF661LJLWhAqvdpYhKsg9VSytXjDvlMd3+xDLx +51tkljYyGOylMnfX40S2wBEqgLk9am58m9Ot/MPWo+ZkKXzR4Tgegiv/J2Wv+xYVxC5xhOW1//qk +R71kMrv2JYSiJ0L1ILDCExARzRAVukKQKtJE4ZYm6zFIEv0q2skGz3QeqUvVhyj5eTSSPi5E6PaP +T481PyWzOdxjKpBrIF/EUhJOlywqrJ2X3kjyo2bbwtKDlaZmp54lD+kLM5FlClrD2VQS3a/DTg4f +Jl4N3LON7NWBcN7STyQF82xO9UxJZo3R/9ILJUFI/lGExkKvgATP0H5kSeTy36LssUzAKh3ntLFl +osS88Zj0qnAHY7S42jtM+kAiMFsRpvAFDsYCA0irhpuF3dvd6qJ2gHN99ZwExEWN57kci57q13XR +crHedUTnQn3iV2t93Jm8PYMo6oCTjcVMZcFwgbg4/EMxsvYDNEeyrPsiBsse3RdHHF9mudMaotoR +saS8I8nkvof/uZS2+F0gStRf571oe2XyFR7SOqkt6dhrJKyXWERHrVkY8SFlcN7ONGCoQPHzPKTD +KCOM/iczQ0CgFzzr6juwcqajuUpLXhZI9LK8yIySxZ2frHI2vDSANGupi5LAuBft7HZT9SQBjLMi +6Et8Vcad+qMUu2WFbm5PEn4KPJ2V +-----END CERTIFICATE----- + +Izenpe.com +========== +-----BEGIN CERTIFICATE----- +MIIF8TCCA9mgAwIBAgIQALC3WhZIX7/hy/WL1xnmfTANBgkqhkiG9w0BAQsFADA4MQswCQYDVQQG +EwJFUzEUMBIGA1UECgwLSVpFTlBFIFMuQS4xEzARBgNVBAMMCkl6ZW5wZS5jb20wHhcNMDcxMjEz +MTMwODI4WhcNMzcxMjEzMDgyNzI1WjA4MQswCQYDVQQGEwJFUzEUMBIGA1UECgwLSVpFTlBFIFMu +QS4xEzARBgNVBAMMCkl6ZW5wZS5jb20wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDJ +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MiDrAyw6l +Fn2fuUhfGI8NYjb2zRlrrKvV9pF9rnHzP7MOeIWblaQnIUdCSnxIOvVFfLMMjlF4rJUT3sb9fbga +kEyrkgPH7UIBzg/YsfqikuFgba56awmqxinuaElnMIAkejEWOVt+8Rwu3WwJrfIxwYJOubv5vr8q +hT/AQKM6WfxZSzwoJNu0FXWuDYi6LnPAvViH5ULy617uHjAimcs30cQhbIHsvm0m5hzkQiCeR7Cs +g1lwLDXWrzY0tM07+DKo7+N4ifuNRSzanLh+QBxh5z6ikixL8s36mLYp//Pye6kfLqCTVyvehQP5 +aTfLnnhqBbTFMXiJ7HqnheG5ezzevh55hM6fcA5ZwjUukCox2eRFekGkLhObNA5me0mrZJfQRsN5 +nXJQY6aYWwa9SG3YOYNw6DXwBdGqvOPbyALqfP2C2sJbUjWumDqtujWTI6cfSN01RpiyEGjkpTHC +ClguGYEQyVB1/OpaFs4R1+7vUIgtYf8/QnMFlEPVjjxOAToZpR9GTnfQXeWBIiGH/pR9hNiTrdZo +Q0iy2+tzJOeRf1SktoA+naM8THLCV8Sg1Mw4J87VBp6iSNnpn86CcDaTmjvfliHjWbcM2pE38P1Z +WrOZyGlsQyYBNWNgVYkDOnXYukrZVP/u3oDYLdE41V4tC5h9Pmzb/CaIxw== +-----END CERTIFICATE----- + +Chambers of Commerce Root - 2008 +================================ +-----BEGIN CERTIFICATE----- +MIIHTzCCBTegAwIBAgIJAKPaQn6ksa7aMA0GCSqGSIb3DQEBBQUAMIGuMQswCQYDVQQGEwJFVTFD +MEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNv +bS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMu +QS4xKTAnBgNVBAMTIENoYW1iZXJzIG9mIENvbW1lcmNlIFJvb3QgLSAyMDA4MB4XDTA4MDgwMTEy +Mjk1MFoXDTM4MDczMT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+9AUiRg +OGcEMeyP84LG3rlV8zsxkVrctQgVrXYlCg17LofiDKYGvCYQbTed7N14jHyAxfDZd0jQ +-----END CERTIFICATE----- + +Global Chambersign Root - 2008 +============================== +-----BEGIN CERTIFICATE----- +MIIHSTCCBTGgAwIBAgIJAMnN0+nVfSPOMA0GCSqGSIb3DQEBBQUAMIGsMQswCQYDVQQGEwJFVTFD +MEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNv +bS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMu +QS4xJzAlBgNVBAMTHkdsb2JhbCBDaGFtYmVyc2lnbiBSb290IC0gMjAwODAeFw0wODA4MDExMjMx +NDBaFw0zODA3MzExMjMxNDBaMIGsMQswCQYDVQQGEwJFVTFDMEEGA1UEBxM6TWFkcmlkIChzZWUg +Y3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNvbS9hZGRyZXNzKTESMBAGA1UEBRMJ +QTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMuQS4xJzAlBgNVBAMTHkdsb2JhbCBD +aGFtYmVyc2lnbiBSb290IC0gMjAwODCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMDf +VtPkOpt2RbQT2//BthmLN0EYlVJH6xedKYiONWwGMi5HYvNJBL99RDaxccy9Wglz1dmFRP+RVyXf +XjaOcNFccUMd2drvXNL7G706tcuto8xEpw2uIRU/uXpbknXYpBI4iRmKt4DS4jJvVpyR1ogQC7N0 +ZJJ0YPP2zxhPYLIj0Mc7zmFLmY/CDNBAspjcDahOo7kKrmCgrUVSY7pmvWjg+b4aqIG7HkF4ddPB +/gBVsIdU6CeQNR1MM62X/JcumIS/LMmjv9GYERTtY/jKmIhYF5ntRQOXfjyGHoiMvvKRhI9lNNgA +TH23MRdaKXoKGCQw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dZ7LoR/xfxKxueRkf2fWIyr0uDldmOghp+G9PUIadJpwr2hsUF1Jz//7Dl3mLEfXgTpZALVza2Mg +9jFFCDkO9HB+QHBaP9BrQql0PSgvAm11cpUJjUhjxsYjV5KTXjXBjfkK9yydYhz2rXzdpjEetrHH +foUm+qRqtdpjMNHvkzeyZi99Bffnt0uYlDXA2TopwZ2yUDMdSqlapskD7+3056huirRXhOukP9Du +qqqHW2Pok+JrqNS4cnhrG+055F3Lm6qH1U9OAP7Zap88MQ8oAgF9mOinsKJknnn4SPIVqczmyETr +P3iZ8ntxPjzxmKfFGBI/5rsoM0LpRQp8bfKGeS/Fghl9CYl8slR2iK7ewfPM4W7bMdaTrpmg7yVq +c5iJWzouE4gev8CSlDQb4ye3ix5vQv/n6TebUB0tovkC7stYWDpxvGjjqsGvHCgfotwjZT+B6q6Z +09gwzxMNTxXJhLynSC34MCN32EZLeW32jO06f2ARePTpm67VVMB0gNELQp/B +-----END CERTIFICATE----- + +Go Daddy Root Certificate Authority - G2 +======================================== +-----BEGIN CERTIFICATE----- +MIIDxTCCAq2gAwIBAgIBADANBgkqhkiG9w0BAQsFADCBgzELMAkGA1UEBhMCVVMxEDAOBgNVBAgT +B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAYBgNVBAoTEUdvRGFkZHkuY29tLCBJbmMu +MTEwLwYDVQQDEyhHbyBEYWRkeSBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5 +MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgYMxCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6 +b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMRowGAYDVQQKExFHb0RhZGR5LmNvbSwgSW5jLjExMC8G +A1UEAxMoR28gRGFkZHkgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBAL9xYgjx+lk09xvJGKP3gElY6SKDE6bFIEMBO4Tx5oVJnyfq +9oQbTqC023CYxzIBsQU+B07u9PpPL1kwIuerGVZr4oAH/PMWdYA5UXvl+TW2dE6pjYIT5LY/qQOD ++qK+ihVqf94Lw7YZFAXK6sOoBJQ7RnwyDfMAZiLIjWltNowRGLfTshxgtDj6AozO091GB94KPutd +fMh8+7ArU6SSYmlRJQVhGkSBjCypQ5Yj36w6gZoOKcUcqeldHraenjAKOc7xiID7S13MMuyFYkMl +NAJWJwGRtDtwKj9useiciAF9n9T521NtYJ2/LOdYq7hfRvzOxBsDPAnrSTFcaUaz4EcCAwEAAaNC +MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFDqahQcQZyi27/a9 +BUFuIMGU2g/eMA0GCSqGSIb3DQEBCwUAA4IBAQCZ21151fmXWWcDYfF+OwYxdS2hII5PZYe096ac +vNjpL9DbWu7PdIxztDhC2gV7+AJ1uP2lsdeu9tfeE8tTEH6KRtGX+rcuKxGrkLAngPnon1rpN5+r +5N9ss4UXnT3ZJE95kTXWXwTrgIOrmgIttRD02JDHBHNA7XIloKmf7J6raBKZV8aPEjoJpL1E/QYV +N8Gb5DKj7Tjo2GTzLH4U/ALqn83/B2gX2yKQOC16jdFU8WnjXzPKej17CuPKf1855eJ1usV2GDPO +LPAvTK33sefOT6jEm0pUBsV/fdUID+Ic/n4XuKxe9tQWskMJDE32p2u0mYRlynqI4uJEvlz36hz1 +-----END CERTIFICATE----- + +Starfield Root Certificate Authority - G2 +========================================= +-----BEGIN CERTIFICATE----- +MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBjzELMAkGA1UEBhMCVVMxEDAOBgNVBAgT +B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9s +b2dpZXMsIEluYy4xMjAwBgNVBAMTKVN0YXJmaWVsZCBSb290IENlcnRpZmljYX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9fDL1mMpYjn0q7pBZ +c2T5NnReJaH1ZgUufzkVqSr7UIuOhWn0 +-----END CERTIFICATE----- + +Starfield Services Root Certificate Authority - G2 +================================================== +-----BEGIN CERTIFICATE----- +MIID7zCCAtegAwIBAgIBADANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UEBhMCVVMxEDAOBgNVBAgT +B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9s +b2dpZXMsIEluYy4xOzA5BgNVBAMTMlN0YXJmaWVsZCBTZXJ2aWNlcyBSb290IENlcnRpZmljYXRl +IEF1dGhvcml0eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgZgxCzAJBgNV +BAYTAlVTMRAwDgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxT +dGFyZmllbGQgVGVjaG5vbG9naWVzLCBJbmMuMTswOQYDVQQDEzJTdGFyZmllbGQgU2VydmljZXMg +Um9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC +AQoCggEBANUMOsQq+U7i9b4Zl1+OiFOxHz/Lz58gE20pOsgPfTz3a3Y4Y9k2YKibXlwAgLIvWX/2 +h/klQ4bnaRtSmpDhcePYLQ1Ob/bISdm28xpWriu2dBTrz/sm4xq6HZYuajtYlIlHVv8loJNwU4Pa +hHQUw2eeBGg6345AWh1KTs9DkTvnVtYAcMtS7nt9rjrnvDH5RfbCYM8TWQIrgMw0R9+53pBlbQLP +LJGmpufehRhJfGZOozptqbXuNC66DQO4M99H67FrjSXZm86B0UVGMpZwh94CDklDhbZsc7tk6mFB +rMnUVN+HL8cisibMn1lUaJ/8viovxFUcdUBgF4UCVTmLfwUCAwEAAaNCMEAwDwYDVR0TAQH/BAUw +AwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJxfAN+qAdcwKziIorhtSpzyEZGDMA0GCSqG +SIb3DQEBCwUAA4IBAQBLNqaEd2ndOxmfZyMIbw5hyf2E3F/YNoHN2BtBLZ9g3ccaaNnRbobhiCPP +E95Dz+I0swSdHynVv/heyNXBve6SbzJ08pGCL72CQnqtKrcgfU28elUSwhXqvfdqlS5sdJ/PHLTy +xQGjhdByPq1zqwubdQxtRbeOlKyWN7Wg0I8VRw7j6IPdj/3vQQF3zCepYoUz8jcI73HPdwbeyBkd +iEDPfUYd/x7H4c7/I9vG+o1VTqkC50cRRj70/b17KSa7qWFiNyi2LSr2EIZkyXCn0q23KXB56jza +YyWf/Wi3MOxw+3WKt21gZ7IeyLnp2KhvAotnDU0mV3HaIPzBSlCNsSi6 +-----END CERTIFICATE----- + +AffirmTrust Commercial +====================== +-----BEGIN CERTIFICATE----- +MIIDTDCCAjSgAwIBAgIId3cGJyapsXwwDQYJKoZIhvcNAQELBQAwRDELMAkGA1UEBhMCVVMxFDAS +BgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBDb21tZXJjaWFsMB4XDTEw +MDEyOTE0MDYwNloXDTMwMTIzMTE0MDYwNlowRDELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmly +bVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBDb21tZXJjaWFsMIIBIjANBgkqhkiG9w0BAQEF +AAOCAQ8AMIIBCgKCAQEA9htPZwcroRX1BiLLHwGy43NFBkRJLLtJJRTWzsO3qyxPxkEylFf6Eqdb +DuKPHx6GGaeqtS25Xw2Kwq+FNXkyLbscYjfysVtKPcrNcV/pQr6U6Mje+SJIZMblq8Yrba0F8PrV +C8+a5fBQpIs7R6UjW3p6+DM/uO+Zl+MgwdYoic+U+7lF7eNAFxHUdPALMeIrJmqbTFeurCA+ukV6 +BfO9m2kVrn1OIGPENXY6BwLJN/3HR+7o8XYdcxXyl6S1yHp52UKqK39c/s4mT6NmgTWvRLpUHhww +MmWd5jyTXlBOeuM61G7MGvv50jeuJCqrVwMiKA1JdX+3KNp1v47j3A55MQIDAQABo0IwQDAdBgNV +HQ4EFgQUnZPGU4teyq8/nx4P5ZmVvCT2lI8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC +AQYwDQYJKoZIhvcNAQELBQADggEBAFis9AQOzcAN/wr91LoWXym9e2iZWEnStB03TX8nfUYGXUPG +hi4+c7ImfU+TqbbEKpqrIZcUsd6M06uJFdhrJNTxFq7YpFzUf1GO7RgBsZNjvbz4YYCanrHOQnDi +qX0GJX0nof5v7LMeJNrjS1UaADs1tDvZ110w/YETifLCBivtZ8SOyUOyXGsViQK8YvxO8rUzqrJv +0wqiUOP2O+guRMLbZjipM1ZI8W0bM40NjD9gN53Tym1+NH4Nn3J2ixufcv1SNUFFApYvHLKac0kh +sUlHRUe072o0EclNmsxZt9YCnlpOZbWUrhvfKbAW8b8Angc6F2S1BLUjIZkKlTuXfO8= +-----END CERTIFICATE----- + +AffirmTrust Networking +====================== +-----BEGIN CERTIFICATE----- +MIIDTDCCAjSgAwIBAgIIfE8EORzUmS0wDQYJKoZIhvcNAQEFBQAwRDELMAkGA1UEBhMCVVMxFDAS +BgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBOZXR3b3JraW5nMB4XDTEw +MDEyOTE0MDgyNFoXDTMwMTIzMTE0MDgyNFowRDELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmly +bVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBOZXR3b3JraW5nMIIBIjANBgkqhkiG9w0BAQEF +AAOCAQ8AMIIBCgKCAQEAtITMMxcua5Rsa2FSoOujz3mUTOWUgJnLVWREZY9nZOIG41w3SfYvm4SE +Hi3yYJ0wTsyEheIszx6e/jarM3c1RNg1lho9Nuh6DtjVR6FqaYvZ/Ls6rnla1fTWcbuakCNrmreI +dIcMHl+5ni36q1Mr3Lt2Pp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mJWtSKZGc0jlzCFfemQa0W50QBuHCAKi4HEoCChTQwUHK ++4w1IX2COPKpVJEZNZOUbWo6xbLQu4mGk+ibyQ86p3q4ofB4Rvr8Ny/lioTz3/4E2aFooC8k4gmV +BtWVyuEklut89pMFu+1z6S3RdTnX5yTb2E5fQ4+e0BQ5v1VwSJlXMbSc7kqYA5YwH2AG7hsj/oFg +IxpHYoWlzBk0gG+zrBrjn/B7SK3VAdlntqlyk+otZrWyuOQ9PLLvTIzq6we/qzWaVYa8GKa1qF60 +g2xraUDTn9zxw2lrueFtCfTxqlB2Cnp9ehehVZZCmTEJ3WARjQUwfuaORtGdFNrHF+QFlozEJLUb +zxQHskD4o55BhrwE0GuWyCqANP2/7waj3VjFhT0+j/6eKeC2uAloGRwYQw== +-----END CERTIFICATE----- + +AffirmTrust Premium ECC +======================= +-----BEGIN CERTIFICATE----- +MIIB/jCCAYWgAwIBAgIIdJclisc/elQwCgYIKoZIzj0EAwMwRTELMAkGA1UEBhMCVVMxFDASBgNV +BAoMC0FmZmlybVRydXN0MSAwHgYDVQQDDBdBZmZpcm1UcnVzdCBQcmVtaXVtIEVDQzAeFw0xMDAx +MjkxNDIwMjRaFw00MDEyMzExNDIwMjRaMEUxCzAJBgNVBAYTAlVTMRQwEgYDVQQKDAtBZmZpcm1U +cnVzdDEgMB4GA1UEAwwXQWZmaXJtVHJ1c3QgUHJlbWl1bSBFQ0MwdjAQBgcqhkjOPQIBBgUrgQQA +IgNiAAQNMF4bFZ0D0KF5Nbc6PJJ6yhUczWLznCZcBz3lVPqj1swS6vQUX+iOGasvLkjmrBhDeKzQ +N8O9ss0s5kfiGuZjuD0uL3jET9v0D6RoTFVya5UdThhClXjMNzyR4ptlKymjQjBAMB0GA1UdDgQW +BBSaryl6wBE1NSZRMADDav5A1a7WPDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAK +BggqhkjOPQQDAwNnADBkAjAXCfOHiFBar8jAQr9HX/VsaobgxCd05DhT1wV/GzTjxi+zygk8N53X +57hG8f2h4nECMEJZh0PUUd+60wkyWs6Iflc9nF9Ca/UHLbXwgpP5WW+uZPpY5Yse42O+tYHNbwKM +eQ== +-----END CERTIFICATE----- + +Certum Trusted Network CA +========================= +-----BEGIN CERTIFICATE----- +MIIDuzCCAqOgAwIBAgIDBETAMA0GCSqGSIb3DQEBBQUAMH4xCzAJBgNVBAYTAlBMMSIwIAYDVQQK +ExlVbml6ZXRvIFRlY2hub2xvZ2llcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlv +biBBdXRob3JpdHkxIjAgBgNVBAMTGUNlcnR1bSBUcnVzdGVkIE5ldHdvcmsgQ0EwHhcNMDgxMDIy +MTIwNzM3WhcNMjkxMjMxMTIwNzM3WjB+MQswCQYDVQQGEwJQTDEiMCAGA1UEChMZVW5pemV0byBU +ZWNobm9sb2dpZXMgUy5BLjEnMCUGA1UECxMeQ2VydHVtIENlcnRpZmljYXRpb24gQXV0aG9yaXR5 +MSIwIAYDVQQDExlDZXJ0dW0gVHJ1c3RlZCBOZXR3b3JrIENBMIIBIjANBgkqhkiG9w0BAQEFAAOC +AQ8AMIIBCgKCAQEA4/t9o3K6wvDJFIf1awFO4W5AB7ptJ11/91sts1rHUV+rpDKmYYe2bg+G0jAC +l/jXaVehGDldamR5xgFZrDwxSjh80gTSSyjoIF87B6LMTXPb865Px1bVWqeWifrzq2jUI4ZZJ88J +J7ysbnKDHDBy3+Ci6dLhdHUZvSqeexVUBBvXQzmtVSjF4hq79MDkrjhJM8x2hZ85RdKknvISjFH4 +fOQtf/WsX+sWn7Et0brMkUJ3TCXJkDhv2/DM+44el1k+1WBO5gUo7Ul5E0u6SNsv+XLTOcr+H9g0 +cvW0QM8xAcPs3hEtF10fuFDRXhmnad4HMyjKUJX5p1TLVIZQRan5SQIDAQABo0IwQDAPBgNVHRMB +Af8EBTADAQH/MB0GA1UdDgQWBBQIds3LB/8k9sXN7buQvOKEN0Z19zAOBgNVHQ8BAf8EBAMCAQYw +DQYJKoZIhvcNAQEFBQADggEBAKaorSLOAT2mo/9i0Eidi15ysHhE49wcrwn9I0j6vSrEuVUEtRCj +jSfeC4Jj0O7eDDd5QVsisrCaQVymcODU0HfLI9MA4GxWL+FpDQ3Zqr8hgVDZBqWo/5U30Kr+4rP1 +mS1FhIrlQgnXdAIv94nYmem8J9RHjboNRhx3zxSkHLmkMcScKHQDNP8zGSal6Q10tz6XxnboJ5aj +Zt3hrvJBW8qYVoNzcOSGGtIxQbovvi0TWnZvTuhOgQ4/WwMioBK+ZlgRSssDxLQqKi2WF+A5VLxI +03YnnZotBqbJ7DnSq9ufmgsnAjUpsUCV5/nonFWIGUbWtzT1fs45mtk48VH3Tyw= +-----END CERTIFICATE----- + +Certinomis - Autorité Racine +============================ +-----BEGIN CERTIFICATE----- +MIIFnDCCA4SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJGUjETMBEGA1UEChMK +Q2VydGlub21pczEXMBUGA1UECxMOMDAwMiA0MzM5OTg5MDMxJjAkBgNVBAMMHUNlcnRpbm9taXMg +LSBBdXRvcml0w6kgUmFjaW5lMB4XDTA4MDkxNzA4Mjg1OVoXDTI4MDkxNzA4Mjg1OVowYzELMAkG +A1UEBhMCRlIxEzARBgNVBAoTCkNlcnRpbm9taXMxFzAVBgNVBAsTDjAwMDIgNDMzOTk4OTAzMSYw +JAYDVQQDDB1DZXJ0aW5vbWlzIC0gQXV0b3JpdMOpIFJhY2luZTCCAiIwDQYJKoZIhvcNAQEBBQAD +ggIPADCCAgoCggIBAJ2Fn4bT46/HsmtuM+Cet0I0VZ35gb5j2CN2DpdUzZlMGvE5x4jYF1AMnmHa +wE5V3udauHpOd4cN5bjr+p5eex7Ezyh0x5P1FMYiKAT5kcOrJ3NqDi5N8y4oH3DfVS9O7cdxbwly +Lu3VMpfQ8Vh30WC8Tl7bmoT2R2FFK/ZQpn9qcSdIhDWerP5pqZ56XjUl+rSnSTV3lqc2W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7zdNIu0eJOqxp9YDG5ERQL1TE +qkPFMTFYvZbF6nVsmnWxTfj3l/+WFvKXTej28xH5On2KOG4Ey+HTRRWqpdEdnV1j6CTmNhTih60b +WfVEm/vXd3wfAXBioSAaosUaKPQhA+4u2cGA6rnZgtZbdsLLO7XSAPCjDuGtbkD326C00EauFddE +wk01+dIL8hf2rGbVJLJP0RyZwG71fet0BLj5TXcJ17TPBzAJ8bgAVtkXFhYKK4bfjwEZGuW7gmP/ +vgt2Fl43N+bYdJeimUV5 +-----END CERTIFICATE----- + +TWCA Root Certification Authority +================================= +-----BEGIN CERTIFICATE----- +MIIDezCCAmOgAwIBAgIBATANBgkqhkiG9w0BAQUFADBfMQswCQYDVQQGEwJUVzESMBAGA1UECgwJ +VEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NBIFJvb3QgQ2VydGlmaWNh +dGlvbiBBdXRob3JpdHkwHhcNMDgwODI4MDcyNDMzWhcNMzAxMjMxMTU1OTU5WjBfMQswCQYDVQQG +EwJUVzESMBAGA1UECgwJVEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NB +IFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK +AoIBAQCwfnK4pAOU5qfeCTiRShFAh6d8WWQUe7UREN3+v9XAu1bihSX0NXIP+FPQQeFEAcK0HMMx +QhZHhTMidrIKbw/lJVBPhYa+v5guEGcevhEFhgWQxFnQfHgQsIBct+HHK3XLfJ+utdGdIzdjp9xC +oi2SBBtQwXu4PhvJVgSLL1KbralW6cH/ralYhzC2gfeXRfwZVzsrb+RH9JlF/h3x+JejiB03HFyP +4HYlmlD4oFT/RJB2I9IyxsOrBr/8+7/zrX2SYgJbKdM1o5OaQ2RgXbL6Mv87BK9NQGr5x+PvI/1r +y+UPizgN7gr8/g+YnzAx3WxSZfmLgb4i4RxYA7qRG4kHAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIB +BjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqOFsmjd6LWvJPelSDGRjjCDWmujANBgkqhkiG +9w0BAQUFAAOCAQEAPNV3PdrfibqHDAhUaiBQkr6wQT25JmSDCi/oQMCXKCeCMErJk/9q56YAf4lC +mtYR5VPOL8zy2gXE/uJQxDqGfczafhAJO5I1KlOy/usrBdlsXebQ79NqZp4VKIV66IIArB6nCWlW +QtNoURi+VJq/REG6Sb4gumlc7rh3zc5sH62Dlhh9DrUUOYTxKOkto557HnpyWoOzeW/vtPzQCqVY +T0bf+215WfKEIlKuD8z7fDvnaspHYcN6+NOSBB+4IIThNlQWx0DeO4pz3N/GCUzf7Nr/1FNCocny +Yh0igzyXxfkZYiesZSLX0zzG5Y6yU8xJzrww/nsOM5D77dIUkR8Hrw== +-----END CERTIFICATE----- + +Security Communication RootCA2 +============================== +-----BEGIN CERTIFICATE----- +MIIDdzCCAl+gAwIBAgIBADANBgkqhkiG9w0BAQsFADBdMQswCQYDVQQGEwJKUDElMCMGA1UEChMc +U0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEnMCUGA1UECxMeU2VjdXJpdHkgQ29tbXVuaWNh +dGlvbiBSb290Q0EyMB4XDTA5MDUyOTA1MDAzOVoXDTI5MDUyOTA1MDAzOVowXTELMAkGA1UEBhMC +SlAxJTAjBgNVBAoTHFNFQ09NIFRydXN0IFN5c3RlbXMgQ08uLExURC4xJzAlBgNVBAsTHlNlY3Vy +aXR5IENvbW11bmljYXRpb24gUm9vdENBMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB +ANAVOVKxUrO6xVmCxF1SrjpDZYBLx/KWvNs2l9amZIyoXvDjChz335c9S672XewhtUGrzbl+dp++ ++T42NKA7wfYxEUV0kz1XgMX5iZnK5atq1LXaQZAQwdbWQonCv/Q4EpVMVAX3NuRFg3sUZdbcDE3R +3n4MqzvEFb46VqZab3ZpUql6uc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dldSBodHRwczovL3d3dy5jYXRjZXJ0Lm5l +dC92ZXJhcnJlbCAwDQYJKoZIhvcNAQEFBQADggEBAKBIW4IB9k1IuDlVNZyAelOZ1Vr/sXE7zDkJ +lF7W2u++AVtd0x7Y/X1PzaBB4DSTv8vihpw3kpBWHNzrKQXlxJ7HNd+KDM3FIUPpqojlNcAZQmNa +Al6kSBg6hW/cnbw/nZzBh7h6YQjpdwt/cKt63dmXLGQehb+8dJahw3oS7AwaboMMPOhyRp/7SNVe +l+axofjk70YllJyJ22k4vuxcDlbHZVHlUIiIv0LVKz3l+bqeLrPK9HOSAgu+TGbrIP65y7WZf+a2 +E/rKS03Z7lNGBjvGTq2TWoF+bCpLagVFjPIhpDGQh2xlnJ2lYJU6Un/10asIbvPuW/mIPX64b24D +5EI= +-----END CERTIFICATE----- + +Hellenic Academic and Research Institutions RootCA 2011 +======================================================= +-----BEGIN CERTIFICATE----- +MIIEMTCCAxmgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBlTELMAkGA1UEBhMCR1IxRDBCBgNVBAoT +O0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ2VydC4gQXV0aG9y +aXR5MUAwPgYDVQQDEzdIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25z +IFJvb3RDQSAyMDExMB4XDTExMTIwNjEzNDk1MloXDTMxMTIwMTEzNDk1MlowgZUxCzAJBgNVBAYT +AkdSMUQwQgYDVQQKEztIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25z +IENlcnQuIEF1dGhvcml0eTFAMD4GA1UEAxM3SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNo +IEluc3RpdHV0aW9ucyBSb290Q0EgMjAxMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB +AKlTAOMupvaO+mDYLZU++CwqVE7NuYRhlFhPjz2L5EPzdYmNUeTDN9KKiE15HrcS3UN4SoqS5tdI +1Q+kOilENbgH9mgdVc04UfCMJDGFr4PJfel3r+0ae50X+bOdOFAPplp5kYCvN66m0zH7tSYJnTxa +71HFK9+WXesyHgLacEnsbgzImjeN9/E2YEsmLIKe0HjzDQ9jpFEw4fkrJxIH2Oq9GGKYsFk3fb7u +8yBRQlqD75O6aRXxYp2fmTmCobd0LovUxQt7L/DICto9eQqakxylKHJzkUOap9FNhYS5qXSPFEDH +3N6sQWRstBmbAmNtJGSPRLIl6s5ddAxjMlyNh+UCAwEAAaOBiTCBhjAPBgNVHRMBAf8EBTADAQH/ +MAsGA1UdDwQEAwIBBjAdBgNVHQ4EFgQUppFC/RNhSiOeCKQp5dgTBCPuQSUwRwYDVR0eBEAwPqA8 +MAWCAy5ncjAFggMuZXUwBoIELmVkdTAGggQub3JnMAWBAy5ncjAFgQMuZXUwBoEELmVkdTAGgQQu +b3JnMA0GCSqGSIb3DQEBBQUAA4IBAQAf73lB4XtuP7KMhjdCSk4cNx6NZrokgclPEg8hwAOXhiVt +XdMiKahsog2p6z0GW5k6x8zDmjR/qw7IThzh+uTczQ2+vyT+bOdrwg3IBp5OjWEopmr95fZi6hg8 +TqBTnbI6nOulnJEWtk2C4AwFSKls9cz4y51JtPACpf1wA+2KIaWuE4ZJwzNzvoc7dIsXRSZMFpGD +/md9zU1jZ/rzAxKWeAaNsWftjj++n08C9bMJL/NMh98qy5V8AcysNnq/onN694/BtZqhFLKPM58N +7yLcZnuEvUUXBj08yrl3NI/K6s8/MT7jiOOASSXIl7WdmplNsDz4SgCbZN2fOUvRJ9e4 +-----END CERTIFICATE----- + +Actalis Authentication Root CA +============================== +-----BEGIN CERTIFICATE----- +MIIFuzCCA6OgAwIBAgIIVwoRl0LE48wwDQYJKoZIhvcNAQELBQAwazELMAkGA1UEBhMCSVQxDjAM +BgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlzIFMucC5BLi8wMzM1ODUyMDk2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wFoAUUtiIOsifeGbt +ifN7OHCUyQICNtAwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBCwUAA4ICAQALe3KHwGCmSUyI +WOYdiPcUZEim2FgKDk8TNd81HdTtBjHIgT5q1d07GjLukD0R0i70jsNjLiNmsGe+b7bAEzlgqqI0 +JZN1Ut6nna0Oh4lScWoWPBkdg/iaKWW+9D+a2fDzWochcYBNy+A4mz+7+uAwTc+G02UQGRjRlwKx +K3JCaKygvU5a2hi/a5iB0P2avl4VSM0RFbnAKVy06Ij3Pjaut2L9HmLecHgQHEhb2rykOLpn7VU+ +Xlff1ANATIGk0k9jpwlCCRT8AKnCgHNPLsBA2RF7SOp6AsDT6ygBJlh0wcBzIm2Tlf05fbsq4/aC +4yyXX04fkZT6/iyj2HYauE2yOE+b+h1IYHkm4vP9qdCa6HCPSXrW5b0KDtst842/6+OkfcvHlXHo +2qN8xcL4dJIEG4aspCJTQLas/kx2z/uUMsA1n3Y/buWQbqCmJqK4LL7RK4X9p2jIugErsWx0Hbhz +lefut8cl8ABMALJ+tguLHPPAUJ4lueAI3jZm/zel0btUZCzJJ7VLkn5l/9Mt4blOvH+kQSGQQXem +OR/qnuOf0GZvBeyqdn6/axag67XH/JJULysRJyU3eExRarDzzFhdFPFqSBX/wge2sY0PjlxQRrM9 +vwGYT7JZVEc+NHt4bVaTLnPqZih4zR0Uv6CPLy64Lo7yFIrM6bV8+2ydDKXhlg== +-----END CERTIFICATE----- + +Trustis FPS Root CA +=================== +-----BEGIN CERTIFICATE----- +MIIDZzCCAk+gAwIBAgIQGx+ttiD5JNM2a/fH8YygWTANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQG +EwJHQjEYMBYGA1UEChMPVHJ1c3RpcyBMaW1pdGVkMRwwGgYDVQQLExNUcnVzdGlzIEZQUyBSb290 +IENBMB4XDTAzMTIyMzEyMTQwNloXDTI0MDEyMTExMzY1NFowRTELMAkGA1UEBhMCR0IxGDAWBgNV +BAoTD1RydXN0aXMgTGltaXRlZDEcMBoGA1UECxMTVHJ1c3RpcyBGUFMgUm9vdCBDQTCCASIwDQYJ +KoZIhvcNAQEBBQADggEPADCCAQoCggEBAMVQe547NdDfxIzNjpvto8A2mfRC6qc+gIMPpqdZh8mQ +RUN+AOqGeSoDvT03mYlmt+WKVoaTnGhLaASMk5MCPjDSNzoiYYkchU59j9WvezX2fihHiTHcDnlk +H5nSW7r+f2C/revnPDgpai/lkQtV/+xvWNUtyd5MZnGPDNcE2gfmHhjjvSkCqPoc4Vu5g6hBSLwa +cY3nYuUtsuvffM/bq1rKMfFMIvMFE/eC+XN5DL7XSxzA0RU8k0Fk0ea+IxciAIleH2ulrG6nS4zt +o3Lmr2NNL4XSFDWaLk6M6jKYKIahkQlBOrTh4/L68MkKokHdqeMDx4gVOxzUGpTXn2RZEm0CAwEA +AaNTMFEwDwYDVR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBS6+nEleYtXQSUhhgtx67JkDoshZzAd +BgNVHQ4EFgQUuvpxJXmLV0ElIYYLceuyZA6LIWcwDQYJKoZIhvcNAQEFBQADggEBAH5Y//01GX2c +GE+esCu8jowU/yyg2kdbw++BLa8F6nRIW/M+TgfHbcWzk88iNVy2P3UnXwmWzaD+vkAMXBJV+JOC +yinpXj9WV4s4NvdFGkwozZ5BuO1WTISkQMi4sKUraXAEasP41BIy+Q7DsdwyhEQsb8tGD+pmQQ9P +8Vilpg0ND2HepZ5dfWWhPBfnqFVO76DH7cZEf1T1o+CP8HxVIo8ptoGj4W1OLBuAZ+ytIJ8MYmHV +l/9D7S3B2l0pKoU/rGXuhg8FjZBf3+6f9L/uHfuY5H+QK4R4EA5sSVPvFVtlRkpdr7r7OnIdzfYl +iB6XzCGcKQENZetX2fNXlrtIzYE= +-----END CERTIFICATE----- + +StartCom Certification Authority +================================ +-----BEGIN CERTIFICATE----- +MIIHhzCCBW+gAwIBAgIBLTANBgkqhkiG9w0BAQsFADB9MQswCQYDVQQGEwJJTDEWMBQGA1UEChM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EXoPBKlCcWw0bdT82AUuoVpaiF8H3VhFyAX +e2w7QSlc4axa0c2Mm+tgHRns9+Ww2vl5GKVFP0lDV9LdJNUso/2RjSe15esUBppMeyG7Oq0wBhjA +2MFrLH9ZXF2RsXAiV+uKa0hK1Q8p7MZAwC+ITGgBF3f0JBlPvfrhsiAhS90a2Cl9qrjeVOwhVYBs +HvUwyKMQ5bLmKhQxw4UtjJixhlpPiVktucf3HMiKf8CdBUrmQk9io20ppB+Fq9vlgcitKj1MXVuE +JnHEhV5xJMqlG2zYYdMa4FTbzrqpMrUi9nNBCV24F10OD5mQ1kfabwo6YigUZ4LZ8dCAWZvLMdib +D4x3TrVoivJs9iQOLWxwxXPR3hTQcY+203sC9uO41Alua551hDnmfyWl8kgAwKQB2j8= +-----END CERTIFICATE----- + +StartCom Certification Authority G2 +=================================== +-----BEGIN CERTIFICATE----- +MIIFYzCCA0ugAwIBAgIBOzANBgkqhkiG9w0BAQsFADBTMQswCQYDVQQGEwJJTDEWMBQGA1UEChMN +U3RhcnRDb20gTHRkLjEsMCoGA1UEAxMjU3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg +RzIwHhcNMTAwMTAxMDEwMDAxWhcNMzkxMjMxMjM1OTAxWjBTMQswCQYDVQQGEwJJTDEWMBQGA1UE +ChMNU3RhcnRDb20gTHRkLjEsMCoGA1UEAxMjU3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3Jp +dHkgRzIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2iTZbB7cgNr2Cu+EWIAOVeq8O +o1XJJZlKxdBWQYeQTSFgpBSHO839sj60ZwNq7eEPS8CRhXBF4EKe3ikj1AENoBB5uNsDvfOpL9HG +4A/LnooUCri99lZi8cVytjIl2bLzvWXFDSxu1ZJvGIsAQRSCb0AgJnooD/Uefyf3lLE3PbfHkffi +Aez9lInhzG7TNtYKGXmu1zSCZf98Qru23QumNK9LYP5/Q0kGi4xDuFby2X8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/6ManY5Ka5lIxKVCCIc +l85bBu4M4ru8H0ST9tg4RQUh7eStqxK2A6RCLi3ECToDZ2mEmuFZkIoohdVddLHRDiBYmxOlsGOm +7XtH/UVVMKTumtTm4ofvmMkyghEpIrwACjFeLQ/Ajulrso8uBtjRkcfGEvRM/TAXw8HaOFvjqerm +obp573PYtlNXLfbQ4ddI +-----END CERTIFICATE----- + +Buypass Class 2 Root CA +======================= +-----BEGIN CERTIFICATE----- +MIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU +QnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3MgQ2xhc3MgMiBSb290IENBMB4X +DTEwMTAyNjA4MzgwM1oXDTQwMTAyNjA4MzgwM1owTjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1 +eXBhc3MgQVMtOTgzMTYzMzI3MSAwHgYDVQQDDBdCdXlwYXNzIENsYXNzIDIgUm9vdCBDQTCCAiIw +DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANfHXvfBB9R3+0Mh9PT1aeTuMgHbo4Yf5FkNuud1 +g1Lr6hxhFUi7HQfKjK6w3Jad6sNgkoaCKHOcVgb/S2TwDCo3SbXlzwx87vFKu3MwZfPVL4O2fuPn +9Z6rYPnT8Z2SdIrkHJasW4DptfQxh6NR/Md+oW+OU3fUl8FVM5I+GC911K2GScuVr1QGbNgGE41b +/+EmGVnAJLqBcXmQRFBoJJRfuLMR8SlBYaNByyM21cHxMlAQTn/0hpPshNOOvEu/XAFOBz3cFIqU +CqTqc/sLUegTBxj6DvEr0VQVfTzh97QZQmdiXnfgolXsttlpF9U6r0TtSsWe5HonfOV116rLJeff +awrbD02TTqigzXsu8lkBarcNuAeBfos4GzjmCleZPe4h6KP1DBbdi+w0jpwqHAAVF41og9JwnxgI +zRFo1clrUs3ERo/ctfPYV3Me6ZQ5BL/T3jjetFPsaRyifsSP5BtwrfKi+fv3FmRmaZ9JUaLiFRhn +Bkp/1Wy1TbMz4GHrXb7pmA8y1x1LPC5aAVKRCfLf6o3YBkBjqhHk/sM3nhRSP/TizPJhk9H9Z2vX +Uq6/aKtAQ6BXNVN48FP4YUIHZMbXb5tMOA1jrGKvNouicwoN9SG9dKpN6nIDSdvHXx1iY8f93ZHs +M+71bbRuMGjeyNYmsHVee7QHIJihdjK4TWxPAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYD +VR0OBBYEFMmAd+BikoL1RpzzuvdMw964o605MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsF +AAOCAgEAU18h9bqwOlI5LJKwbADJ784g7wbylp7ppHR/ehb8t/W2+xUbP6umwHJdELFx7rxP462s +A20ucS6vxOOto70MEae0/0qyexAQH6dXQbLArvQsWdZHEIjzIVEpMMpghq9Gqx3tOluwlN5E40EI +osHsHdb9T7bWR9AUC8rmyrV7d35BH16Dx7aMOZawP5aBQW9gkOLo+fsicdl9sz1Gv7SEr5AcD48S +aq/v7h56rgJKihcrdv6sVIkkLE8/trKnToyokZf7KcZ7XC25y2a2t6hbElGFtQl+Ynhw/qlqYLYd +DnkM/crqJIByw5c/8nerQyIKx+u2DISCLIBrQYoIwOula9+ZEsuK1V6ADJHgJgg2SMX6OBE1/yWD +LfJ6v9r9jv6ly0UsH8SIU653DtmadsWOLB2jutXsMq7Aqqz30XpN69QH4kj3Io6wpJ9qzo6ysmD0 +oyLQI+uUWnpp3Q+/QFesa1lQ2aOZ4W7+jQF5JyMV3pKdewlNWudLSDBaGOYKbeaP4NK75t98biGC +wWg5TbSYWGZizEqQXsP6JwSxeRV0mcy+rSDeJmAc61ZRpqPq5KM/p/9h3PFaTWwyI0PurKju7koS +CTxdccK+efrCh2gdC/1cacwG0Jp9VJkqyTkaGa9LKkPzY11aWOIv4x3kqdbQCtCev9eBCfHJxyYN +rJgWVqA= +-----END CERTIFICATE----- + +Buypass Class 3 Root CA +======================= +-----BEGIN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UdEwEB/wQFMAMBAf8wHQYD +VR0OBBYEFEe4zf/lb+74suwvTg75JbCOPGvDMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsF +AAOCAgEAACAjQTUEkMJAYmDv4jVM1z+s4jSQuKFvdvoWFqRINyzpkMLyPPgKn9iB5btb2iUspKdV +cSQy9sgL8rxq+JOssgfCX5/bzMiKqr5qb+FJEMwx14C7u8jYog5kV+qi9cKpMRXSIGrs/CIBKM+G +uIAeqcwRpTzyFrNHnfzSgCHEy9BHcEGhyoMZCCxt8l13nIoUE9Q2HJLw5QY33KbmkJs4j1xrG0aG +Q0JfPgEHU1RdZX33inOhmlRaHylDFCfChQ+1iHsaO5S3HWCntZznKWlXWpuTekMwGwPXYshApqr8 +ZORK15FTAaggiG6cX0S5y2CBNOxv033aSF/rtJC8LakcC6wc1aJoIIAE1vyxjy+7SjENSoYc6+I2 +KSb12tjE8nVhz36udmNKekBlk4f4HoCMhuWG1o8O/FMsYOgWYRqiPkN7zTlgVGr18okmAWiDSKIz +6MkEkbIRNBE+6tBDGR8Dk5AM/1E9V/RBbuHLoL7ryWPNbczk+DaqaJ3tvV2XcEQNtg413OEMXbug +UZTLfhbrES+jkkXITHHZvMmZUldGL1DPvTVp9D0VzgalLA8+9oG6lLvDu79leNKGef9JOxqDDPDe +eOzI8k1MGt6CKfjBWtrt7uYnXuhF0J0cUahoq0Tj0Itq4/g7u9xN12TyUb7mqqta6THuBrxzvxNi +Cp/HuZc= +-----END CERTIFICATE----- + +T-TeleSec GlobalRoot Class 3 +============================ +-----BEGIN CERTIFICATE----- +MIIDwzCCAqugAwIBAgIBATANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoM +IlQtU3lzdGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBU +cnVzdCBDZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYX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o7PHi4b6HQDWSieB4pTpPDpFQUWw== +-----END CERTIFICATE----- + +EE Certification Centre Root CA +=============================== +-----BEGIN CERTIFICATE----- +MIIEAzCCAuugAwIBAgIQVID5oHPtPwBMyonY43HmSjANBgkqhkiG9w0BAQUFADB1MQswCQYDVQQG +EwJFRTEiMCAGA1UECgwZQVMgU2VydGlmaXRzZWVyaW1pc2tlc2t1czEoMCYGA1UEAwwfRUUgQ2Vy +dGlmaWNhdGlvbiBDZW50cmUgUm9vdCBDQTEYMBYGCSqGSIb3DQEJARYJcGtpQHNrLmVlMCIYDzIw +MTAxMDMwMTAxMDMwWhgPMjAzMDEyMTcyMzU5NTlaMHUxCzAJBgNVBAYTAkVFMSIwIAYDVQQKDBlB +UyBTZXJ0aWZpdHNlZXJpbWlza2Vza3VzMSgwJgYDVQQDDB9FRSBDZXJ0aWZpY2F0aW9uIENlbnRy +ZSBSb290IENBMRgwFgYJKoZIhvcNAQkBFglwa2lAc2suZWUwggEiMA0GCSqGSIb3DQEBAQUAA4IB +DwAwggEKAoIBAQDIIMDs4MVLqwd4lfNE7vsLDP90jmG7sWLqI9iroWUyeuuOF0+W2Ap7kaJjbMeM +TC55v6kF/GlclY1i+blw7cNRfdCT5mzrMEvhvH2/UpvObntl8jixwKIy72KyaOBhU8E2lf/slLo2 +rpwcpzIP5Xy0xm90/XsY6KxX7QYgSzIwWFv9zajmofxwvI6Sc9uXp3whrj3B9UiHbCe9nyV0gVWw +93X2PaRka9ZP585ArQ/dMtO8ihJTmMmJ+xAdTX7Nfh9WDSFwhfYggx/2uh8Ej+p3iDXE/+pOoYtN +P2MbRMNE1CV2yreN1x5KZmTNXMWcg+HCCIia7E6j8T4cLNlsHaFLAgMBAAGjgYowgYcwDwYDVR0T +AQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBLyWj7qVhy/zQas8fElyalL1BSZ +MEUGA1UdJQQ+MDwGCCsGAQUFBwMCBggrBgEFBQcDAQYIKwYBBQUHAwMGCCsGAQUFBwMEBggrBgEF +BQcDCAYIKwYBBQUHAwkwDQYJKoZIhvcNAQEFBQADggEBAHv25MANqhlHt01Xo/6tu7Fq1Q+e2+Rj +xY6hUFaTlrg4wCQiZrxTFGGVv9DHKpY5P30osxBAIWrEr7BSdxjhlthWXePdNl4dp1BUoMUq5KqM +lIpPnTX/dqQGE5Gion0ARD9V04I8GtVbvFZMIi5GQ4okQC3zErg7cBqklrkar4dBGmoYDQZPxz5u +uSlNDUmJEYcyW+ZLBMjkXOZ0c5RdFpgTlf7727FE5TpwrDdr5rMzcijJs1eg9gIWiAYLtqZLICjU +3j2LrTcFU3T+bsy8QxdxXvnFzBqpYe73dgzzcvRyrc9yAjYHR8/vGVCJYMzpJJUPwssd8m92kMfM +dcGWxZ0= +-----END CERTIFICATE----- + +TURKTRUST Certificate Services Provider Root 2007 +================================================= +-----BEGIN CERTIFICATE----- +MIIEPTCCAyWgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBvzE/MD0GA1UEAww2VMOcUktUUlVTVCBF +bGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxMQswCQYDVQQGEwJUUjEP +MA0GA1UEBwwGQW5rYXJhMV4wXAYDVQQKDFVUw5xSS1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUg +QmlsacWfaW0gR8O8dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWeLiAoYykgQXJhbMSxayAyMDA3MB4X +DTA3MTIyNTE4MzcxOVoXDTE3MTIyMjE4MzcxOVowgb8xPzA9BgNVBAMMNlTDnFJLVFJVU1QgRWxl +a3Ryb25payBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsTELMAkGA1UEBhMCVFIxDzAN +BgNVBAcMBkFua2FyYTFeMFwGA1UECgxVVMOcUktUUlVTVCBCaWxnaSDEsGxldGnFn2ltIHZlIEJp +bGnFn2ltIEfDvHZlbmxpxJ9pIEhpem1ldGxlcmkgQS7Fni4gKGMpIEFyYWzEsWsgMjAwNzCCASIw +DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKu3PgqMyKVYFeaK7yc9SrToJdPNM8Ig3BnuiD9N +YvDdE3ePYakqtdTyuTFYKTsvP2qcb3N2Je40IIDu6rfwxArNK4aUyeNgsURSsloptJGXg9i3phQv +KUmi8wUG+7RP2qFsmmaf8EMJyupyj+sA1zU511YXRxcw9L6/P8JorzZAwan0qafoEGsIiveGHtya +KhUG9qPw9ODHFNRRf8+0222vR5YXm3dx2KdxnSQM9pQ/hTEST7ruToK4uT6PIzdezKKqdfcYbwnT +rqdUKDT74eA7YH2gvnmJhsifLfkKS8RQouf9eRbHegsYz85M733WB2+Y8a+xwXrXgTW4qhe04MsC +AwEAAaNCMEAwHQYDVR0OBBYEFCnFkKslrxHkYb+j/4hhkeYO/pyBMA4GA1UdDwEB/wQEAwIBBjAP +BgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQAQDdr4Ouwo0RSVgrESLFF6QSU2TJ/s +Px+EnWVUXKgWAkD6bho3hO9ynYYKVZ1WKKxmLNA6VpM0ByWtCLCPyA8JWcqdmBzlVPi5RX9ql2+I +aE1KBiY3iAIOtsbWcpnOa3faYjGkVh+uX4132l32iPwa2Z61gfAyuOOI0JzzaqC5mxRZNTZPz/OO +Xl0XrRWV2N2y1RVuAE6zS89mlOTgzbUF2mNXi+WzqtvALhyQRNsaXRik7r4EW5nVcV9VZWRi1aKb +BFmGyGJ353yCRWo9F7/snXUMrqNvWtMvmDb08PUZqxFdyKbjKlhqQgnDvZImZjINXQhVdP+MmNAK +poRq0Tl9 +-----END CERTIFICATE----- + +D-TRUST Root Class 3 CA 2 2009 +============================== +-----BEGIN CERTIFICATE----- +MIIEMzCCAxugAwIBAgIDCYPzMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNVBAYTAkRFMRUwEwYDVQQK +DAxELVRydXN0IEdtYkgxJzAlBgNVBAMMHkQtV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AF1hM5+n02/t2A7nPPKHeJeaNijnZflQGDSNiH+0LS4F9p0 +o3/U37CYAqxva2ssJSRyoWXuJVrl5jLn8t+rSfrzkGkj2wTZ51xY/GXUl77M/C4KzCUqNQT4YJEV +dT1B/yMfGchs64JTBKbkTCJNjYy6zltz7GRUUG3RnFX7acM2w4y8PIWmawomDeCTmGCufsYkl4ph +X5GOZpIJhzbNi5stPvZR1FDUWSi9g/LMKHtThm3YJohw1+qRzT65ysCQblrGXnRl11z+o+I= +-----END CERTIFICATE----- + +D-TRUST Root Class 3 CA 2 EV 2009 +================================= +-----BEGIN CERTIFICATE----- +MIIEQzCCAyugAwIBAgIDCYP0MA0GCSqGSIb3DQEBCwUAMFAxCzAJBgNVBAYTAkRFMRUwEwYDVQQK +DAxELVRydXN0IEdtYkgxKjAoBgNVBAMMIUQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgRVYgMjAw +OTAeFw0wOTExMDUwODUwNDZaFw0yOTExMDUwODUwNDZaMFAxCzAJBgNVBAYTAkRFMRUwEwYDVQQK +DAxELVRydXN0IEdtYkgxKjAoBgNVBAMMIUQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgRVYgMjAw +OTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJnxhDRwui+3MKCOvXwEz75ivJn9gpfS +egpnljgJ9hBOlSJzmY3aFS3nBfwZcyK3jpgAvDw9rKFs+9Z5JUut8Mxk2og+KbgPCdM03TP1YtHh +zRnp7hhPTFiu4h7WDFsVWtg6uMQYZB7jM7K1iXdODL/ZlGsTl28So/6ZqQTMFexgaDbtCHu39b+T +7WYxg4zGcTSHThfqr4uRjRxWQa4iN1438h3Z0S0NL2lRp75mpoo6Kr3HGrHhFPC+Oh25z1uxav60 +sUYgovseO3Dvk5h9jHOW8sXvhXCtKSb8HgQ+HKDYD8tSg2J87otTlZCpV6LqYQXY+U3EJ/pure35 +11H3a6UCAwEAAaOCASQwggEgMA8GA1UdEwEB/wQFMAMB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6LnN1c2NlcnRlLmdvYi52ZTA3BggrBgEFBQcBAQQrMCkwJwYIKwYBBQUHMAGGG2h0dHA6Ly9v +Y3NwLnN1c2NlcnRlLmdvYi52ZTBBBgNVHSAEOjA4MDYGBmCGXgMBAjAsMCoGCCsGAQUFBwIBFh5o +dHRwOi8vd3d3LnN1c2NlcnRlLmdvYi52ZS9kcGMwDQYJKoZIhvcNAQELBQADggIBACtZ6yKZu4Sq +T96QxtGGcSOeSwORR3C7wJJg7ODU523G0+1ng3dS1fLld6c2suNUvtm7CpsR72H0xpkzmfWvADmN +g7+mvTV+LFwxNG9s2/NkAZiqlCxB3RWGymspThbASfzXg0gTB1GEMVKIu4YXx2sviiCtxQuPcD4q +uxtxj7mkoP3YldmvWb8lK5jpY5MvYB7Eqvh39YtsL+1+LrVPQA3uvFd359m21D+VJzog1eWuq2w1 +n8GhHVnchIHuTQfiSLaeS5UtQbHh6N5+LwUeaO6/u5BlOsju6rEYNxxik6SgMexxbJHmpHmJWhSn +FFAFTKQAVzAswbVhltw+HoSvOULP5dAssSS830DD7X9jSr3hTxJkhpXzsOfIt+FTvZLm8wyWuevo +5pLtp4EJFAv8lXrPj9Y0TzYS3F7RNHXGRoAvlQSMx4bEqCaJqD8Zm4G7UaRKhqsLEQ+xrmNTbSjq +3TNWOByyrYDT13K9mmyZY+gAu0F2BbdbmRiKw7gSXFbPVgx96OLP7bx0R/vu0xdOIk9W/1DzLuY5 +poLWccret9W6aAjtmcz9opLLabid+Qqkpj5PkygqYWwHJgD/ll9ohri4zspV4KuxPX+Y1zMOWj3Y +eMLEYC/HYvBhkdI4sPaeVdtAgAUSM84dkpvRabP/v/GSCmE1P93+hvS84Bpxs2Km +-----END CERTIFICATE----- + +China Internet Network Information Center EV Certificates Root +============================================================== +-----BEGIN CERTIFICATE----- +MIID9zCCAt+gAwIBAgIESJ8AATANBgkqhkiG9w0BAQUFADCBijELMAkGA1UEBhMCQ04xMjAwBgNV +BAoMKUNoaW5hIEludGVybmV0IE5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VzKBxlcCxMoTFh/wqXvRdpg065lYZ1Tg3TC +rvJcwhbtkj6EPnNgiLx29CzP0H1907he0ZESEOnN3col49XtmS++dYFLJPlFRpTJKSFTnCZFqhMX +5OfNeOI5wSsSnqaeG8XmDtkx2Q== +-----END CERTIFICATE----- + +Swisscom Root EV CA 2 +===================== +-----BEGIN CERTIFICATE----- +MIIF4DCCA8igAwIBAgIRAPL6ZOJ0Y9ON/RAdBB92ylgwDQYJKoZIhvcNAQELBQAwZzELMAkGA1UE +BhMCY2gxETAPBgNVBAoTCFN3aXNzY29tMSUwIwYDVQQLExxEaWdpdGFsIENlcnRpZmljYXRlIFNl +cnZpY2VzMR4wHAYDVQQDExVTd2lzc2NvbSBSb290IEVWIENBIDIwHhcNMTEwNjI0MDk0NTA4WhcN +MzEwNjI1MDg0NTA4WjBnMQswCQYDVQQGEwJjaDERMA8GA1UEChMIU3dpc3Njb20xJTAjBgNVBAsT +HERpZ2l0YWwgQ2VydGlmaWNhdGUgU2VydmljZXMxHjAcBgNVBAMTFVN3aXNzY29tIFJvb3QgRVYg +Q0EgMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMT3HS9X6lds93BdY7BxUglgRCgz +o3pOCvrY6myLURYaVa5UJsTMRQdBTxB5f3HSek4/OE6zAMaVylvNwSqD1ycfMQ4jFrclyxy0uYAy +Xhqdk/HoPGAsp15XGVhRXrwsVgu42O+LgrQ8uMIkqBPHoCE2G3pXKSinLr9xJZDzRINpUKTk4Rti +GZQJo/PDvO/0vezbE53PnUgJUmfANykRHvvSEaeFGHR55E+FFOtSN+KxRdjMDUN/rhPSays/p8Li +qG12W0OfvrSdsyaGOx9/5fLoZigWJdBLlzin5M8J0TbDC77aO0RYjb7xnglrPvMyxyuHxuxenPaH +Za0zKcQvidm5y8kDnftslFGXEBuGCxobP/YCfnvUxVFkKJ3106yDgYjTdLRZncHrYTNaRdHLOdAG +alNgHa/2+2m8atwBz735j9m9W8E6X47aD0upm50qKGsaCn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77/FHZxOzyNEZiCcmmpl5fx7kLD977vHeTYuW +l8PVP3wbI+2ksx0WckNLIOFZfsLorSa/ovc= +-----END CERTIFICATE----- + +CA Disig Root R1 +================ +-----BEGIN CERTIFICATE----- +MIIFaTCCA1GgAwIBAgIJAMMDmu5QkG4oMA0GCSqGSIb3DQEBBQUAMFIxCzAJBgNVBAYTAlNLMRMw +EQYDVQQHEwpCcmF0aXNsYXZhMRMwEQYDVQQKEwpEaXNpZyBhLnMuMRkwFwYDVQQDExBDQSBEaXNp +ZyBSb290IFIxMB4XDTEyMDcxOTA5MDY1NloXDTQyMDcxOTA5MDY1NlowUjELMAkGA1UEBhMCU0sx +EzARBgNVBAcTCkJyYXRpc2xhdmExEzARBgNVBAoTCkRpc2lnIGEucy4xGTAXBgNVBAMTEENBIERp +c2lnIFJvb3QgUjEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCqw3j33Jijp1pedxiy +3QRkD2P9m5YJgNXoqqXinCaUOuiZc4yd39ffg/N4T0Dhf9Kn0uXKE5Pn7cZ3Xza1lK/oOI7bm+V8 +u8yN63Vz4STN5qctGS7Y1oprFOsIYgrY3LMATcMjfF9DCCMyEtztDK3AfQ+lekLZWnDZv6fXARz2 +m6uOt0qGeKAeVjGu74IKgEH3G8muqzIm1Cxr7X1r5OJeIgpFy4QxTaz+29FHuvlglzmxZcfe+5nk +CiKxLU3lSCZpq+Kq8/v8kiky6bM+TR8noc2OuRf7JT7JbvN32g0S9l3HuzYQ1VTW8+DiR0jm3hTa +YVKvJrT1cU/J19IG32PK/yHoWQbgCNWEFVP3Q+V8xaCJmGtzxmjOZd69fwX3se72V6FglcXM6pM6 +vpmumwKjrckWtc7dXpl4fho5frLABaTAgqWjR56M6ly2vGfb5ipN0gTco65F97yLnByn1tUD3AjL +LhbKXEAz6GfDLuemROoRRRw1ZS0eRWEkG4IupZ0zXWX4Qfkuy5Q/H6MMMSRE7cderVC6xkGbrPAX +ZcD4XW9boAo0PO7X6oifmPmvTiT6l7Jkdtqr9O3jw2Dv1fkCyC2fg69naQanMVXVz0tv/wQFx1is +XxYb5dKj6zHbHzMVTdDypVP1y+E9Tmgt2BLdqvLmTZtJ5cUoobqwWsagtQIDAQABo0IwQDAPBgNV +HRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUiQq0OJMa5qvum5EY+fU8PjXQ +04IwDQYJKoZIhvcNAQEFBQADggIBADKL9p1Kyb4U5YysOMo6CdQbzoaz3evUuii+Eq5FLAR0rBNR +xVgYZk2C2tXck8An4b58n1KeElb21Zyp9HWc+jcSjxyT7Ff+Bw+r1RL3D65hXlaASfX8MPWbTx9B +LxyE04nH4toCdu0Jz2zBuByDHBb6lM19oMgY0sidbvW9adRtPTXoHqJPYNcHKfyyo6SdbhWSVhlM +CrDpfNIZTUJG7L399ldb3Zh+pE3McgODWF3vkzpBemOqfDqo9ayk0d2iLbYq/J8BjuIQscTK5Gfb +VSUZP/3oNn6z4eGBrxEWi1CXYBmCAMBrTXO40RMHPuq2MU/wQppt4hF05ZSsjYSVPCGvxdpHyN85 +YmLLW1AL14FABZyb7bq2ix4Eb5YgOe2kfSnbSM6C3NQCjR0EMVrHS/BsYVLXtFHCgWzN4funodKS +ds+xDzdYpPJScWc/DIh4gInByLUfkmO+p3qKViwaqKactV2zY9ATIKHrkWzQjX2v3wvkF7mGnjix +lAxYjOBVqjtjbZqJYLhkKpLGN/R+Q0O3c+gB53+XD9fyexn9GtePyfqFa3qdnom2piiZk4hA9z7N +UaPK6u95RyG1/jLix8NRb76AdPCkwzryT+lf3xkK8jsTQ6wxpLPn6/wY1gGp8yqPNg7rtLG8t0zJ +a7+h89n07eLw4+1knj0vllJPgFOL +-----END CERTIFICATE----- + +CA Disig Root R2 +================ +-----BEGIN CERTIFICATE----- +MIIFaTCCA1GgAwIBAgIJAJK4iNuwisFjMA0GCSqGSIb3DQEBCwUAMFIxCzAJBgNVBAYTAlNLMRMw +EQYDVQQHEwpCc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KoZIhvcNAQELBQADggIBACYGXnDnZTPIgm7ZnBc6G3pmsgH2eDtpXi/q/075KMOYKmFM +tCQSin1tERT3nLXK5ryeJ45MGcipvXrA1zYObYVybqjGom32+nNjf7xueQgcnYqfGopTpti72TVV +sRHFqQOzVju5hJMiXn7B9hJSi+osZ7z+Nkz1uM/Rs0mSO9MpDpkblvdhuDvEK7Z4bLQjb/D907Je +dR+Zlais9trhxTF7+9FGs9K8Z7RiVLoJ92Owk6Ka+elSLotgEqv89WBW7xBci8QaQtyDW2QOy7W8 +1k/BfDxujRNt+3vrMNDcTa/F1balTFtxyegxvug4BkihGuLq0t4SOVga/4AOgnXmt8kHbA7v/zjx +mHHEt38OFdAlab0inSvtBfZGR6ztwPDUO+Ls7pZbkBNOHlY667DvlruWIxG68kOGdGSVyCh13x01 +utI3gzhTODY7z2zp+WsO0PsE6E9312UBeIYMej4hYvF/Y3EMyZ9E26gnonW+boE+18DrG5gPcFw0 +sorMwIUY6256s/daoQe/qUKS82Ail+QUoQebTnbAjn39pCXHR+3/H3OszMOl6W8KjptlwlCFtaOg +UxLMVYdh84GuEEZhvUQhuMI9dM9+JDX6HAcOmz0iyu8xL4ysEr3vQCj8KWefshNPZiTEUxnpHikV +7+ZtsH8tZ/3zbBt1RqPlShfppNcL +-----END CERTIFICATE----- + +ACCVRAIZ1 +========= +-----BEGIN CERTIFICATE----- +MIIH0zCCBbugAwIBAgIIXsO3pkN/pOAwDQYJKoZIhvcNAQEFBQAwQjESMBAGA1UEAwwJQUNDVlJB +SVoxMRAwDgYDVQQLDAdQS0lBQ0NWMQ0wCwYDVQQKDARBQ0NWMQswCQYDVQQGEwJFUzAeFw0xMTA1 +MDUwOTM3MzdaFw0zMDEyMzEwOTM3MzdaMEIxEjAQBgNVBAMMCUFDQ1ZSQUlaMTEQMA4GA1UECwwH +UEtJQUNDVjENMAsGA1UECgwEQUNDVjELMAkGA1UEBhMCRVMwggIiMA0GCSqGSIb3DQEBAQUAA4IC +DwAwggIKAoIC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fpoeDVNAgMB +AAGjPzA9MA8GA1UdEwEB/wQFMAMBAf8wCwYDVR0PBAQDAgEGMB0GA1UdDgQWBBTwj1k4ALP1j5qW +DNXr+nuqF+gTEjANBgkqhkiG9w0BAQUFAAOCAgEAvuRcYk4k9AwI//DTDGjkk0kiP0Qnb7tt3oNm +zqjMDfz1mgbldxSR651Be5kqhOX//CHBXfDkH1e3damhXwIm/9fH907eT/j3HEbAek9ALCI18Bmx +0GtnLLCo4MBANzX2hFxc469CeP6nyQ1Q6g2EdvZR74NTxnr/DlZJLo961gzmJ1TjTQpgcmLNkQfW +pb/ImWvtxBnmq0wROMVvMeJuScg/doAmAyYp4Db29iBT4xdwNBedY2gea+zDTYa4EzAvXUYNR0PV +G6pZDrlcjQZIrXSHX8f8MVRBE+LHIQ6e4B4N4cB7Q4WQxYpYxmUKeFfyxiMPAdkgS94P+5KFdSpc +c41teyWRyu5FrgZLAMzTsVlQ2jqIOylDRl6XK1TOU2+NSueW+r9xDkKLfP0ooNBIytrEgUy7onOT +JsjrDNYmiLbAJM+7vVvrdX3pCI6GMyx5dwlppYn8s3CQh3aP0yK7Qs69cwsgJirQmz1wHiRszYd2 +qReWt88NkvuOGKmYSdGe/mBEciG5Ge3C9THxOUiIkCR1VBatzvT4aRRkOfujuLpwQMcnHL/EVlP6 +Y2XQ8xwOFvVrhlhNGNTkDY6lnVuR3HYkUD/GKvvZt5y11ubQ2egZixVxSK236thZiNSQvxaz2ems +WWFUyBy6ysHK4bkgTI86k4mloMy/0/Z1pHWWbVY= +-----END CERTIFICATE----- + +E-Tugra Certification Authority +=============================== +-----BEGIN CERTIFICATE----- +MIIGSzCCBDOgAwIBAgIIamg+nFGby1MwDQYJKoZIhvcNAQELBQAwgbIxCzAJBgNVBAYTAlRSMQ8w +DQYDVQQHDAZBbmthcmExQDA+BgNVBAoMN0UtVHXEn3JhIEVCRyBCaWxpxZ9pbSBUZWtub2xvamls +ZXJpIHZlIEhpem1ldGxlcmkgQS7Fni4xJjAk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KBhZOqp12gKY6fgDT+gr9Oq0n7vUaDmUStVkhUXU8u3Zg5mTPj5 +dUyQ5xJwx0UCAwEAAaNjMGEwHQYDVR0OBBYEFC7j27JJ0JxUeVz6Jyr+zE7S6E5UMA8GA1UdEwEB +/wQFMAMBAf8wHwYDVR0jBBgwFoAULuPbsknQnFR5XPonKv7MTtLoTlQwDgYDVR0PAQH/BAQDAgEG +MA0GCSqGSIb3DQEBCwUAA4ICAQAFNzr0TbdF4kV1JI+2d1LoHNgQk2Xz8lkGpD4eKexd0dCrfOAK +kEh47U6YA5n+KGCRHTAduGN8qOY1tfrTYXbm1gdLymmasoR6d5NFFxWfJNCYExL/u6Au/U5Mh/jO +XKqYGwXgAEZKgoClM4so3O0409/lPun++1ndYYRP0lSWE2ETPo+Aab6TR7U1Q9Jauz1c77NCR807 +VRMGsAnb/WP2OogKmW9+4c4bU2pEZiNRCHu8W1Ki/QY3OEBhj0qWuJA3+GbHeJAAFS6LrVE1Uweo +a2iu+U48BybNCAVwzDk/dr2l02cmAYamU9JgO3xDf1WKvJUawSg5TB9D0pH0clmKuVb8P7Sd2nCc +dlqMQ1DujjByTd//SffGqWfZbawCEeI6FiWnWAjLb1NBnEg4R2gz0dfHj9R0IdTDBZB6/86WiLEV +KV0jq9BgoRJP3vQXzTLlyb/IQ639Lo7xr+L0mPoSHyDYwKcMhcWQ9DstliaxLL5Mq+ux0orJ23gT +Dx4JnW2PAJ8C2sH6H3p6CcRK5ogql5+Ji/03X186zjhZhkuvcQu02PJwT58yE+Owp1fl2tpDy4Q0 +8ijE6m30Ku/Ba3ba+367hTzSU8JNvnHhRdH9I2cNE3X7z2VnIp2usAnRCf8dNL/+I5c30jn6PQ0G +C7TbO6Orb1wdtn7os4I07QZcJA== +-----END CERTIFICATE----- + +T-TeleSec GlobalRoot Class 2 +============================ +-----BEGIN CERTIFICATE----- +MIIDwzCCAqugAwIBAgIBATANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMCREUxKzApBgNVBA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tFFHei4R40cR +3p1m0IvVVGb6g1XqfMIpiRvpb7PO4gWEyS8+eIVibslfwXhjdFjASBgMmTnrpMwatXlajRWc2BQN +9noHV8cigwUtPJslJj0Ys6lDfMjIq2SPDqO/nBudMNva0Bkuqjzx+zOAduTNrRlPBSeOE6Fuwg== +-----END CERTIFICATE----- + +Atos TrustedRoot 2011 +===================== +-----BEGIN CERTIFICATE----- +MIIDdzCCAl+gAwIBAgIIXDPLYixfszIwDQYJKoZIhvcNAQELBQAwPDEeMBwGA1UEAwwVQXRvcyBU +cnVzdGVkUm9vdCAyMDExMQ0wCwYDVQQKDARBdG9zMQswCQYDVQQGEwJERTAeFw0xMTA3MDcxNDU4 +MzBaFw0zMDEyMzEyMzU5NTlaMDwxHjAcBgNVBAMMFUF0b3MgVHJ1c3RlZFJvb3QgMjAxMTENMAsG +A1UECgwEQXRvczELMAkGA1UEBhMCREUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCV +hTuXbyo7LjvPpvMpNb7PGKw+qtn4TaA+Gke5vJrf8v7MPkfoepbCJI419KkM/IL9bcFyYie96mvr +54rMVD6QUM+A1JX76LWC1BTFtqlVJVfbsVD2sGBkWXppzwO3bw2+yj5vdHLqqjAqc2K+SZFhyBH+ +DgMq92og3AIVDV4VavzjgsG1xZ1kCWyjWZgHJ8cblithdHFsQ/H3NYkQ4J7sVaE3IqKHBAUsR320 +HLliKWYoyrfhk/WklAOZuXCFteZI6o1Q/NnezG8HDt0Lcp2AMBYHlT8oDv3FdU9T1nSatCQujgKR +z3bFmx5VdJx4IbHwLfELn8LVlhgf8FQieowHAgMBAAGjfTB7MB0GA1UdDgQWBBSnpQaxLKYJYO7R +l+lwrrw7GWzbITAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFKelBrEspglg7tGX6XCuvDsZ +bNshMBgGA1UdIAQRMA8wDQYLKwYBBAGwLQMEAQEwDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEB +Cw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AL7YsmoWTTYUrrXJ/es69nA7Mf3W1daWhpq1467HxpvMc7hU6eFbm0 +FU/DlXpY18ls6Wy58yljXrQs8C097Vpl4KlbQMJImYFtnh8GKjwStIsPm6Ik8KaN1nrgS7ZklmOV +hMJKzRwuJIczYOXD +-----END CERTIFICATE----- + +QuoVadis Root CA 2 G3 +===================== +-----BEGIN CERTIFICATE----- +MIIFYDCCA0igAwIBAgIURFc0JFuBiZs18s64KztbpybwdSgwDQYJKoZIhvcNAQELBQAwSDELMAkG +A1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJv +b3QgQ0EgMiBHMzAeFw0xMjAxMTIxODU5MzJaFw00MjAxMTIxODU5MzJaMEgxCzAJBgNVBAYTAkJN +MRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDIg +RzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQChriWyARjcV4g/Ruv5r+LrI3HimtFh +ZiFfqq8nUeVuGxbULX1QsFN3vXg6YOJkApt8hpvWGo6t/x8Vf9WVHhLL5hSEBMHfNrMWn4rjyduY +NM7YMxcoRvynyfDStNVNCXJJ+fKH46nafaF9a7I6JaltUkSs+L5u+9ymc5GQYaYDFCDy54ejiK2t +oIz/pgslUiXnFgHVy7g1gQyjO/Dh4fxaXc6AcW34Sas+O7q414AB+6XrW7PFXmAqMaCvN+ggOp+o +MiwMzAkd056OXbxMmO7FGmh77FOm6RQ1o9/NgJ8MSPsc9PG/Srj61YxxSscfrf5BmrODXfKEVu+l +V0POKa2Mq1W/xPtbAd0jIaFYAI7D0GoT7RPjEiuA3GfmlbLNHiJuKvhB1PLKFAeNilUSxmn1uIZo +L1NesNKqIcGY5jDjZ1XHm26sGahVpkUG0CM62+tlXSoREfA7T8pt9DTEceT/AFr2XK4jYIVz8eQQ +sSWu1ZK7E8EM4DnatDlXtas1qnIhO4M15zHfeiFuuDIIfR0ykRVKYnLP43ehvNURG3YBZwjgQQvD +6xVu+KQZ2aKrr+InUlYrAoosFCT5v0ICvybIxo/gbjh9Uy3l7ZizlWNof/k19N+IxWA1ksB8aRxh +lRbQ694Lrz4EEEVlWFA4r0jyWbYW8jwNkALGcC4BrTwV1wIDAQABo0IwQDAPBgNVHRMBAf8EBTAD +AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQU7edvdlq/YOxJW8ald7tyFnGbxD0wDQYJKoZI +hvcNAQELBQADggIBAJHfgD9DCX5xwvfrs4iP4VGyvD11+ShdyLyZm3tdquXK4Qr36LLTn91nMX66 +AarHakE7kNQIXLJgapDwyM4DYvmL7ftuKtwGTTwpD4kWilhMSA/ohGHqPHKmd+RCroijQ1h5fq7K +pVMNqT1wvSAZYaRsOPxDMuHBR//47PERIjKWnML2W2mWeyAMQ0GaW/ZZGYjeVYg3UQt4XAoeo0L9 +x52ID8DyeAIkVJOviYeIyUqAHerQbj5hLja7NQ4nlv1mNDthcnPxFlxHBlRJAHpYErAK74X9sbgz +dWqTHBLmYF5vHX/JHyPLhGGfHoJE+V+tYlUkmlKY7VHnoX6XOuYvHxHaU4AshZ6rNRDbIl9qxV6X +U/IyAgkwo1jwDQHVcsaxfGl7w/U2Rcxhbl5MlMVerugOXou/983g7aEOGzPuVBj+D77vfoRrQ+Nw +mNtddbINWQeFFSM51vHfqSYP1kjHs6Yi9TM3WpVHn3u6GBVv/9YUZINJ0gpnIdsPNWNgKCLjsZWD +zYWm3S8P52dSbrsvhXz1SnPnxT7AvSESBT/8twNJAlvIJebiVDj1eYeMHVOyToV7BjjHLPj4sHKN +JeV3UvQDHEimUF+IIDBu8oJDqz2XhOdT+yHBTw8imoa4WSr2Rz0ZiC3oheGe7IUIarFsNMkd7Egr +O3jtZsSOeWmD3n+M +-----END CERTIFICATE----- + +QuoVadis Root CA 3 G3 +===================== +-----BEGIN CERTIFICATE----- +MIIFYDCCA0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GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUxhfQvKjqAkPyGwaZXSuQILnXnOQwDQYJKoZI +hvcNAQELBQADggIBADRh2Va1EodVTd2jNTFGu6QHcrxfYWLopfsLN7E8trP6KZ1/AvWkyaiTt3px +KGmPc+FSkNrVvjrlt3ZqVoAh313m6Tqe5T72omnHKgqwGEfcIHB9UqM+WXzBusnIFUBhynLWcKzS +t/Ac5IYp8M7vaGPQtSCKFWGafoaYtMnCdvvMujAWzKNhxnQT5WvvoxXqA/4Ti2Tk08HS6IT7SdEQ +TXlm66r99I0xHnAUrdzeZxNMgRVhvLfZkXdxGYFgu/BYpbWcC/ePIlUnwEsBbTuZDdQdm2NnL9Du +DcpmvJRPpq3t/O5jrFc/ZSXPsoaP0Aj/uHYUbt7lJ+yreLVTubY/6CD50qi+YUbKh4yE8/nxoGib +Ih6BJpsQBJFxwAYf3KDTuVan45gtf4Od34wrnDKOMpTwATwiKp9Dwi7DmDkHOHv8XgBCH/MyJnmD +hPbl8MFREsALHgQjDFSlTC9JxUrRtm5gDWv8a4uFJGS3iQ6rJUdbPM9+Sb3H6QrG2vd+DhcI00iX +0HGS8A85PjRqHH3Y8iKuu2n0M7SmSFXRDw4m6Oy2Cy2nhTXN/VnIn9HNPlopNLk9hM6xZdRZkZFW +dSHBd575euFgndOtBBj0fOtek49TSiIp+EgrPk2GrFt/ywaZWWDYWGWVjUTR939+J399roD1B0y2 +PpxxVJkES/1Y+Zj0 +-----END CERTIFICATE----- + +DigiCert Assured ID Root G2 +=========================== +-----BEGIN CERTIFICATE----- +MIIDljCCAn6gAwIBAgIQC5McOtY5Z+pnI7/Dr5r0SzANBgkqhkiG9w0BAQsFADBlMQswCQYDVQQG +EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQw +IgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzIwHhcNMTMwODAxMTIwMDAwWhcNMzgw +MTE1MTIwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQL +ExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzIw +ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDZ5ygvUj82ckmIkzTz+GoeMVSAn61UQbVH +35ao1K+ALbkKz3X9iaV9JPrjIgwrvJUXCzO/GU1BBpAAvQxNEP4HteccbiJVMWWXvdMX0h5i89vq +bFCMP4QMls+3ywPgym2hFEwbid3tALBSfK+RbLE4E9HpEgjAALAcKxHad3A2m67OeYfcgnDmCXRw +VWmvo2ifv922ebPynXApVfSr/5Vh88lAbx3RvpO704gqu52/clpWcTs/1PPRCv4o76Pu2ZmvA9OP +YLfykqGxvYmJHzDNw6YuYjOuFgJ3RFrngQo8p0Quebg/BLxcoIfhG69Rjs3sLPr4/m3wOnyqi+Rn +lTGNAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBTO +w0q5mVXyuNtgv6l+vVa1lzan1jANBgkqhkiG9w0BAQsFAAOCAQEAyqVVjOPIQW5pJ6d1Ee88hjZv +0p3GeDgdaZaikmkuOGybfQTUiaWxMTeKySHMq2zNixya1r9I0jJmwYrA8y8678Dj1JGG0VDjA9tz +d29KOVPt3ibHtX2vK0LRdWLjSisCx1BL4GnilmwORGYQRI+tBev4eaymG+g3NJ1TyWGqolKvSnAW +hsI6yLETcDbYz+70CjTVW0z9B5yiutkBclzzTcHdDrEcDcRjvq30FPuJ7KJBDkzMyFdA0G4Dqs0M +jomZmWzwPDCvON9vvKO+KSAnq3T/EyJ43pdSVR6DtVQgA+6uwE9W3jfMw3+qBCe703e4YtsXfJwo +IhNzbM8m9Yop5w== +-----END CERTIFICATE----- + +DigiCert Assured ID Root G3 +=========================== +-----BEGIN CERTIFICATE----- +MIICRjCCAc2gAwIBAgIQC6Fa+h3foLVJRK/NJKBs7DAKBggqhkjOPQQDAzBlMQswCQYDVQQGEwJV +UzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQwIgYD +VQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzMwHhcNMTMwODAxMTIwMDAwWhcNMzgwMTE1 +MTIwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 +d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzMwdjAQ +BgcqhkjOPQIBBgUrgQQAIgNiAAQZ57ysRGXtzbg/WPuNsVepRC0FFfLvC/8QdJ+1YlJfZn4f5dwb +RXkLzMZTCp2NXQLZqVneAlr2lSoOjThKiknGvMYDOAdfVdp+CW7if17QRSAPWXYQ1qAk8C3eNvJs +KTmjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBTL0L2p4ZgF +UaFNN6KDec6NHSrkhDAKBggqhkjOPQQDAwNnADBkAjAlpIFFAmsSS3V0T8gj43DydXLefInwz5Fy +YZ5eEJJZVrmDxxDnOOlYJjZ91eQ0hjkCMHw2U/Aw5WJjOpnitqM7mzT6HtoQknFekROn3aRukswy +1vUhZscv6pZjamVFkpUBtA== +-----END CERTIFICATE----- + +DigiCert Global Root G2 +======================= +-----BEGIN CERTIFICATE----- +MIIDjjCCAnagAwIBAgIQAzrx5qcRqaC7KGSxHQn65TANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG +EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw +HgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMjAeFw0xMzA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-----BEGIN CERTIFICATE----- +MIICPzCCAcWgAwIBAgIQBVVWvPJepDU1w6QP1atFcjAKBggqhkjOPQQDAzBhMQswCQYDVQQGEwJV +UzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAwHgYD +VQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMzAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAw +MDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5k +aWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEczMHYwEAYHKoZIzj0C +AQYFK4EEACIDYgAE3afZu4q4C/sLfyHS8L6+c/MzXRq8NOrexpu80JX28MzQC7phW1FGfp4tn+6O +YwwX7Adw9c+ELkCDnOg/QW07rdOkFFk2eJ0DQ+4QE2xy3q6Ip6FrtUPOZ9wj/wMco+I+o0IwQDAP +BgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUs9tIpPmhxdiuNkHMEWNp +Yim8S8YwCgYIKoZIzj0EAwMDaAAwZQIxAK288mw/EkrRLTnDCgmXc/SINoyIJ7vmiI1Qhadj+Z4y +3maTD/HMsQmP3Wyr+mt/oAIwOWZbwmSNuJ5Q3KjVSaLtx9zRSX8XAbjIho9OjIgrqJqpisXRAL34 +VOKa5Vt8sycX +-----END CERTIFICATE----- + +DigiCert Trusted Root G4 +======================== +-----BEGIN CERTIFICATE----- +MIIFkDCCA3igAwIBAgIQBZsbV56OITLiOQe9p3d1XDANBgkqhkiG9w0BAQwFADBiMQswCQYDVQQG +EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSEw +HwYDVQQDExhEaWdpQ2VydCBUcnVzdGVkIFJvb3QgRzQwHhc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XHS9dCF4Jef98l7VNg64N1uajeeAz0JmWAjCnPv/So0M/BVoG6kQC +2nz4SNAzqfkHx5Xh9T71XXG68pWpdIhhWeO/yloTunK0jF02h+mmxTwTv97QRCbut+wucPrXnbes +5cVAWubXbHssw1abR80LzvobtCHXt2a49CUwi1wNuepnsvRtrtWhnk/Yn+knArAdBtaP4/tIEp9/ +EaEQPkxROpaw0RPxx9gmrjrKkcRpnd8BKWRRb2jaFOwIQZeQjdCygPLPwj2/kWjFgGcexGATVdVh +mVd8upUPYUk6ynW8yQqTP2cOEvIo4jEbwFcW3wh8GcF+Dx+FHgo2fFt+J7x6v+Db9NpSvd4MVHAx +kUOVyLzwPt0JfjBkUO1/AaQzZ01oT74V77D2AhGiGxMlOtzCWfHjXEa7ZywCRuoeSKbmW9m1vFGi +kpbbqsY3Iqb+zCB0oy2pLmvLwIIRIbWTee5Ehr7XHuQe+w== +-----END CERTIFICATE----- + +WoSign China +============ +-----BEGIN CERTIFICATE----- +MIIFWDCCA0CgAwIBAgIQUHBrzdgT/BtOOzNy0hFIjTANBgkqhkiG9w0BAQsFADBGMQswCQYDVQQG +EwJDTjEaMBgGA1UEChMRV29TaWduIENBIExpbWl0ZWQxGzAZBgNVBAMMEkNBIOayg+mAmuagueiv +geS5pjAeFw0wOTA4MDgwMTAwMDFaFw0zOTA4MDgwMTAwMDFaMEYxCzAJBgNVBAYTAkNOMRowGAYD +VQQKExFXb1NpZ24gQ0EgTGltaXRlZDEbMBkGA1UEAwwSQ0Eg5rKD6YCa5qC56K+B5LmmMIICIjAN +BgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA0EkhHiX8h8EqwqzbdoYGTufQdDTc7WU1/FDWiD+k +8H/rD195L4mx/bxjWDeTmzj4t1up+thxx7S8gJeNbEvxUNUqKaqoGXqW5pWOdO2XCld19AXbbQs5 +uQF/qvbW2mzmBeCkTVL829B0txGMe41P/4eDrv8FAxNXUDf+jJZSEExfv5RxadmWPgxDT74wwJ85 +dE8GRV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+nwf/Y +jj4Du9gqsPoUJbJRa4ZDhS4HIxaAjUz7tGM7zMN07RujHv41D198HRaG9Q7DlfEvr10lO1Hm13ZB +ONFLAzkopR6RctR9q5czxNM+4Gm2KHmgCY0c0f9BckgG/Jou5yD5m6Leie2uPAmvylezkolwQOQv +T8Jwg0DXJCxr5wkf09XHwQj02w47HAcLQxGEIYbpgNR12KvxAmLBsX5VYc8T1yaw15zLKYs4SgsO +kI26oQ== +-----END CERTIFICATE----- + +COMODO RSA Certification Authority +================================== +-----BEGIN CERTIFICATE----- +MIIF2DCCA8CgAwIBAgIQTKr5yttjb+Af907YWwOGnTANBgkqhkiG9w0BAQwFADCBhTELMAkGA1UE +BhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgG +A1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlv +biBBdXRob3JpdHkwHhcNMTAwMTE5MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMC +R0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UE +ChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlvbiBB +dXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCR6FSS0gpWsawNJN3Fz0Rn +dJkrN6N9I3AAcbxT38T6KhKPS38QVr2fcHK3YX/JSw8Xpz3jsARh7v8Rl8f0hj4K+j5c+ZPmNHrZ +FGvnnLOFoIJ6dq9xkNfs/Q36nGz637CC9BR++b7Epi9Pf5l/tfxnQ3K9DADWietrLNPtj5gcFKt+ +5eNu/Nio5JIk2kNrYrhV/erBvGy2i/MOjZrkm2xpmfh4SDBF1a3hDTxFYPwyllEnv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HDBw7mh3aZw4gSzQbzpgJHq +ZJx64SIDqZxubw5lT2yHh17zbqD5daWbQOhTsiedSrnAdyGN/4fy3ryM7xfft0kL0fJuMAsaDk52 +7RH89elWsn2/x20Kk4yl0MC2Hb46TpSi125sC8KKfPog88Tk5c0NqMuRkrF8hey1FGlmDoLnzc7I +LaZRfyHBNVOFBkpdn627G190 +-----END CERTIFICATE----- + +USERTrust RSA Certification Authority +===================================== +-----BEGIN CERTIFICATE----- +MIIF3jCCA8agAwIBAgIQAf1tMPyjylGoG7xkDjUDLTANBgkqhkiG9w0BAQwFADCBiDELMAkGA1UE +BhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQK +ExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNh +dGlvbiBBdXRob3JpdHkwHhcNMTAwMjAxMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBiDELMAkGA1UE +BhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQK +ExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNh +dGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCAEmUXNg7D2wiz +0KxXDXbtzSfTTK1Qg2HiqiBNCS1kCdzOiZ/MPans9s/B3PHTsdZ7NygRK0faOca8Ohm0X6a9fZ2j +Y0K2dvKpOyuR+OJv0OwWIJAJPuLodMkYtJHUYmTbf6MG8YgYapAiPLz+E/CHFHv25B+O1ORRxhFn +RghRy4YUVD+8M/5+bJz/Fp0YvVGONaanZshyZ9shZrHUm3gDwFA66Mzw3LyeTP6vBZY1H1dat//O ++T23LLb2VN3I5xI6Ta5MirdcmrS3ID3KfyI0rn47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X7mRBVXyNWQKV3WKdwrnuWih0hKWbt5DHDAff9Yk2dDLWKMGw +sAvgnEzDHNb842m1R0aBL6KCq9NjRHDEjf8tM7qtj3u1cIiuPhnPQCjY/MiQu12ZIvVS5ljFH4gx +Q+6IHdfGjjxDah2nGN59PRbxYvnKkKj9 +-----END CERTIFICATE----- + +USERTrust ECC Certification Authority +===================================== +-----BEGIN CERTIFICATE----- +MIICjzCCAhWgAwIBAgIQXIuZxVqUxdJxVt7NiYDMJjAKBggqhkjOPQQDAzCBiDELMAkGA1UEBhMC +VVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVU +aGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBFQ0MgQ2VydGlmaWNhdGlv +biBBdXRob3JpdHkwHhcNMTAwMjAxMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBiDELMAkGA1UEBhMC +VVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVU +aGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBFQ0MgQ2VydGlmaWNhdGlv +biBBdXRob3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQarFRaqfloI+d61SRvU8Za2EurxtW2 +0eZzca7dnNYMYf3boIkDuAUU7FfO7l0/4iGzzvfUinngo4N+LZfQYcTxmdwlkWOrfzCjtHDix6Ez +nPO/LlxTsV+zfTJ/ijTjeXmjQjBAMB0GA1UdDgQWBBQ64QmG1M8ZwpZ2dEl23OA1xmNjmjAOBgNV +HQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjA2Z6EWCNzklwBB +HU6+4WMBzzuqQhFkoJ2UOQIReVx7Hfpkue4WQrO/isIJxOzksU0CMQDpKmFHjFJKS04YcPbWRNZu +9YO6bVi9JNlWSOrvxKJGgYhqOkbRqZtNyWHa0V1Xahg= +-----END CERTIFICATE----- + +GlobalSign ECC Root CA - R4 +=========================== +-----BEGIN CERTIFICATE----- +MIIB4TCCAYegAwIBAgIRKjikHJYKBN5CsiilC+g0mAIwCgYIKoZIzj0EAwIwUDEkMCIGA1UECxMb +R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI0MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD +EwpHbG9iYWxTaWduMB4XDTEyMTExMzAwMDAwMFoXDTM4MDExOTAzMTQwN1owUDEkMCIGA1UECxMb +R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI0MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD +EwpHbG9iYWxTaWduMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEuMZ5049sJQ6fLjkZHAOkrprl +OQcJFspjsbmG+IpXwVfOQvpzofdlQv8ewQCybnMO/8ch5RikqtlxP6jUuc6MHaNCMEAwDgYDVR0P +AQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFFSwe61FuOJAf/sKbvu+M8k8o4TV +MAoGCCqGSM49BAMCA0gAMEUCIQDckqGgE6bPA7DmxCGXkPoUVy0D7O48027KqGx2vKLeuwIgJ6iF +JzWbVsaj8kfSt24bAgAXqmemFZHe+pTsewv4n4Q= +-----END CERTIFICATE----- + +GlobalSign ECC Root CA - R5 +=========================== +-----BEGIN CERTIFICATE----- +MIICHjCCAaSgAwIBAgIRYFlJ4CYuu1X5CneKcflK2GwwCgYIKoZIzj0EAwMwUDEkMCIGA1UECxMb +R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI1MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD +EwpHbG9iYWxTaWduMB4XDTEyMTExMzAwMDAwMFoXDTM4MDExOTAzMTQwN1owUDEkMCIGA1UECxMb +R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI1MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD +EwpHbG9iYWxTaWduMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAER0UOlvt9Xb/pOdEh+J8LttV7HpI6 +SFkc8GIxLcB6KP4ap1yztsyX50XUWPrRd21DosCHZTQKH3rd6zwzocWdTaRvQZU4f8kehOvRnkmS +h5SHDDqFSmafnVmTTZdhBoZKo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAd +BgNVHQ4EFgQUPeYpSJvqB8ohREom3m7e0oPQn1kwCgYIKoZIzj0EAwMDaAAwZQIxAOVpEslu28Yx +uglB4Zf4+/2a4n0Sye18ZNPLBSWLVtmg515dTguDnFt2KaAJJiFqYgIwcdK1j1zqO+F4CYWodZI7 +yFz9SO8NdCKoCOJuxUnOxwy8p2Fp8fc74SrL+SvzZpA3 +-----END CERTIFICATE----- + +Staat der Nederlanden Root CA - G3 +================================== +-----BEGIN CERTIFICATE----- +MIIFdDCCA1ygAwIBAgIEAJiiOTANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJOTDEeMBwGA1UE +CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSswKQYDVQQDDCJTdGFhdCBkZXIgTmVkZXJsYW5kZW4g +Um9vdCBDQSAtIEczMB4XDTEzMTExNDExMjg0MloXDTI4MTExMzIzMDAwMFowWjELMAkGA1UEBhMC +TkwxHjAcBgNVBAoMFVN0YWF0IGRlciBOZWRlcmxhbmRlbjErMCkGA1UEAwwiU3RhYXQgZGVyIE5l +ZGVybGFuZGVuIFJvb3QgQ0EgLSBHMzCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAL4y +olQPcPssXFnrbMSkUeiFKrPMSjTysF/zDsccPVMeiAho2G89rcKezIJnByeHaHE6n3WWIkYFsO2t +x1ueKt6c/DrGlaf1F2cY5y9JCAxcz+bMNO14+1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IEC8Zl3d1Sd9qBa7Ko+gE4uZbqKmxnl4mUnrzhVNXkanjvSr0r +mj1AfsbAddJu+2gw7OyLnflJNZoaLNmzlTnVHpL3prllL+U9bTpITAjc5CgSKL59NVzq4BZ+Extq +1z7XnvwtdbLBFNUjA9tbbws+eC8N3jONFrdI54OagQ97wUNNVQQXOEpR1VmiiXTTn74eS9fGbbeI +JG9gkaSChVtWQbzQRKtqE77RLFi3EjNYsjdj3BP1lB0/QFH1T/U67cjF68IeHRaVesd+QnGTbksV +tzDfqu1XhUisHWrdOWnk4Xl4vs4Fv6EM94B7IWcnMFk= +-----END CERTIFICATE----- + +Staat der Nederlanden EV Root CA +================================ +-----BEGIN CERTIFICATE----- +MIIFcDCCA1igAwIBAgIEAJiWjTANBgkqhkiG9w0BAQsFADBYMQswCQYDVQQGEwJOTDEeMBwGA1UE +CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSkwJwYDVQQDDCBTdGFhdCBkZXIgTmVkZXJsYW5kZW4g +RVYgUm9vdCBDQTAeFw0xMDEyMDgxMTE5MjlaFw0yMjEyMDgxMTEwMjhaMFgxCzAJBgNVBAYTAk5M +MR4wHAYDVQQKDBVTdGFhdCBkZXIgTmVkZXJsYW5kZW4xKTAnBgNVBAMMIFN0YWF0IGRlciBOZWRl +cmxhbmRlbiBFViBSb290IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA48d+ifkk +SzrSM4M1LGns3Amk41GoJSt5uAg94JG6hIXGhaTK5skuU6TJJB79VWZxXSzFYGgEt9nCUiY4iKTW +O0Cmws0/zZiTs1QUWJZV1VD+hq2kY39ch/aO5ieSZxeSAgMs3NZmdO3dZ//BYY1jTw+bbRcwJu+r +0h8QoPnFfxZpgQNH7R5ojXKhTbImxrpsX23Wr9GxE46prfNeaXUmGD5BKyF/7otdBwadQ8QpCiv8 +Kj6GyzyDOvnJDdrFmeK8eEEzduG/L13lpJhQDBXd4Pqcfzho0LKmeqfRMb1+ilgnQ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0IQOeLeG9QgkRQP2YGiqtDhFZK +DyAthg710tvSeopLzaXoTvFeJiUBWSOgftL2fiFX1ye8FVdMpEbB4IMeDExNH08GGeL5qPQ6gqGy +eUN51q1veieQA6TqJIc/2b3Z6fJfUEkc7uzXLg== +-----END CERTIFICATE----- + +IdenTrust Commercial Root CA 1 +============================== +-----BEGIN CERTIFICATE----- +MIIFYDCCA0igAwIBAgIQCgFCgAAAAUUjyES1AAAAAjANBgkqhkiG9w0BAQsFADBKMQswCQYDVQQG +EwJVUzESMBAGA1UEChMJSWRlblRydXN0MScwJQYDVQQDEx5JZGVuVHJ1c3QgQ29tbWVyY2lhbCBS +b290IENBIDEwHhcNMTQwMTE2MTgxMjIzWhcNMzQwMTE2MTgxMjIzWjBKMQswCQYDVQQGEwJVUzES +MBAGA1UEChMJSWRlblRydXN0MScwJQYDVQQDEx5JZGVuVHJ1c3QgQ29tbWVyY2lhbCBSb290IENB +IDEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCnUBneP5k91DNG8W9RYYKyqU+PZ4ld +hNlT3Qwo2dfw/66VQ3KZ+bVdfIrBQuExUHTRgQ18zZshq0PirK1ehm7zCYofWjK9ouuU+ehcCuz/ +mNKvcbO0U59Oh++SvL3sTzIwiEsXXlfEU8L2ApeN2WIrvyQfYo3fw7gpS0l4PJNgiCL8mdo2yMKi +1CxUAGc1bnO/AljwpN3lsKImesrgNqUZFvX9t++uP0D1bVoE/c40yiTcdCMbXTMTEl3EASX2MN0C +XZ/g1Ue9tOsbobtJSdifWwLziuQkkORiT0/Br4sOdBeo0XKIanoBScy0RnnGF7HamB4HWfp1IYVl +3ZBWzvurpWCdxJ35UrCLvYf5jysjCiN2O/cz4ckA82n5S6LgTrx+kzmEB/dEcH7+B1rlsazRGMzy +NeVJSQjKVsk9+w8YfYs7wRPCTY/JTw436R+hDmrfYi7LNQZReSzIJTj0+kuniVyc0uMNOYZKdHzV +WYfCP04MXFL0PfdSgvHqo6z9STQaKPNBiDoT7uje/5kdX7rL6B7yuVBgwDHTc+XvvqDtMwt0viAg +xGds8AgDelWAf0ZOlqf0Hj7h9tgJ4TNkK2PXMl6f+cB7D3hvl7yTmvmcEpB4eoCHFddydJxVdHix +uuFucAS6T6C6aMN7/zHwcz09lCqxC0EOoP5NiGVreTO01wIDAQABo0IwQDAOBgNVHQ8BAf8EBAMC +AQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU7UQZwNPwBovupHu+QucmVMiONnYwDQYJKoZI +hvcNAQELBQADggIBAA2ukDL2pkt8RHYZYR4nKM1eVO8lvOMIkPkp165oCOGUAFjvLi5+U1KMtlwH +6oi6mYtQlNeCgN9hCQCTrQ0U5s7B8jeUeLBfnLOic7iPBZM4zY0+sLj7wM+x8uwtLRvM7Kqas6pg +ghstO8OEPVeKlh6cdbjTMM1gCIOQ045U8U1mwF10A0Cj7oV+wh93nAbowacYXVKV7cndJZ5t+qnt +ozo00Fl72u1Q8zW/7esUTTHHYPTa8Yec4kjixsU3+wYQ+nVZZjFHKdp2mhzpgq7vmrlR94gjmmmV +YjzlVYA211QC//G5Xc7UI2/YRYRKW2XviQzdFKcgyxilJbQN+QHwotL0AMh0jqEqSI5l2xPE4iUX +feu+h1sXIFRRk0pTAwvsXcoz7WL9RccvW9xYoIA55vrX/hMUpu09lEpCdNTDd1lzzY9GvlU47/ro +kTLql1gEIt44w8y8bckzOmoKaT+gyOpyj4xjhiO9bTyWnpXgSUyqorkqG5w2gXjtw+hG4iZZRHUe +2XWJUc0QhJ1hYMtd+ZciTY6Y5uN/9lu7rs3KSoFrXgvzUeF0K+l+J6fZmUlO+KWA2yUPHGNiiskz +Z2s8EIPGrd6ozRaOjfAHN3Gf8qv8QfXBi+wAN10J5U6A7/qxXDgGpRtK4dw4LTzcqx+QGtVKnO7R +cGzM7vRX+Bi6hG6H +-----END CERTIFICATE----- + +IdenTrust Public Sector Root CA 1 +================================= +-----BEGIN CERTIFICATE----- +MIIFZjCCA06gAwIBA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AQH/BAUwAwEB/zAdBgNVHQ4EFgQU43HgntinQtnbcZFrlJPrw6PRFKMw +DQYJKoZIhvcNAQELBQADggIBAEf63QqwEZE4rU1d9+UOl1QZgkiHVIyqZJnYWv6IAcVYpZmxI1Qj +t2odIFflAWJBF9MJ23XLblSQdf4an4EKwt3X9wnQW3IV5B4Jaj0z8yGa5hV+rVHVDRDtfULAj+7A +mgjVQdZcDiFpboBhDhXAuM/FSRJSzL46zNQuOAXeNf0fb7iAaJg9TaDKQGXSc3z1i9kKlT/YPyNt +GtEqJBnZhbMX73huqVjRI9PHE+1yJX9dsXNw0H8GlwmEKYBhHfpe/3OsoOOJuBxxFcbeMX8S3OFt +m6/n6J91eEyrRjuazr8FGF1NFTwWmhlQBJqymm9li1JfPFgEKCXAZmExfrngdbkaqIHWchezxQMx +NRF4eKLg6TCMf4DfWN88uieW4oA0beOY02QnrEh+KHdcxiVhJfiFDGX6xDIvpZgF5PgLZxYWxoK4 +Mhn5+bl53B/N66+rDt0b20XkeucC4pVd/GnwU2lhlXV5C15V5jgclKlZM57IcXR5f1GJtshquDDI +ajjDbp7hNxbqBWJMWxJH7ae0s1hWx0nzfxJoCTFx8G34Tkf71oXuxVhAGaQdp/lLQzfcaFpPz+vC +ZHTetBXZ9FRUGi8c15dxVJCO2SCdUyt/q4/i6jC8UDfv8Ue1fXwsBOxonbRJRBD0ckscZOf85muQ +3Wl9af0AVqW3rLatt8o+Ae+c +-----END CERTIFICATE----- + +Entrust Root Certification Authority - G2 +========================================= +-----BEGIN CERTIFICATE----- +MIIEPjCCAyagAwIBAgIESlOMKDANBgkqhkiG9w0BAQsFADCBvjELMAkGA1UEBhMCVVMxFjAUBgNV +BAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVy +bXMxOTA3BgNVBAsTMChjKSAyMDA5IEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ug +b25seTEyM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sQ9v4IbZT+mD12q/OWyFcq1rca8PdCE6OoGcrBNOTJ4vz4RnAuknZoh8/CbCzB428Hch0P+ +vGOaysXCHMnHjf87ElgI5rY97HosTvuDls4MPGmHVHOkc8KT/1EQrBVUAdj8BbGJoX90g5pJ19xO +e4pIb4tF9g== +-----END CERTIFICATE----- + +Entrust Root Certification Authority - EC1 +========================================== +-----BEGIN CERTIFICATE----- +MIIC+TCCAoCgAwIBAgINAKaLeSkAAAAAUNCR+TAKBggqhkjOPQQDAzCBvzELMAkGA1UEBhMCVVMx +FjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVn +YWwtdGVybXMxOTA3BgNVBAsTMChjKSAyMDEyIEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXpl +ZCB1c2Ugb25seTEzMDEGA1UEAxMqRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5 +IC0gRUMxMB4XDTEyMTIxODE1MjUzNloXDTM3MTIxODE1NTUzNlowgb8xCzAJBgNVBAYTAlVTMRYw +FAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9TZWUgd3d3LmVudHJ1c3QubmV0L2xlZ2Fs +LXRlcm1zMTkwNwYDVQQLEzAoYykgMjAxMiBFbnRydXN0LCBJbmMuIC0gZm9yIGF1dGhvcml6ZWQg +dXNlIG9ubHkxMzAxBgNVBAMTKkVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAt +IEVDMTB2MBAGByqGSM49AgEGBSuBBAAiA2IABIQTydC6bUF74mzQ61VfZgIaJPRbiWlH47jCffHy +AsWfoPZb1YsGGYZPUxBtByQnoaD41UcZYUx9ypMn6nQM72+WCf5j7HBdNq1nd67JnXxVRDqiY1Ef +9eNi1KlHBz7MIKNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE +FLdj5xrdjekIplWDpOBqUEFlEUJJMAoGCCqGSM49BAMDA2cAMGQCMGF52OVCR98crlOZF7ZvHH3h +vxGU0QOIdeSNiaSKd0bebWHvAvX7td/M/k7//qnmpwIwW5nXhTcGtXsI/esni0qU+eH6p44mCOh8 +kmhtc9hvJqwhAriZtyZBWyVgrtBIGu4G +-----END CERTIFICATE----- + +CFCA EV ROOT +============ +-----BEGIN CERTIFICATE----- +MIIFjTCCA3WgAwIBAgIEGErM1jANBgkqhkiG9w0BAQsFADBWMQswCQYDVQQGEwJDTjEwMC4GA1UE +CgwnQ2hpbmEgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRUwEwYDVQQDDAxDRkNB +IEVWIFJPT1QwHhcNMTIwODA4MDMwNzAxWhcNMjkxMjMxMDMwNzAxWjBWMQswCQYDVQQGEwJDTjEw +MC4GA1UECgwnQ2hpbmEgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRUwEwYDVQQD +DAxDRkNBIEVWIFJPT1QwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDXXWvNED8fBVnV +BU03sQ7smCuOFR36k0sXgiFxEFLXUWRwFsJVaU2OFW2fvwwbwuCjZ9YMrM8irq93VCpLTIpTUnrD +7i7es3ElweldPe6hL6P3KjzJIx1qqx2hp/Hz7KDVRM8Vz3IvHWOX6Jn5/ZOkVIBMUtRSqy5J35DN +uF++P96hyk0g1CXohClTt7GIH//62pCfCqktQT+x8Rgp7hZZLDRJGqgG16iI0gNyejLi6mhNbiyW +ZXvKWfry4t3uMCz7zEasxGPrb382KzRzEpR/38wmnvFyXVBlWY9ps4deMm/DGIq1lY+wejfeWkU7 +xzbh72fROdOXW3NiGUgthxwG+3SYIElz8AXSG7Ggo7cbcNOIabla1jj0Ytwli3i/+Oh+uFzJlU9f +py25IGvPa931DfSCt/SyZi4QKPaXWnuWFo8BGS1sbn85WAZkgwGDg8NNkt0yxoekN+kWzqot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5YPSjXnTkLAdc0Hz+Ys63su +-----END CERTIFICATE----- + +TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı H5 +==================================================== +-----BEGIN CERTIFICATE----- +MIIEJzCCAw+gAwIBAgIHAI4X/iQggTANBgkqhkiG9w0BAQsFADCBsTELMAkGA1UEBhMCVFIxDzAN +BgNVBAcMBkFua2FyYTFNMEsGA1UECgxEVMOcUktUUlVTVCBCaWxnaSDEsGxldGnFn2ltIHZlIEJp +bGnFn2ltIEfDvHZlbmxpxJ9pIEhpem1ldGxlcmkgQS7Fni4xQjBABgNVBAMMOVTDnFJLVFJVU1Qg +RWxla3Ryb25payBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsSBINTAeFw0xMzA0MzAw +ODA3MDFaFw0yMzA0MjgwODA3MDFaMIGxMQswCQYDVQQGEwJUUjEPMA0GA1UEBwwGQW5rYXJhMU0w +SwYDVQQKDERUw5xSS1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUgQmlsacWfaW0gR8O8dmVubGnE +n2kgSGl6bWV0bGVyaSBBLsWeLjFCMEAGA1UEAww5VMOcUktUUlVTVCBFbGVrdHJvbmlrIFNlcnRp +ZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxIEg1MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB +CgKCAQEApCUZ4WWe60ghUEoI5RHwWrom/4NZzkQqL/7hzmAD/I0Dpe3/a6i6zDQGn1k19uwsu537 +jVJp45wnEFPzpALFp/kRGml1bsMdi9GYjZOHp3GXDSHHmflS0yxjXVW86B8BSLlg/kJK9siArs1m +ep5Fimh34khon6La8eHBEJ/rPCmBp+EyCNSgBbGM+42WAA4+Jd9ThiI7/PS98wl+d+yG6w8z5UNP +9FR1bSmZLmZaQ9/LXMrI5Tjxfjs1nQ/0xVqhzPMggCTTV+wVunUlm+hkS7M0hO8EuPbJbKoCPrZV +4jI3X/xml1/N1p7HIL9Nxqw/dV8c7TKcfGkAaZHjIxhT6QIDAQABo0IwQDAdBgNVHQ4EFgQUVpkH +HtOsDGlktAxQR95DLL4gwPswDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZI +hvcNAQELBQADggEBAJ5FdnsXSDLyOIspve6WSk6BGLFRRyDN0GSxDsnZAdkJzsiZ3GglE9Rc8qPo +BP5yCccLqh0lVX6Wmle3usURehnmp349hQ71+S4pL+f5bFgWV1Al9j4uPqrtd3GqqpmWRgqujuwq +URawXs3qZwQcWDD1YIq9pr1N5Za0/EKJAWv2cMhQOQwt1WbZyNKzMrcbGW3LM/nfpeYVhDfwwvJl +lpKQd/Ct9JDpEXjXk4nAPQu6KfTomZ1yju2dL+6SfaHx/126M2CFYv4HAqGEVka+lgqaE9chTLd8 +B59OTj+RdPsnnRHM3eaxynFNExc5JsUpISuTKWqW+qtB4Uu2NQvAmxU= +-----END CERTIFICATE----- + +TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı H6 +==================================================== +-----BEGIN CERTIFICATE----- +MIIEJjCCAw6gAwIBAgIGfaHyZeyKMA0GCSqGSIb3DQEBCwUAMIGxMQswCQYDVQQGEwJUUjEPMA0G +A1UEBwwGQW5rYXJhMU0wSwYDVQQKDERUw5xSS1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUgQmls +acWfaW0gR8O8dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWeLjFCMEAGA1UEAww5VMOcUktUUlVTVCBF +bGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxIEg2MB4XDTEzMTIxODA5 +MDQxMFoXDTIzMTIxNjA5MDQxMFowgbExCzAJBgNVBAYTAlRSMQ8wDQYDVQQHDAZBbmthcmExTTBL +BgNVBAoMRFTDnFJLVFJVU1QgQmlsZ2kgxLBsZXRpxZ9pbSB2ZSBCaWxpxZ9pbSBHw7x2ZW5sacSf +aSBIaXptZXRsZXJpIEEuxZ4uMUIwQAYDVQQDDDlUw5xSS1RSVVNUIEVsZWt0cm9uaWsgU2VydGlm +aWthIEhpem1ldCBTYcSfbGF5xLFjxLFzxLEgSDYwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK +AoIBAQCdsGjW6L0UlqMACprx9MfMkU1xeHe59yEmFXNRFpQJRwXiM/VomjX/3EsvMsew7eKC5W/a +2uqsxgbPJQ1BgfbBOCK9+bGlprMBvD9QFyv26WZV1DOzXPhDIHiTVRZwGTLmiddk671IUP320EED +wnS3/faAz1vFq6TWlRKb55cTMgPp1KtDWxbtMyJkKbbSk60vbNg9tvYdDjTu0n2pVQ8g9P0pu5Fb +HH3GQjhtQiht1AH7zYiXSX6484P4tZgvsycLSF5W506jM7NE1qXyGJTtHB6plVxiSvgNZ1GpryHV ++DKdeboaX+UEVU0TRv/yz3THGmNtwx8XEsMeED5gCLMxAgMBAAGjQjBAMB0GA1UdDgQWBBTdVRcT +9qzoSCHK77Wv0QAy7Z6MtTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG +9w0BAQsFAAOCAQEAb1gNl0OqFlQ+v6nfkkU/hQu7VtMMUszIv3ZnXuaqs6fvuay0EBQNdH49ba3R +fdCaqaXKGDsCQC4qnFAUi/5XfldcEQlLNkVS9z2sFP1E34uXI9TDwe7UU5X+LEr+DXCqu4svLcsy +o4LyVN/Y8t3XSHLuSqMplsNEzm61kod2pLv0kmzOLBQJZo6NrRa1xxsJYTvjIKIDgI6tflEATseW +hvtDmHd9KMeP2Cpu54Rvl0EpABZeTeIT6lnAY2c6RPuY/ATTMHKm9ocJV612ph1jmv3XZch4gyt1 +O6VbuA1df74jrlZVlFjvH4GMKrLN5ptjnhi85WsGtAuYSyher4hYyw== +-----END CERTIFICATE----- + +Certinomis - Root CA +==================== +-----BEGIN CERTIFICATE----- +MIIFkjCCA3qgAwIBAgIBATANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJGUjETMBEGA1U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6C8I +6tNxIqSSaHh02TAfBgNVHSMEGDAWgBTvkUz1pcMw6C8I6tNxIqSSaHh02TANBgkqhkiG9w0BAQsF +AAOCAgEAfj1U2iJdGlg+O1QnurrMyOMaauo++RLrVl89UM7g6kgmJs95Vn6RHJk/0KGRHCwPT5iV +WVO90CLYiF2cN/z7ZMF4jIuaYAnq1fohX9B0ZedQxb8uuQsLrbWwF6YSjNRieOpWauwK0kDDPAUw +Pk2Ut59KA9N9J0u2/kTO+hkzGm2kQtHdzMjI1xZSg081lLMSVX3l4kLr5JyTCcBMWwerx20RoFAX +lCOotQqSD7J6wWAsOMwaplv/8gzjqh8c3LigkyfeY+N/IZ865Z764BNqdeuWXGKRlI5nU7aJ+BIJ +y29SWwNyhlCVCNSNh4YVH5Uk2KRvms6knZtt0rJ2BobGVgjF6wnaNsIbW0G+YSrjcOa4pvi2WsS9 +Iff/ql+hbHY5ZtbqTFXhADObE5hjyW/QASAJN1LnDE8+zbz1X5YnpyACleAu6AdBBR8Vbtaw5Bng +DwKTACdyxYvRVB9dSsNAl35VpnzBMwQUAR1JIGkLGZOdblgi90AMRgwjY/M50n92Uaf0yKHxDHYi +I0ZSKS3io0EHVmmY0gUJvGnHWmHNj4FgFU2A3ZDifcRQ8ow7bkrHxuaAKzyBvBGAFhAn1/DNP3nM +cyrDflOR1m749fPH0FFNjkulW+YZFzvWgQncItzujrnEj1PhZ7szuIgVRs/taTX/dQ1G885x4cVr +hkIGuUE= +-----END CERTIFICATE----- + +OISTE WISeKey Global Root GB CA +=============================== +-----BEGIN CERTIFICATE----- +MIIDtTCCAp2gAwIBAgIQdrEgUnTwhYdGs/gjGvbCwDANBgkqhkiG9w0BAQsFADBtMQswCQYDVQQG +EwJDSDEQMA4GA1UEChMHV0lTZUtleTEiMCAGA1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNl +ZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBHbG9iYWwgUm9vdCBHQiBDQTAeFw0xNDEyMD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- + +Certification Authority of WoSign G2 +==================================== +-----BEGIN CERTIFICATE----- +MIIDfDCCAmSgAwIBAgIQayXaioidfLwPBbOxemFFRDANBgkqhkiG9w0BAQsFADBYMQswCQYDVQQG +EwJDTjEaMBgGA1UEChMRV29TaWduIENBIExpbWl0ZWQxLTArBgNVBAMTJENlcnRpZmljYXRpb24g +QXV0aG9yaXR5IG9mIFdvU2lnbiBHMjAeFw0xNDExMDgwMDU4NThaFw00NDExMDgwMDU4NThaMFgx +CzAJBgNVBAYTAkNOMRowGAYDVQQKExFXb1NpZ24gQ0EgTGltaXRlZDEtMCsGA1UEAxMkQ2VydGlm +aWNhdGlvbiBBdXRob3JpdHkgb2YgV29TaWduIEcyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB +CgKCAQEAvsXEoCKASU+/2YcRxlPhuw+9YH+v9oIOH9ywjj2X4FA8jzrvZjtFB5sg+OPXJYY1kBai +XW8wGQiHC38Gsp1ij96vkqVg1CuAmlI/9ZqD6TRay9nVYlzmDuDfBpgOgHzKtB0TiGsOqCR3A9Du +W/PKaZE1OVbFbeP3PU9ekzgkyhjpJMuSA93MHD0JcOQg5PGurLtzaaNjOg9FD6FKmsLRY6zLEPg9 +5k4ot+vElbGs/V6r+kHLXZ1L3PR8du9nfwB6jdKgGlxNIuG12t12s9R23164i5jIFFTMaxeSt+BK +v0mUYQs4kI9dJGwlezt52eJ+na2fmKEG/HgUYFf47oB3sQIDAQABo0IwQDAOBgNVHQ8BAf8EBAMC +AQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU+mCp62XF3RYUCE4MD42b4Pdkr2cwDQYJKoZI +hvcNAQELBQADggEBAFfDejaCnI2Y4qtAqkePx6db7XznPWZaOzG73/MWM5H8fHulwqZm46qwtyeY +P0nXYGdnPzZPSsvxFPpahygc7Y9BMsaV+X3avXtbwrAh449G3CE4Q3RM+zD4F3LBMvzIkRfEzFg3 +TgvMWvchNSiDbGAtROtSjFA9tWwS1/oJu2yySrHFieT801LYYRf+epSEj3m2M1m6D8QL4nCgS3gu ++sif/a+RZQp4OBXllxcU3fngLDT4ONCEIgDAFFEYKwLcMFrw6AF8NTojrwjkr6qOKEJJLvD1mTS+ +7Q9LGOHSJDy7XUe3IfKN0QqZjuNuPq1w4I+5ysxugTH2e5x6eeRncRg= +-----END CERTIFICATE----- + +CA WoSign ECC Root +================== +-----BEGIN CERTIFICATE----- +MIICCTCCAY+gAwIBAgIQaEpYcIBr8I8C+vbe6LCQkDAKBggqhkjOPQQDAzBGMQswCQYDVQQGEwJD +TjEaMBgGA1UEChMRV29TaWduIENBIExpbWl0ZWQxGzAZBgNVBAMTEkNBIFdvU2lnbiBFQ0MgUm9v +dDAeFw0xNDExMDgwMDU4NThaFw00NDExMDgwMDU4NThaMEYxCzAJBgNVBAYTAkNOMRowGAYDVQQK +ExFXb1NpZ24gQ0EgTGltaXRlZDEbMBkGA1UEAxMSQ0EgV29TaWduIEVDQyBSb290MHYwEAYHKoZI +zj0CAQYFK4EEACIDYgAE4f2OuEMkq5Z7hcK6C62N4DrjJLnSsb6IOsq/Srj57ywvr1FQPEd1bPiU +t5v8KB7FVMxjnRZLU8HnIKvNrCXSf4/CwVqCXjCLelTOA7WRf6qU0NGKSMyCBSah1VES1ns2o0Iw +QDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUqv3VWqP2h4syhf3R +MluARZPzA7gwCgYIKoZIzj0EAwMDaAAwZQIxAOSkhLCB1T2wdKyUpOgOPQB0TKGXa/kNUTyh2Tv0 +Daupn75OcsqF1NnstTJFGG+rrQIwfcf3aWMvoeGY7xMQ0Xk/0f7qO3/eVvSQsRUR2LIiFdAvwyYu +a/GRspBl9JrmkO5K +-----END CERTIFICATE----- + +SZAFIR ROOT CA2 +=============== +-----BEGIN CERTIFICATE----- +MIIDcjCCAlqgAwIBAgIUPopdB+xV0jLVt+O2XwHrLdzk1uQwDQYJKoZIhvcNAQELBQA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tyjFogeutcrKjSoS75ftwjCkySp6 ++/NNIxuZMzSgLvWpCz/UXeHPhJ/iGcJfitYgHuNztw== +-----END CERTIFICATE----- + +Certum Trusted Network CA 2 +=========================== +-----BEGIN CERTIFICATE----- +MIIF0jCCA7qgAwIBAgIQIdbQSk8lD8kyN/yqXhKN6TANBgkqhkiG9w0BAQ0FADCBgDELMAkGA1UE +BhMCUEwxIjAgBgNVBAoTGVVuaXpldG8gVGVjaG5vbG9naWVzIFMuQS4xJzAlBgNVBAsTHkNlcnR1 +bSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEkMCIGA1UEAxMbQ2VydHVtIFRydXN0ZWQgTmV0d29y +ayBDQSAyMCIYDzIwMTExMDA2MDgzOTU2WhgPMjA0NjEwMDYwODM5NTZaMIGAMQswCQYDVQQGEwJQ +TDEiMCAGA1UEChMZVW5pemV0byBUZWNobm9sb2dpZXMgUy5BLjEnMCUGA1UECxMeQ2VydHVtIENl +cnRpZmljYXRpb24gQXV0aG9yaXR5MSQwIgYDVQQDExtDZXJ0dW0gVHJ1c3RlZCBOZXR3b3JrIENB +IDIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC9+Xj45tWADGSdhhuWZGc/IjoedQF9 +7/tcZ4zJzFxrqZHmuULlIEub2pt7uZld2ZuAS9eEQCsn0+i6MLs+CRqnSZXvK0AkwpfHp+6bJe+o +CgCXhVqqndwpyeI1B+twTUrWwbNWuKFBOJvR+zF/j+Bf4bE/D44WSWDXBo0Y+aomEKsq09DRZ40b +Rr5HMNUuctHFY9rnY3lEfktjJImGLjQ/KUxSiyqnwOKRKIm5wFv5HdnnJ63/mgKXwcZQkpsCLL2p +uTRZCr+ESv/f/rOf69me4Jgj7KZrdxYq28ytOxykh9xGc14ZYmhFV+SQgkK7QtbwYeDBoz1mo130 +GO6IyY0XRSmZMnUCMe4pJshrAua1YkV/NxVaI2iJ1D7eTiew8EAMvE0Xy02isx7QBlrd9pPPV3WZ +9fqGGmd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SP +-----END CERTIFICATE----- + +Hellenic Academic and Research Institutions RootCA 2015 +======================================================= +-----BEGIN CERTIFICATE----- +MIIGCzCCA/OgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBpjELMAkGA1UEBhMCR1IxDzANBgNVBAcT +BkF0aGVuczFEMEIGA1UEChM7SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0 +aW9ucyBDZXJ0LiBBdXRob3JpdHkxQDA+BgNVBAMTN0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNl +YXJjaCBJbnN0aXR1dGlvbnMgUm9vdENBIDIwMTUwHhcNMTUwNzA3MTAxMTIxWhcNNDAwNjMwMTAx +MTIxWjCBpjELMAkGA1UEBhMCR1IxDzANBgNVBAcTBkF0aGVuczFEMEIGA1UEChM7SGVsbGVuaWMg +QWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9ucyBDZXJ0LiBBdXRob3JpdHkxQDA+BgNV +BAMTN0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgUm9vdENBIDIw +MTUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDC+Kk/G4n8PDwEXT2QNrCROnk8Zlrv +bTkBSRq0t89/TSNTt5AA4xMqKKYx8ZEA4yjsriFBzh/a/X0SWwGDD7mwX5nh8hKDgE0GPt+sr+eh +iGsxr/CL0BgzuNtFajT0AoAkKAoCFZVedioNmToUW/bLy1O8E00BiDeUJRtCvCLYjqOWXjrZMts+ +6PAQZe104S+nfK8nNLspfZu2zwnI5dMK/IhlZXQK3HMcXM1AsRzUtoSMTFDPaI6oWa7CJ06CojXd +FPQf/7J31Ycvqm59JCfnxssm5uX+Zwdj2EUN3TpZZTlYepKZcj2chF6IIbjV9Cz82XBST3i4vTwr +i5WY9bPRaM8gFH5MXF/ni+X1NYEZN9cRCLdmvtNKzoNXADrDgfgXy5I2XdGj2HUb4Ysn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ZECpkJcNrVPSWh2HagCXZWK0vm9q +p/UsQu0yrbYhnr68 +-----END CERTIFICATE----- + +Hellenic Academic and Research Institutions ECC RootCA 2015 +=========================================================== +-----BEGIN CERTIFICATE----- +MIICwzCCAkqgAwIBAgIBADAKBggqhkjOPQQDAjCBqjELMAkGA1UEBhMCR1IxDzANBgNVBAcTBkF0 +aGVuczFEMEIGA1UEChM7SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9u +cyBDZXJ0LiBBdXRob3JpdHkxRDBCBgNVBAMTO0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJj +aCBJbnN0aXR1dGlvbnMgRUNDIFJvb3RDQSAyMDE1MB4XDTE1MDcwNzEwMzcxMloXDTQwMDYzMDEw +MzcxMlowgaoxCzAJBgNVBAYTAkdSMQ8wDQYDVQQHEwZBdGhlbnMxRDBCBgNVBAoTO0hlbGxlbmlj +IEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ2VydC4gQXV0aG9yaXR5MUQwQgYD +VQQDEztIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25zIEVDQyBSb290 +Q0EgMjAxNTB2MBAGByqGSM49AgEGBSuBBAAiA2IABJKgQehLgoRc4vgxEZmGZE4JJS+dQS8KrjVP +dJWyUWRrjWvmP3CV8AVER6ZyOFB2lQJajq4onvktTpnvLEhvTCUp6NFxW98dwXU3tNf6e3pCnGoK +Vlp8aQuqgAkkbH7BRqNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0O +BBYEFLQiC4KZJAEOnLvkDv2/+5cgk5kqMAoGCCqGSM49BAMCA2cAMGQCMGfOFmI4oqxiRaeplSTA +GiecMjvAwNW6qef4BENThe5SId6d9SWDPp5YSy/XZxMOIQIwBeF1Ad5o7SofTUwJCA3sS61kFyjn +dc5FZXIhF8siQQ6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2VydHBsdXMgUm9vdCBDQSBHMjAeFw0x +NDA1MjYwMDAwMDBaFw0zODAxMTUwMDAwMDBaMD4xCzAJBgNVBAYTAkZSMREwDwYDVQQKDAhDZXJ0 +cGx1czEcMBoGA1UEAwwTQ2VydHBsdXMgUm9vdCBDQSBHMjB2MBAGByqGSM49AgEGBSuBBAAiA2IA +BM0PW1aC3/BFGtat93nwHcmsltaeTpwftEIRyoa/bfuFo8XlGVzX7qY/aWfYeOKmycTbLXku54uN +Am8xIk0G42ByRZ0OQneezs/lf4WbGOT8zC5y0xaTTsqZY1yhBSpsBqNjMGEwDgYDVR0PAQH/BAQD +AgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNqDYwJ5jtpMxjwjFNiPwyCrKGBZMB8GA1Ud +IwQYMBaAFNqDYwJ5jtpMxjwjFNiPwyCrKGBZMAoGCCqGSM49BAMDA2gAMGUCMHD+sAvZ94OX7PNV +HdTcswYO/jOYnYs5kGuUIe22113WTNchp+e/IQ8rzfcq3IUHnQIxAIYUFuXcsGXCwI4Un78kFmjl +vPl5adytRSv3tjFzzAalU5ORGpOucGpnutee5WEaXw== +-----END CERTIFICATE----- + +OpenTrust Root CA G1 +==================== +-----BEGIN CERTIFICATE----- +MIIFbzCCA1egAwIBAgISESCzkFU5fX82bWTCp59rY45nMA0GCSqGSIb3DQEBCwUAMEAxCzAJBgNV +BAYTAkZSMRIwEAYDVQQKDAlPcGVuVHJ1c3QxHTAbBgNVBAMMFE9wZW5UcnVzdCBSb290IENBIEcx +MB4XDTE0MDUyNjA4NDU1MFoXDTM4MDExNTAwMDAwMFowQDELMAkGA1UEBhMCRlIxEjAQBgNVBAoM +CU9wZW5UcnVzdDEdMBsGA1UEAwwUT3BlblRydXN0IFJvb3QgQ0EgRzEwggIiMA0GCSqGSIb3DQEB +AQUAA4ICDwAwggIKAoICAQD4eUbalsUwXopxAy1wpLuwxQjczeY1wICkES3d5oeuXT2R0odsN7fa +Yp6bwiTXj/Hbpqb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L0DTatdrOjteFkdjpY3H1PXlZs5VVZV6Xf8YpmMIzUUmI4d7S+KNfKNsSbBfD4Fdvb8e80 +nR14SohWZ25g/4/Ii+GOvUKpMwpZQhISKvqxnUOOBZuZ2mKtVzazHbYNeS2WuOvyDEsMpZTGMKcm +GS3tTAZQMPH9WD25SxdfGbRqhFS0OE85og2WaMMolP3tLR9Ka0OWLpABEPs4poEL0L9109S5zvE/ +bw4cHjdx5RiHdRk/ULlepEU0rbDK5uUTdg8xFKmOLZTW1YVNcxVPS/KyPu1svf0OnWZzsD2097+o +4BGkxK51CUpjAEggpsadCwmKtODmzj7HPiY46SvepghJAwSQiumPv+i2tCqjI40cHLI5kqiPAlxA +OXXUc0ECd97N4EOH1uS6SsNsEn/+KuYj1oxx +-----END CERTIFICATE----- + +OpenTrust Root CA G2 +==================== +-----BEGIN CERTIFICATE----- +MIIFbzCCA1egAwIBAgISESChaRu/vbm9UpaPI+hIvyYRMA0GCSqGSIb3DQEBDQUAMEAxCzAJBgNV +BAYTAkZSMRIwEAYDVQQKDAlPcGVuVHJ1c3QxHTAbBgNVBAMMFE9wZW5UcnVzdCBSb290IENBIEcy +MB4XDTE0MDUyNjAwMDAwMFoXDTM4MDExNTAwMDAwMFowQDELMAkGA1UEBhMCRlIxEjAQBgNVBAoM +CU9wZW5UcnVzdDEdMBsGA1UEAwwUT3BlblRydXN0IFJvb3QgQ0EgRzIwggIiMA0GCSqGSIb3DQEB +AQUAA4ICDwAwggIKAoICAQDMtlelM5QQgTJT32F+D3Y5z1zCU3UdSXqWON2ic2rxb95eolq5cSG+ +Ntmh/LzubKh8NBpxGuga2F8ORAbtp+Dz0mEL4DKiltE48MLaARf85KxP6O6JHnSrT78eCbY2albz +4e6WiWYkBuTNQjpK3eCasMSCRbP+yatcfD7J6xcvDH1urqWPyKwlCm/61UWY0jUJ9gNDlP7ZvyCV +eYCYitmJNbtRG6Q3ffyZO6v/v6wNj0OxmXsWEH4db0fEFY8ElggGQgT4hNYdvJGmQr5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U3jg9CcCo +SmVGFvyqv1ROTVu+OEO3KMqLM6oaJbolXCkvW0pujOotnCr2BXbgd5eAiN1nE28daCSLT7d0geX0 +YJ96Vdc+N9oWaz53rK4YcJUIeSkDiv7BO7M/Gg+kO14fWKGVyasvc0rQLW6aWQ9VGHgtPFGml4vm +u7JwqkwR3v98KzfUetF3NI/n+UL3PIEMS1IK +-----END CERTIFICATE----- + +OpenTrust Root CA G3 +==================== +-----BEGIN CERTIFICATE----- +MIICITCCAaagAwIBAgISESDm+Ez8JLC+BUCs2oMbNGA/MAoGCCqGSM49BAMDMEAxCzAJBgNVBAYT +AkZSMRIwEAYDVQQKDAlPcGVuVHJ1c3QxHTAbBgNVBAMMFE9wZW5UcnVzdCBSb290IENBIEczMB4X +DTE0MDUyNjAwMDAwMFoXDTM4MDExNTAwMDAwMFowQDELMAkGA1UEBhMCRlIxEjAQBgNVBAoMCU9w +ZW5UcnVzdDEdMBsGA1UEAwwUT3BlblRydXN0IFJvb3QgQ0EgRzMwdjAQBgcqhkjOPQIBBgUrgQQA +IgNiAARK7liuTcpm3gY6oxH84Bjwbhy6LTAMidnW7ptzg6kjFYwvWYpa3RTqnVkrQ7cG7DK2uu5B +ta1doYXM6h0UZqNnfkbilPPntlahFVmhTzeXuSIevRHr9LIfXsMUmuXZl5mjYzBhMA4GA1UdDwEB +/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRHd8MUi2I5DMlv4VBN0BBY3JWIbTAf +BgNVHSMEGDAWgBRHd8MUi2I5DMlv4VBN0BBY3JWIbTAKBggqhkjOPQQDAwNpADBmAjEAj6jcnboM +BBf6Fek9LykBl7+BFjNAk2z8+e2AcG+qj9uEwov1NcoG3GRvaBbhj5G5AjEA2Euly8LQCGzpGPta +3U1fJAuwACEl74+nBCZx4nxp5V2a+EEfOzmTk51V6s2N8fvB +-----END CERTIFICATE----- + +ISRG Root X1 +============ +-----BEGIN CERTIFICATE----- +MIIFazCCA1OgAwIBAgIRAI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6II8c+6zf1tRn4SWiw3te5djgdYZ6k/oI2peVKVuRF4fn9tBb6dNqcmzU5L/qwIFAGbHrQ +gLKm+a/sRxmPUDgH3KKHOVj4utWp+UhnMJbulHheb4mjUcAwhmahRWa6VOujw5H5SNz/0egwLX0t +dHA114gk957EWW67c4cX8jJGKLhD+rcdqsq08p8kDi1L93FcXmn/6pUCyziKrlA4b9v7LWIbxcce +VOF34GfID5yHI9Y/QCB/IIDEgEw+OyQmjgSubJrIqg0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB +/zAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0OBBYEFIQYzIU07LwMlJQuCFmcx7IQTgoIMA0GCSqGSIb3 +DQEBCwUAA4IBAQCY8jdaQZChGsV2USggNiMOruYou6r4lK5IpDB/G/wkjUu0yKGX9rbxenDIU5PM +CCjjmCXPI6T53iHTfIUJrU6adTrCC2qJeHZERxhlbI1Bjjt/msv0tadQ1wUsN+gDS63pYaACbvXy +8MWy7Vu33PqUXHeeE6V/Uq2V8viTO96LXFvKWlJbYK8U90vvo/ufQJVtMVT8QtPHRh8jrdkPSHCa +2XV4cdFyQzR1bldZwgJcJmApzyMZFo6IQ6XU5MsI+yMRQ+hDKXJioaldXgjUkK642M4UwtBV8ob2 +xJNDd2ZhwLnoQdeXeGADbkpyrqXRfboQnoZsG4q5WTP468SQvvG5 +-----END CERTIFICATE----- + +Amazon Root CA 2 +================ +-----BEGIN CERTIFICATE----- +MIIFQTCCAymgAwIBAgITBmyf0pY1hp8KD+WGePhbJruKNzANBgkqhkiG9w0BAQwFADA5MQswCQYD +VQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSAyMB4XDTE1 +MDUyNjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpv +bjEZMBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgMjCCAiIwDQYJKoZIhv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dJnJUH/jWS5E4ywl7uxMMne0nxrpS10gxdr9HIcW +xkPo1LsmmkVwXqkLN1PiRnsn/eBG8om3zEK2yygmbtmlyTrIQRNg91CMFa6ybRoVGld45pIq2WWQ +gj9sAq+uEjonljYE1x2igGOpm/HlurR8FLBOybEfdF849lHqm/osohHUqS0nGkWxr7JOcQ3AWEbW +aQbLU8uz/mtBzUF+fUwPfHJ5elnNXkoOrJupmHN5fLT0zLm4BwyydFy4x2+IoZCn9Kr5v2c69BoV +Yh63n749sSmvZ6ES8lgQGVMDMBu4Gon2nL2XA46jCfMdiyHxtN/kHNGfZQIG6lzWE7OE76KlXIx3 +KadowGuuQNKotOrN8I1LOJwZmhsoVLiJkO/KdYE+HvJkJMcYr07/R54H9jVlpNMKVv/1F2Rs76gi +JUmTtt8AF9pYfl3uxRuw0dFfIRDH+fO6AgonB8Xx1sfT4PsJYGw= +-----END CERTIFICATE----- + +Amazon Root CA 3 +================ +-----BEGIN CERTIFICATE----- +MIIBtjCCAVugAwIBAgITBmyf1XSXNmY/Owua2eiedgPySjAKBggqhkjOPQQDAjA5MQswCQYDVQQG +EwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSAzMB4XDTE1MDUy +NjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZ +MBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgMzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABCmXp8ZB +f8ANm+gBG1bG8lKlui2yEujSLtf6ycXYqm0fc4E7O5hrOXwzpcVOho6AF2hiRVd9RFgdszflZwjr +Zt6jQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBSrttvXBp43 +rDCGB5Fwx5zEGbF4wDAKBggqhkjOPQQDAgNJADBGAiEA4IWSoxe3jfkrBqWTrBqYaGFy+uGh0Psc +eGCmQ5nFuMQCIQCcAu/xlJyzlvnrxir4tiz+OpAUFteMYyRIHN8wfdVoOw== +-----END CERTIFICATE----- + +Amazon Root CA 4 +================ +-----BEGIN CERTIFICATE----- +MIIB8jCCAXigAwIBAgITBmyf18G7EEwpQ+Vxe3ssyBrBDjAKBggqhkjOPQQDAzA5MQswCQYDVQQG +EwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSA0MB4XDTE1MDUy +NjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZ +MBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgNDB2MBAGByqGSM49AgEGBSuBBAAiA2IABNKrijdPo1MN +/sGKe0uoe0ZLY7Bi9i0b2whxIdIA6GO9mif78DluXeo9pcmBqqNbIJhFXRbb/egQbeOc4OO9X4Ri +83BkM6DLJC9wuoihKqB1+IGuYgbEgds5bimwHvouXKNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNV +HQ8BAf8EBAMCAYYwHQYDVR0OBBYEFNPsxzplbszh2naaVvuc84ZtV+WBMAoGCCqGSM49BAMDA2gA +MGUCMDqLIfG9fhGt0O9Yli/W651+kI0rz2ZVwyzjKKlwCkcO8DdZEv8tmZQoTipPNU0zWgIxAOp1 +AE47xDqUEpHJWEadIRNyp4iciuRMStuW1KyLa2tJElMzrdfkviT8tQp21KW8EA== +-----END CERTIFICATE----- + +LuxTrust Global Root 2 +====================== +-----BEGIN CERTIFICATE----- +MIIFwzCCA6ugAwIBAgIUCn6m30tEntpqJIWe5rgV0xZ/u7EwDQYJKoZIhvcNAQELBQAwRjELMAkG +A1UEBhMCTFUxFjAUBgNVBAoMDUx1eFRydXN0IFMuQS4xHzAdBgNVBAMMFkx1eFRydXN0IEdsb2Jh +bCBSb290IDIwHhcNMTUwMzA1MTMyMTU3WhcNMzUwMzA1MTMyMTU3WjBGMQswCQYDVQQGEwJMV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KoZIhvcNAQELBQADggIBAGoZ +FO1uecEsh9QNcH7X9njJCwROxLHOk3D+sFTAMs2ZMGQXvw/l4jP9BzZAcg4atmpZ1gDlaCDdLnIN +H2pkMSCEfUmmWjfrRcmF9dTHF5kH5ptV5AzoqbTOjFu1EVzPig4N1qx3gf4ynCSecs5U89BvolbW +7MM3LGVYvlcAGvI1+ut7MV3CwRI9loGIlonBWVx65n9wNOeD4rHh4bhY79SV5GCc8JaXcozrhAIu +ZY+kt9J/Z93I055cqqmkoCUUBpvsT34tC38ddfEz2O3OuHVtPlu5mB0xDVbYQw8wkbIEa91WvpWA +VWe+2M2D2RjuLg+GLZKecBPs3lHJQ3gCpU3I+V/EkVhGFndadKpAvAefMLmx9xIX3eP/JEAdemrR +TxgKqpAd60Ae36EeRJIQmvKN4dFLRp7oRUKX6kWZ8+xm1QL68qZKJKrezrnK+T+Tb/mjuuqlPpmt +/f97mfVl7vBZKGfXkJWkE4SphMHozs51k2MavDzq1WQfLSoSOcbDWjLtR5EWDrw4wVDej8oqkDQc +7kGUnF4ZLvhFSZl0kbAEb+MEWrGrKqv+x9CWttrhSmQGbmBNvUJO/3jaJMobtNeWOWyu8Q6qp31I +iyBMz2TWuJdGsE7RKlY6oJO9r4Ak4Ap+58rVyuiFVdw2KuGUaJPHZnJED4AhMmwlxyOAgwrr +-----END CERTIFICATE----- diff --git a/Gems/AWSCore/Code/CMakeLists.txt b/Gems/AWSCore/Code/CMakeLists.txt index e6da67d2b3..4b12dde831 100644 --- a/Gems/AWSCore/Code/CMakeLists.txt +++ b/Gems/AWSCore/Code/CMakeLists.txt @@ -6,12 +6,14 @@ # ly_get_list_relative_pal_filename(pal_editor_include_dir ${CMAKE_CURRENT_LIST_DIR}/Include/Private/Editor/Platform/${PAL_PLATFORM_NAME}) +ly_get_list_relative_pal_filename(pal_cafile_include_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Framework/Platform/${PAL_PLATFORM_NAME}) ly_add_target( NAME AWSCore.Static STATIC NAMESPACE Gem FILES_CMAKE awscore_files.cmake + ${pal_cafile_include_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake INCLUDE_DIRECTORIES PUBLIC Include/Public diff --git a/Gems/AWSCore/Code/Include/Public/ScriptCanvas/AWSScriptBehaviorS3.h b/Gems/AWSCore/Code/Include/Public/ScriptCanvas/AWSScriptBehaviorS3.h index 6c3d0e0a93..a75c3bce31 100644 --- a/Gems/AWSCore/Code/Include/Public/ScriptCanvas/AWSScriptBehaviorS3.h +++ b/Gems/AWSCore/Code/Include/Public/ScriptCanvas/AWSScriptBehaviorS3.h @@ -72,7 +72,7 @@ namespace AWSCore { static constexpr const char AWSScriptBehaviorS3Name[] = "AWSScriptBehaviorS3"; static constexpr const char OutputFileIsEmptyErrorMessage[] = "Request validation failed, output file is empty."; - static constexpr const char OutputFileMissFullPathErrorMessage[] = "Request validation failed, output file miss full path."; + static constexpr const char OutputFileFailedToResolveErrorMessage[] = "Request validation failed, cannot resolve the output file path."; static constexpr const char OutputFileIsDirectoryErrorMessage[] = "Request validation failed, output file is a directory."; static constexpr const char OutputFileDirectoryNotExistErrorMessage[] = "Request validation failed, output file directory doesn't exist."; static constexpr const char OutputFileIsReadOnlyErrorMessage[] = "Request validation failed, output file is read-only."; diff --git a/Gems/AWSCore/Code/Source/Framework/AWSApiJob.cpp b/Gems/AWSCore/Code/Source/Framework/AWSApiJob.cpp index 8800094b95..4383e0a8ac 100644 --- a/Gems/AWSCore/Code/Source/Framework/AWSApiJob.cpp +++ b/Gems/AWSCore/Code/Source/Framework/AWSApiJob.cpp @@ -9,6 +9,10 @@ namespace AWSCore { + namespace Platform + { + Aws::String GetCaCertBundlePath(); + } const char* AwsApiJob::COMPONENT_DISPLAY_NAME = "AWSCoreFramework"; @@ -29,6 +33,14 @@ namespace AWSCore config.userAgent = "/O3DE_AwsApiJob"; config.requestTimeoutMs = 30000; config.connectTimeoutMs = 30000; + + // Instructs the HTTP client where to find the SSL certificate trust store. + // It is required to copy the cacert.pem to the expected file path for running the Android client. + Aws::String caFilePath = Platform::GetCaCertBundlePath(); + if (!caFilePath.empty()) + { + config.caFile = caFilePath; + } } ); }; diff --git a/Gems/AWSCore/Code/Source/Framework/Platform/Android/GetCertsPath_Android.cpp b/Gems/AWSCore/Code/Source/Framework/Platform/Android/GetCertsPath_Android.cpp new file mode 100644 index 0000000000..b0d97e3ddd --- /dev/null +++ b/Gems/AWSCore/Code/Source/Framework/Platform/Android/GetCertsPath_Android.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 +// The AWS Native SDK AWSAllocator triggers a warning due to accessing members of std::allocator directly. +// AWSAllocator.h(70): warning C4996: 'std::allocator::pointer': warning STL4010: Various members of std::allocator are deprecated in +// C++17. Use std::allocator_traits instead of accessing these members directly. You can define +// _SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING or _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS to acknowledge that you have received +// this warning. +AZ_PUSH_DISABLE_WARNING(4251 4996, "-Wunknown-warning-option") +#include +AZ_POP_DISABLE_WARNING +#include +#include + +namespace AWSCore +{ + namespace Platform + { + Aws::String GetCaCertBundlePath() + { + AZStd::string publicStoragePath = AZ::Android::Utils::GetAppPublicStoragePath(); + publicStoragePath.append("/certificates/aws/cacert.pem"); + + return publicStoragePath.c_str(); + } + } // namespace Platform +} diff --git a/Code/Tools/News/NewsBuilder/Platform/Windows/PAL_windows.cmake b/Gems/AWSCore/Code/Source/Framework/Platform/Android/platform_android_files.cmake similarity index 81% rename from Code/Tools/News/NewsBuilder/Platform/Windows/PAL_windows.cmake rename to Gems/AWSCore/Code/Source/Framework/Platform/Android/platform_android_files.cmake index 180b7b9492..22d9681e3f 100644 --- a/Code/Tools/News/NewsBuilder/Platform/Windows/PAL_windows.cmake +++ b/Gems/AWSCore/Code/Source/Framework/Platform/Android/platform_android_files.cmake @@ -5,4 +5,6 @@ # # -set(PAL_TRAIT_BUILD_NEWSBUILDER_SUPPORTED TRUE) +set(FILES + GetCertsPath_Android.cpp +) diff --git a/Gems/AWSCore/Code/Source/Framework/Platform/Common/GetCertsPath_Null.cpp b/Gems/AWSCore/Code/Source/Framework/Platform/Common/GetCertsPath_Null.cpp new file mode 100644 index 0000000000..3bc9739e56 --- /dev/null +++ b/Gems/AWSCore/Code/Source/Framework/Platform/Common/GetCertsPath_Null.cpp @@ -0,0 +1,27 @@ +/* + * 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 +// The AWS Native SDK AWSAllocator triggers a warning due to accessing members of std::allocator directly. +// AWSAllocator.h(70): warning C4996: 'std::allocator::pointer': warning STL4010: Various members of std::allocator are deprecated in +// C++17. Use std::allocator_traits instead of accessing these members directly. You can define +// _SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING or _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS to acknowledge that you have received +// this warning. +AZ_PUSH_DISABLE_WARNING(4251 4996, "-Wunknown-warning-option") +#include +AZ_POP_DISABLE_WARNING + +namespace AWSCore +{ + namespace Platform + { + Aws::String GetCaCertBundlePath() + { + return ""; // no-op + } + } // namespace Platform +} // namespace GridMate diff --git a/Code/Tools/News/NewsBuilder/Platform/Android/PAL_android.cmake b/Gems/AWSCore/Code/Source/Framework/Platform/Linux/platform_linux_files.cmake similarity index 81% rename from Code/Tools/News/NewsBuilder/Platform/Android/PAL_android.cmake rename to Gems/AWSCore/Code/Source/Framework/Platform/Linux/platform_linux_files.cmake index 929d864fc4..108bdbcff1 100644 --- a/Code/Tools/News/NewsBuilder/Platform/Android/PAL_android.cmake +++ b/Gems/AWSCore/Code/Source/Framework/Platform/Linux/platform_linux_files.cmake @@ -5,4 +5,6 @@ # # -set(PAL_TRAIT_BUILD_NEWSBUILDER_SUPPORTED FALSE) +set(FILES + ../Common/GetCertsPath_Null.cpp +) diff --git a/Code/Tools/News/NewsBuilder/Platform/Linux/PAL_linux.cmake b/Gems/AWSCore/Code/Source/Framework/Platform/Mac/platform_mac_files.cmake similarity index 81% rename from Code/Tools/News/NewsBuilder/Platform/Linux/PAL_linux.cmake rename to Gems/AWSCore/Code/Source/Framework/Platform/Mac/platform_mac_files.cmake index 929d864fc4..108bdbcff1 100644 --- a/Code/Tools/News/NewsBuilder/Platform/Linux/PAL_linux.cmake +++ b/Gems/AWSCore/Code/Source/Framework/Platform/Mac/platform_mac_files.cmake @@ -5,4 +5,6 @@ # # -set(PAL_TRAIT_BUILD_NEWSBUILDER_SUPPORTED FALSE) +set(FILES + ../Common/GetCertsPath_Null.cpp +) diff --git a/Code/Tools/News/NewsBuilder/Platform/Mac/PAL_mac.cmake b/Gems/AWSCore/Code/Source/Framework/Platform/Windows/platform_windows_files.cmake similarity index 81% rename from Code/Tools/News/NewsBuilder/Platform/Mac/PAL_mac.cmake rename to Gems/AWSCore/Code/Source/Framework/Platform/Windows/platform_windows_files.cmake index 929d864fc4..108bdbcff1 100644 --- a/Code/Tools/News/NewsBuilder/Platform/Mac/PAL_mac.cmake +++ b/Gems/AWSCore/Code/Source/Framework/Platform/Windows/platform_windows_files.cmake @@ -5,4 +5,6 @@ # # -set(PAL_TRAIT_BUILD_NEWSBUILDER_SUPPORTED FALSE) +set(FILES + ../Common/GetCertsPath_Null.cpp +) diff --git a/Gems/AWSCore/Code/Source/Framework/Platform/iOS/platform_ios_files.cmake b/Gems/AWSCore/Code/Source/Framework/Platform/iOS/platform_ios_files.cmake new file mode 100644 index 0000000000..108bdbcff1 --- /dev/null +++ b/Gems/AWSCore/Code/Source/Framework/Platform/iOS/platform_ios_files.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 +# +# + +set(FILES + ../Common/GetCertsPath_Null.cpp +) diff --git a/Gems/AWSCore/Code/Source/ScriptCanvas/AWSScriptBehaviorS3.cpp b/Gems/AWSCore/Code/Source/ScriptCanvas/AWSScriptBehaviorS3.cpp index aa397ca97c..f47dda8046 100644 --- a/Gems/AWSCore/Code/Source/ScriptCanvas/AWSScriptBehaviorS3.cpp +++ b/Gems/AWSCore/Code/Source/ScriptCanvas/AWSScriptBehaviorS3.cpp @@ -6,6 +6,7 @@ */ #include +#include #include #include #include @@ -171,12 +172,16 @@ namespace AWSCore AWSScriptBehaviorS3NotificationBus::Broadcast(notificationFunc, OutputFileIsEmptyErrorMessage); return false; } - if (!AzFramework::StringFunc::Path::HasDrive(outFile.c_str())) + + char resolvedPath[AZ_MAX_PATH_LEN] = { 0 }; + if (!AZ::IO::FileIOBase::GetInstance()->ResolvePath(outFile.c_str(), resolvedPath, AZ_MAX_PATH_LEN)) { - AZ_Warning(AWSScriptBehaviorS3Name, false, OutputFileMissFullPathErrorMessage); - AWSScriptBehaviorS3NotificationBus::Broadcast(notificationFunc, OutputFileMissFullPathErrorMessage); + AZ_Warning(AWSScriptBehaviorS3Name, false, OutputFileFailedToResolveErrorMessage); + AWSScriptBehaviorS3NotificationBus::Broadcast(notificationFunc, OutputFileFailedToResolveErrorMessage); return false; } + outFile = resolvedPath; + if (AZ::IO::FileIOBase::GetInstance()->IsDirectory(outFile.c_str())) { AZ_Warning(AWSScriptBehaviorS3Name, false, OutputFileIsDirectoryErrorMessage); diff --git a/Gems/AWSCore/Code/Tests/ScriptCanvas/AWSScriptBehaviorS3Test.cpp b/Gems/AWSCore/Code/Tests/ScriptCanvas/AWSScriptBehaviorS3Test.cpp index cac0a042bc..aca0a1c6d1 100644 --- a/Gems/AWSCore/Code/Tests/ScriptCanvas/AWSScriptBehaviorS3Test.cpp +++ b/Gems/AWSCore/Code/Tests/ScriptCanvas/AWSScriptBehaviorS3Test.cpp @@ -122,11 +122,11 @@ TEST_F(AWSScriptBehaviorS3Test, GetObjectRaw_CallWithEmptyOutfileName_InvokeOnEr AWSScriptBehaviorS3::GetObjectRaw("dummyBucket", "dummyObject", "dummyRegion", ""); } -TEST_F(AWSScriptBehaviorS3Test, GetObjectRaw_CallWithOutfileNameMissFullPath_InvokeOnError) +TEST_F(AWSScriptBehaviorS3Test, GetObjectRaw_CallWithOutfileFailedToResolve_InvokeOnError) { AWSScriptBehaviorS3NotificationBusHandlerMock s3HandlerMock; EXPECT_CALL(s3HandlerMock, OnGetObjectError(::testing::_)).Times(1); - AWSScriptBehaviorS3::GetObjectRaw("dummyBucket", "dummyObject", "dummyRegion", "dummyOut.txt"); + AWSScriptBehaviorS3::GetObjectRaw("dummyBucket", "dummyObject", "dummyRegion", "@dummy@/dummyOut.txt"); } TEST_F(AWSScriptBehaviorS3Test, GetObjectRaw_CallWithOutfileNameIsDirectory_InvokeOnError) diff --git a/Gems/AWSCore/cdk/example/example_resources_stack.py b/Gems/AWSCore/cdk/example/example_resources_stack.py index 7afbd9bb4c..a200d0857a 100755 --- a/Gems/AWSCore/cdk/example/example_resources_stack.py +++ b/Gems/AWSCore/cdk/example/example_resources_stack.py @@ -107,31 +107,31 @@ class ExampleResources(core.Stack): self._s3_output = core.CfnOutput( self, id=f'ExampleBucketOutput', - description='An example S3 bucket to use with AWSCore ScriptBehaviors', - export_name=f"ExampleS3Bucket", - value=self._s3_bucket.bucket_arn) + description='An example S3 bucket name to use with AWSCore ScriptBehaviors', + export_name=f"{self.stack_name}:ExampleS3Bucket", + value=self._s3_bucket.bucket_name) # Define exports # Export resource group self._lambda_output = core.CfnOutput( self, id=f'ExampleLambdaOutput', - description='An example Lambda to use with AWSCore ScriptBehaviors', - export_name=f"ExampleLambdaFunction", - value=self._lambda.function_arn) + description='An example Lambda name to use with AWSCore ScriptBehaviors', + export_name=f"{self.stack_name}::ExampleLambdaFunction", + value=self._lambda.function_name) # Export DynamoDB Table self._table_output = core.CfnOutput( self, id=f'ExampleDynamoTableOutput', - description='An example DynamoDB Table to use with AWSCore ScriptBehaviors', - export_name=f"ExampleTable", - value=self._table.table_arn) + description='An example DynamoDB Table name to use with AWSCore ScriptBehaviors', + export_name=f"{self.stack_name}:ExampleTable", + value=self._table.table_name) # Export user policy self._user_policy = core.CfnOutput( self, id=f'ExampleUserPolicyOutput', description='A User policy to invoke example resources', - export_name=f"ExampleUserPolicy", + export_name=f"{self.stack_name}:ExampleUserPolicy", value=self._policy.managed_policy_arn) diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftActivityUtils.cpp b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftActivityUtils.cpp new file mode 100644 index 0000000000..c2183c5bf5 --- /dev/null +++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftActivityUtils.cpp @@ -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 + * + */ + +#include + +namespace AWSGameLift +{ + namespace AWSGameLiftActivityUtils + { + void GetGameProperties( + const AZStd::unordered_map& sessionProperties, + Aws::Vector& outGameProperties, + AZStd::string& outGamePropertiesOutput) + { + for (auto iter = sessionProperties.begin(); iter != sessionProperties.end(); iter++) + { + Aws::GameLift::Model::GameProperty sessionProperty; + sessionProperty.SetKey(iter->first.c_str()); + sessionProperty.SetValue(iter->second.c_str()); + outGameProperties.push_back(sessionProperty); + outGamePropertiesOutput += AZStd::string::format("{Key=%s,Value=%s},", iter->first.c_str(), iter->second.c_str()); + } + if (!outGamePropertiesOutput.empty()) + { + outGamePropertiesOutput = + outGamePropertiesOutput.substr(0, outGamePropertiesOutput.size() - 1); // Trim last comma to fit array format + } + } + } // namespace AWSGameLiftActivityUtils +} // namespace AWSGameLift diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftActivityUtils.h b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftActivityUtils.h new file mode 100644 index 0000000000..37adb808dc --- /dev/null +++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftActivityUtils.h @@ -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 + * + */ + +#pragma once + +#include +#include +#include +#include + +namespace AWSGameLift +{ + namespace AWSGameLiftActivityUtils + { + void GetGameProperties( + const AZStd::unordered_map& sessionProperties, + Aws::Vector& outGameProperties, + AZStd::string& outGamePropertiesOutput); + } // namespace AWSGameLiftActivityUtils +} // namespace AWSGameLift diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionActivity.cpp b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionActivity.cpp index fdd429e0bb..5846b4be4d 100644 --- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionActivity.cpp +++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionActivity.cpp @@ -5,6 +5,7 @@ * */ +#include #include #include @@ -29,13 +30,12 @@ namespace AWSGameLift { request.SetIdempotencyToken(createSessionRequest.m_idempotencyToken.c_str()); } - for (auto iter = createSessionRequest.m_sessionProperties.begin(); - iter != createSessionRequest.m_sessionProperties.end(); iter++) + AZStd::string propertiesOutput = ""; + Aws::Vector properties; + AWSGameLiftActivityUtils::GetGameProperties(createSessionRequest.m_sessionProperties, properties, propertiesOutput); + if (!properties.empty()) { - Aws::GameLift::Model::GameProperty sessionProperty; - sessionProperty.SetKey(iter->first.c_str()); - sessionProperty.SetValue(iter->second.c_str()); - request.AddGameProperties(sessionProperty); + request.SetGameProperties(properties); } // Required attributes @@ -49,6 +49,16 @@ namespace AWSGameLift } request.SetMaximumPlayerSessionCount(createSessionRequest.m_maxPlayer); + AZ_TracePrintf(AWSGameLiftCreateSessionActivityName, + "Built CreateGameSessionRequest with CreatorId=%s, Name=%s, IdempotencyToken=%s, GameProperties=%s, AliasId=%s, FleetId=%s and MaximumPlayerSessionCount=%d", + request.GetCreatorId().c_str(), + request.GetName().c_str(), + request.GetIdempotencyToken().c_str(), + AZStd::string::format("[%s]", propertiesOutput.c_str()).c_str(), + request.GetAliasId().c_str(), + request.GetFleetId().c_str(), + request.GetMaximumPlayerSessionCount()); + return request; } @@ -61,6 +71,7 @@ namespace AWSGameLift AZStd::string result = ""; Aws::GameLift::Model::CreateGameSessionRequest request = BuildAWSGameLiftCreateGameSessionRequest(createSessionRequest); auto createSessionOutcome = gameliftClient.CreateGameSession(request); + AZ_TracePrintf(AWSGameLiftCreateSessionActivityName, "CreateGameSession request against Amazon GameLift service is complete"); if (createSessionOutcome.IsSuccess()) { diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionOnQueueActivity.cpp b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionOnQueueActivity.cpp index d4124cf726..bbaba97a6c 100644 --- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionOnQueueActivity.cpp +++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionOnQueueActivity.cpp @@ -6,6 +6,7 @@ */ #include +#include #include namespace AWSGameLift @@ -21,13 +22,12 @@ namespace AWSGameLift { request.SetGameSessionName(createSessionOnQueueRequest.m_sessionName.c_str()); } - for (auto iter = createSessionOnQueueRequest.m_sessionProperties.begin(); - iter != createSessionOnQueueRequest.m_sessionProperties.end(); iter++) + AZStd::string propertiesOutput = ""; + Aws::Vector properties; + AWSGameLiftActivityUtils::GetGameProperties(createSessionOnQueueRequest.m_sessionProperties, properties, propertiesOutput); + if (!properties.empty()) { - Aws::GameLift::Model::GameProperty sessionProperty; - sessionProperty.SetKey(iter->first.c_str()); - sessionProperty.SetValue(iter->second.c_str()); - request.AddGameProperties(sessionProperty); + request.SetGameProperties(properties); } // Required attributes @@ -35,6 +35,14 @@ namespace AWSGameLift request.SetMaximumPlayerSessionCount(createSessionOnQueueRequest.m_maxPlayer); request.SetPlacementId(createSessionOnQueueRequest.m_placementId.c_str()); + AZ_TracePrintf(AWSGameLiftCreateSessionOnQueueActivityName, + "Built StartGameSessionPlacementRequest with GameSessionName=%s, GameProperties=%s, GameSessionQueueName=%s, MaximumPlayerSessionCount=%d and PlacementId=%s", + request.GetGameSessionName().c_str(), + AZStd::string::format("[%s]", propertiesOutput.c_str()).c_str(), + request.GetGameSessionQueueName().c_str(), + request.GetMaximumPlayerSessionCount(), + request.GetPlacementId().c_str()); + return request; } @@ -49,6 +57,8 @@ namespace AWSGameLift Aws::GameLift::Model::StartGameSessionPlacementRequest request = BuildAWSGameLiftStartGameSessionPlacementRequest(createSessionOnQueueRequest); auto createSessionOnQueueOutcome = gameliftClient.StartGameSessionPlacement(request); + AZ_TracePrintf(AWSGameLiftCreateSessionOnQueueActivityName, + "StartGameSessionPlacement request against Amazon GameLift service is complete."); if (createSessionOnQueueOutcome.IsSuccess()) { diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftJoinSessionActivity.cpp b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftJoinSessionActivity.cpp index d02691967d..9920bc4f61 100644 --- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftJoinSessionActivity.cpp +++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftJoinSessionActivity.cpp @@ -27,6 +27,13 @@ namespace AWSGameLift // Required attributes request.SetPlayerId(joinSessionRequest.m_playerId.c_str()); request.SetGameSessionId(joinSessionRequest.m_sessionId.c_str()); + + AZ_TracePrintf(AWSGameLiftJoinSessionActivityName, + "Built CreatePlayerSessionRequest with PlayerData=%s, PlayerId=%s and GameSessionId=%s", + request.GetPlayerData().c_str(), + request.GetPlayerId().c_str(), + request.GetGameSessionId().c_str()); + return request; } @@ -40,6 +47,13 @@ namespace AWSGameLift sessionConnectionConfig.m_ipAddress = createPlayerSessionResult.GetPlayerSession().GetIpAddress().c_str(); sessionConnectionConfig.m_playerSessionId = createPlayerSessionResult.GetPlayerSession().GetPlayerSessionId().c_str(); sessionConnectionConfig.m_port = createPlayerSessionResult.GetPlayerSession().GetPort(); + + AZ_TracePrintf(AWSGameLiftJoinSessionActivityName, + "Built SessionConnectionConfig with IpAddress=%s, PlayerSessionId=%s and Port=%d", + sessionConnectionConfig.m_ipAddress.c_str(), + sessionConnectionConfig.m_playerSessionId.c_str(), + sessionConnectionConfig.m_port); + return sessionConnectionConfig; } @@ -54,6 +68,8 @@ namespace AWSGameLift Aws::GameLift::Model::CreatePlayerSessionRequest request = BuildAWSGameLiftCreatePlayerSessionRequest(joinSessionRequest); auto createPlayerSessionOutcome = gameliftClient.CreatePlayerSession(request); + AZ_TracePrintf(AWSGameLiftJoinSessionActivityName, + "CreatePlayerSession request for player %s against Amazon GameLift service is complete", joinSessionRequest.m_playerId.c_str()); if (!createPlayerSessionOutcome.IsSuccess()) { @@ -72,11 +88,13 @@ namespace AWSGameLift auto clientRequestHandler = AZ::Interface::Get(); if (clientRequestHandler) { - AZ_TracePrintf(AWSGameLiftJoinSessionActivityName, "Requesting player to connect to game session ..."); - AzFramework::SessionConnectionConfig sessionConnectionConfig = BuildSessionConnectionConfig(createPlayerSessionOutcome); + + AZ_TracePrintf(AWSGameLiftJoinSessionActivityName, + "Requesting and validating player session %s to connect to game session ...", sessionConnectionConfig.m_playerSessionId.c_str()); result = clientRequestHandler->RequestPlayerJoinSession(sessionConnectionConfig); + AZ_TracePrintf(AWSGameLiftJoinSessionActivityName, "Started connection process, and connection validation is in process."); } else { diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftLeaveSessionActivity.cpp b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftLeaveSessionActivity.cpp index 241f2ac120..024faae1c4 100644 --- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftLeaveSessionActivity.cpp +++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftLeaveSessionActivity.cpp @@ -19,9 +19,9 @@ namespace AWSGameLift auto clientRequestHandler = AZ::Interface::Get(); if (clientRequestHandler) { - AZ_TracePrintf(AWSGameLiftLeaveSessionActivityName, "Requesting to leave the current session..."); - + AZ_TracePrintf(AWSGameLiftLeaveSessionActivityName, "Requesting player to leave the current session ..."); clientRequestHandler->RequestPlayerLeaveSession(); + AZ_TracePrintf(AWSGameLiftLeaveSessionActivityName, "Started disconnect process, and player clean up is in process."); } else { diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftSearchSessionsActivity.cpp b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftSearchSessionsActivity.cpp index b1b01e66f1..aa5f0e14d9 100644 --- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftSearchSessionsActivity.cpp +++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftSearchSessionsActivity.cpp @@ -35,6 +35,7 @@ namespace AWSGameLift { request.SetNextToken(searchSessionsRequest.m_nextToken.c_str()); } + // Required attributes if (!searchSessionsRequest.m_aliasId.empty()) { @@ -46,6 +47,16 @@ namespace AWSGameLift } // TODO: Update the AWS Native SDK to accept the new request parameter. //request.SetLocation(searchSessionsRequest.m_location.c_str()); + + AZ_TracePrintf(AWSGameLiftSearchSessionsActivityName, + "Built SearchGameSessionsRequest with FilterExpression=%s, SortExpression=%s, Limit=%d, NextToken=%s, AliasId=%s and FleetId=%s", + request.GetFilterExpression().c_str(), + request.GetSortExpression().c_str(), + request.GetLimit(), + request.GetNextToken().c_str(), + request.GetAliasId().c_str(), + request.GetFleetId().c_str()); + return request; } @@ -58,6 +69,7 @@ namespace AWSGameLift AzFramework::SearchSessionsResponse response; Aws::GameLift::Model::SearchGameSessionsRequest request = BuildAWSGameLiftSearchGameSessionsRequest(searchSessionsRequest); Aws::GameLift::Model::SearchGameSessionsOutcome outcome = gameliftClient.SearchGameSessions(request); + AZ_TracePrintf(AWSGameLiftSearchSessionsActivityName, "SearchGameSessions request against Amazon GameLift service is complete"); if (outcome.IsSuccess()) { diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/awsgamelift_client_files.cmake b/Gems/AWSGameLift/Code/AWSGameLiftClient/awsgamelift_client_files.cmake index ce6c017e8e..5bce8387a4 100644 --- a/Gems/AWSGameLift/Code/AWSGameLiftClient/awsgamelift_client_files.cmake +++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/awsgamelift_client_files.cmake @@ -11,6 +11,8 @@ set(FILES Include/Request/AWSGameLiftJoinSessionRequest.h Include/Request/AWSGameLiftSearchSessionsRequest.h Include/Request/IAWSGameLiftRequests.h + Source/Activity/AWSGameLiftActivityUtils.cpp + Source/Activity/AWSGameLiftActivityUtils.h Source/Activity/AWSGameLiftCreateSessionActivity.cpp Source/Activity/AWSGameLiftCreateSessionActivity.h Source/Activity/AWSGameLiftCreateSessionOnQueueActivity.cpp diff --git a/Gems/AWSGameLift/Code/AWSGameLiftServer/Source/AWSGameLiftServerManager.cpp b/Gems/AWSGameLift/Code/AWSGameLiftServer/Source/AWSGameLiftServerManager.cpp index 3b2fd910bf..72f120d7dc 100644 --- a/Gems/AWSGameLift/Code/AWSGameLiftServer/Source/AWSGameLiftServerManager.cpp +++ b/Gems/AWSGameLift/Code/AWSGameLiftServer/Source/AWSGameLiftServerManager.cpp @@ -106,8 +106,10 @@ namespace AWSGameLift return false; } - AZ_TracePrintf(AWSGameLiftServerManagerName, "Initiating Amazon GameLift Server SDK..."); + AZ_TracePrintf(AWSGameLiftServerManagerName, "Initiating Amazon GameLift Server SDK ..."); Aws::GameLift::Server::InitSDKOutcome initOutcome = m_gameLiftServerSDKWrapper->InitSDK(); + AZ_TracePrintf(AWSGameLiftServerManagerName, "InitSDK request against Amazon GameLift service is complete."); + m_serverSDKInitialized = initOutcome.IsSuccess(); AZ_Error(AWSGameLiftServerManagerName, m_serverSDKInitialized, @@ -138,8 +140,10 @@ namespace AWSGameLift return; } - AZ_TracePrintf(AWSGameLiftServerManagerName, "Notifying GameLift server process is ending..."); + AZ_TracePrintf(AWSGameLiftServerManagerName, "Notifying GameLift server process is ending ..."); Aws::GameLift::GenericOutcome processEndingOutcome = m_gameLiftServerSDKWrapper->ProcessEnding(); + AZ_TracePrintf(AWSGameLiftServerManagerName, "ProcessEnding request against Amazon GameLift service is complete."); + bool processEndingIsSuccess = processEndingOutcome.IsSuccess(); AZ_Error(AWSGameLiftServerManagerName, processEndingIsSuccess, AWSGameLiftServerProcessEndingErrorMessage, @@ -155,7 +159,12 @@ namespace AWSGameLift return; } + AZ_TracePrintf(AWSGameLiftServerManagerName, + "Removing player session %s from Amazon GameLift service ...", playerSessionId.c_str()); Aws::GameLift::GenericOutcome disconnectOutcome = m_gameLiftServerSDKWrapper->RemovePlayerSession(playerSessionId); + AZ_TracePrintf(AWSGameLiftServerManagerName, + "RemovePlayerSession request for player session %s against Amazon GameLift service is complete.", playerSessionId.c_str()); + AZ_Error(AWSGameLiftServerManagerName, disconnectOutcome.IsSuccess(), AWSGameLiftServerRemovePlayerSessionErrorMessage, playerSessionId.c_str(), disconnectOutcome.GetError().GetErrorMessage().c_str()); } @@ -188,8 +197,9 @@ namespace AWSGameLift AZStd::bind(&AWSGameLiftServerManager::OnHealthCheck, this), desc.m_port, Aws::GameLift::Server::LogParameters(logPaths)); - AZ_TracePrintf(AWSGameLiftServerManagerName, "Notifying GameLift server process is ready..."); + AZ_TracePrintf(AWSGameLiftServerManagerName, "Notifying GameLift server process is ready ..."); auto processReadyOutcome = m_gameLiftServerSDKWrapper->ProcessReady(processReadyParameter); + AZ_TracePrintf(AWSGameLiftServerManagerName, "ProcessReady request against Amazon GameLift service is complete."); if (!processReadyOutcome.IsSuccess()) { @@ -213,8 +223,9 @@ namespace AWSGameLift if (createSessionResult) { - AZ_TracePrintf(AWSGameLiftServerManagerName, "Activating GameLift game session..."); + AZ_TracePrintf(AWSGameLiftServerManagerName, "Activating GameLift game session ..."); Aws::GameLift::GenericOutcome activationOutcome = m_gameLiftServerSDKWrapper->ActivateGameSession(); + AZ_TracePrintf(AWSGameLiftServerManagerName, "ActivateGameSession request against Amazon GameLift service is complete."); if (activationOutcome.IsSuccess()) { @@ -240,7 +251,7 @@ namespace AWSGameLift void AWSGameLiftServerManager::OnProcessTerminate() { - AZ_TracePrintf(AWSGameLiftServerManagerName, "GameLift is shutting down server process..."); + AZ_TracePrintf(AWSGameLiftServerManagerName, "GameLift is shutting down server process ..."); HandleDestroySession(); } @@ -299,8 +310,11 @@ namespace AWSGameLift return false; } - AZ_TracePrintf(AWSGameLiftServerManagerName, "Attempting to accept player session connection with Amazon GameLift service..."); + AZ_TracePrintf(AWSGameLiftServerManagerName, + "Attempting to accept player session %s connection with Amazon GameLift service ...", playerSessionId.c_str()); auto acceptPlayerSessionOutcome = m_gameLiftServerSDKWrapper->AcceptPlayerSession(playerSessionId.c_str()); + AZ_TracePrintf(AWSGameLiftServerManagerName, + "AcceptPlayerSession request for player session %s against Amazon GameLift service is complete.", playerSessionId.c_str()); if (!acceptPlayerSessionOutcome.IsSuccess()) { diff --git a/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderVariantAssetBuilder.cpp b/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderVariantAssetBuilder.cpp index 7e2540cf44..7be98ab056 100644 --- a/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderVariantAssetBuilder.cpp +++ b/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderVariantAssetBuilder.cpp @@ -425,16 +425,16 @@ namespace AZ { const auto& jobParameters = request.m_jobDescription.m_jobParameters; - if (jobParameters.find(ShaderVariantLoadErrorParam) != jobParameters.end()) + if (jobParameters.contains(ShaderVariantLoadErrorParam)) { AZ_Error(ShaderVariantAssetBuilderName, false, "Error during CreateJobs: %s", jobParameters.at(ShaderVariantLoadErrorParam).c_str()); response.m_resultCode = AssetBuilderSDK::ProcessJobResult_Failed; return; } - if (jobParameters.find(ShouldExitEarlyFromProcessJobParam) != jobParameters.end()) + if (jobParameters.contains(ShouldExitEarlyFromProcessJobParam)) { - AZ_TracePrintf(ShaderVariantAssetBuilderName, "Doing nothing on behalf of [%s] because it's been overridden by game project.", jobParameters.at(ShaderVariantLoadErrorParam).c_str()); + AZ_TracePrintf(ShaderVariantAssetBuilderName, "Doing nothing on behalf of [%s] because it's been overridden by game project.", jobParameters.at(ShouldExitEarlyFromProcessJobParam).c_str()); response.m_resultCode = AssetBuilderSDK::ProcessJobResult_Success; return; } diff --git a/Gems/Atom/Feature/Common/Assets/Scripts/performance_metrics/timestamp_aggregator.py b/Gems/Atom/Feature/Common/Assets/Scripts/performance_metrics/timestamp_aggregator.py deleted file mode 100644 index 72d186bf86..0000000000 --- a/Gems/Atom/Feature/Common/Assets/Scripts/performance_metrics/timestamp_aggregator.py +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env python -""" -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 -""" - -from genericpath import isdir -from argparse import ArgumentParser -import json -from pathlib import Path -import time - -# this allows us to add additional data if necessary, e.g. frame_test_timestamps.json -is_timestamp_file = lambda file: file.name.startswith('frame') and file.name.endswith('_timestamps.json') -ns_to_ms = lambda time: time / 1e6 - -def main(logs_dir): - frame_count = 0 - frame_time_total = 0 - frame_time_max = 0 - pass_stats = {} - - print(f'Analyzing frame timestamp logs in {logs_dir}') - - # go through files in alphabetical order (remove sorted() if not necessary) - for file in sorted(logs_dir.iterdir(), key=lambda file: len(file.name)): - if file.is_dir() or not is_timestamp_file(file): - continue - - data = json.loads(file.read_text()) - entries = data['ClassData']['timestampEntries'] - - frame_time = 0 - for entry in entries: - name = entry['passName'] - time_ns = entry['timestampResultInNanoseconds'] - pass_entry = pass_stats.get(name, {'max': 0, 'total': 0}) - - pass_entry['max'] = max(time_ns, pass_entry['max']) - pass_entry['total'] += time_ns - pass_stats[name] = pass_entry - - frame_time += time_ns - frame_time_total += frame_time - - frame_name = file.name.split('_')[0] - print(f'- Total time for frame {frame_name}: {ns_to_ms(frame_time)}ms') - - frame_time_max = max(frame_time, frame_time_max) - frame_count += 1 - - if frame_count < 1: - print(f'No logs were found in {base_dir}') - exit(1) - - frame_avg = frame_time_total / frame_count - print(f'Avg time across {frame_count} frames: {ns_to_ms(frame_avg)}ms') - print(f'Max frame time: {ns_to_ms(frame_time_max)}ms') - print('Pass statistics:') - for name, stat in pass_stats.items(): - avg_ms = ns_to_ms(stat['total'] / frame_count) - max_ms = ns_to_ms(stat['max']) - print(f'- {name}: {avg_ms}ms avg, {max_ms}ms max') - -if __name__ == '__main__': - parser = ArgumentParser(description='Gathers statistics from a group of pass timestamp logs') - parser.add_argument('path', help='Path to the directory containing the pass timestamp logs') - args = parser.parse_args() - - base_dir = Path(args.path) - if not base_dir.exists(): - raise FileNotFoundError('Invalid path provided') - main(base_dir) diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/Ltc.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/Ltc.azsli index 292f8a8a22..6e45cf30c8 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/Ltc.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/Ltc.azsli @@ -80,14 +80,44 @@ float3x3 BuildViewAlignedOrthonormalBasis(in float3 normal, in float3 dirToView) // xy plane in positive z space. float IntegrateEdge(float3 v1, float3 v2) { + // This alternate version may work better for platforms where acos() precision is low. + /* + float x = dot(v1, v2); + float y = abs(x); + + float a = 5.42031 + (3.12829 + 0.0902326 * y) * y; + float b = 3.45068 + (4.18814 + y) * y; + float theta_sinTheta = a / b; + + if (x < 0.0) + { + theta_sinTheta = PI * rsqrt(saturate(1.0 - x * x)) - theta_sinTheta; + } + + float3 u = cross(v1, v2); + return theta_sinTheta * u.z; + */ + float cosTheta = dot(v1, v2); - cosTheta = clamp(cosTheta, -0.9999, 0.9999); + float theta = acos(cosTheta); // calculate 1.0 / sin(theta) - float invSinTheta = rsqrt(1.0 - cosTheta * cosTheta); + float invSinTheta = rsqrt(saturate(1.0 - cosTheta * cosTheta)); - float theta = acos(cosTheta); - return cross(v1, v2).z * theta * invSinTheta; + return cross(v1, v2).z * ((theta > 0.001) ? theta * invSinTheta : 1.0); +} + +// Cheaper version of above which is good enough for diffuse +float IntegrateEdgeDiffuse(float3 v1, float3 v2) +{ + float cosTheta = dot(v1, v2); + float absCosTheta = abs(cosTheta); + float theta_sinTheta = 1.5708 + (-0.879406 + 0.308609 * absCosTheta) * absCosTheta; + if (cosTheta < 0.0) + { + theta_sinTheta = PI * rsqrt(1.0 - cosTheta * cosTheta) - theta_sinTheta; + } + return theta_sinTheta * cross(v1, v2).z; } // Returns the unnormalized z plane intersection point between pointAboveHorizon and pointBelowHorizon. @@ -189,42 +219,90 @@ void ClipQuadToHorizon(inout float3 p[5], out int vertexCount) } } -// Takes 4 points (p) from a quad plus a 5th dummy point, rotates them into the space of the normal, then transforms -// the points by the LTC matrix provided. The points are then clipped to the normal's hemisphere. The number of points -// after the clip is returned in vertexCount. It's possible for the resulting clipped quad to be a triangle (when 3 -// points are below the horizon), or a pentagon (when one point is below the horizon), or be a regular 4 point quad. -void LtcClipAndNormalizeQuad(in float3 normal, in float3 dirToView, float3x3 ltcMat, inout float3 p[5], out int vertexCount) +// Applies the LTC matrix to the clipped points of a quad. +void ApplyLtcMatrixToQuad(in float3x3 ltcMat, inout float3 p[5], in int vertexCount) { - // Rotate ltc matrix - ltcMat = mul(ltcMat, BuildViewAlignedOrthonormalBasis(normal, dirToView)); - // Transform points into ltc space - p[0] = mul(ltcMat, p[0].xyz); - p[1] = mul(ltcMat, p[1].xyz); - p[2] = mul(ltcMat, p[2].xyz); - p[3] = mul(ltcMat, p[3].xyz); + p[0] = mul(ltcMat, p[0]); + p[1] = mul(ltcMat, p[1]); + p[2] = mul(ltcMat, p[2]); - ClipQuadToHorizon(p, vertexCount); - - // visibility check - if (vertexCount == 0) + if (vertexCount > 3) { - return; + p[3] = mul(ltcMat, p[3]); } + if (vertexCount > 4) + { + p[4] = mul(ltcMat, p[4]); + } +} - // project onto sphere +// Projects the clipped points of a quad onto the sphere. +void NormalizeQuadPoints(inout float3 p[5], in int vertexCount) +{ + // project quad points onto a sphere. p[0] = normalize(p[0]); p[1] = normalize(p[1]); p[2] = normalize(p[2]); - p[3] = normalize(p[3]); - p[4] = normalize(p[4]); + + if (vertexCount > 3) + { + p[3] = normalize(p[3]); + } + if (vertexCount > 4) + { + p[4] = normalize(p[4]); + } } -float IntegrateQuad(in float3 v[5], in float vertexCount, in bool doubleSided) +// Transforms the 4 points of a quad into the hemisphere of the normal +void TransformQuadToOrthonormalBasis(in float3 normal, in float3 dirToView, inout float3 p[4]) +{ + float3x3 orthoNormalBasis = BuildViewAlignedOrthonormalBasis(normal, dirToView); + + // Transform points into orthonormal space + p[0] = mul(orthoNormalBasis, p[0]); + p[1] = mul(orthoNormalBasis, p[1]); + p[2] = mul(orthoNormalBasis, p[2]); + p[3] = mul(orthoNormalBasis, p[3]); +} + +// Integrates the edges of a quad for lambertian diffuse contribution. +float IntegrateQuadDiffuse(in float3 v[5], in float vertexCount, in bool doubleSided) { - // Integrate float sum = 0.0; + NormalizeQuadPoints(v, vertexCount); + + // There must be at least 3 points so don't check for the first 2 edges. + sum += IntegrateEdgeDiffuse(v[0], v[1]); + sum += IntegrateEdgeDiffuse(v[1], v[2]); + + if (vertexCount > 3) + { + sum += IntegrateEdgeDiffuse(v[2], v[3]); + if (vertexCount == 5) + { + sum += IntegrateEdgeDiffuse(v[3], v[4]); + } + } + + // Close the polygon + sum += IntegrateEdgeDiffuse(v[vertexCount - 1], v[0]); + + // Note: negated due to winding order + sum = doubleSided ? abs(sum) : max(0.0, -sum); + + return sum; +} + +// Integrates the edges of a quad for specular contribution. +float IntegrateQuadSpecular(in float3 v[5], in float vertexCount, in bool doubleSided) +{ + float sum = 0.0; + + NormalizeQuadPoints(v, vertexCount); + // There must be at least 3 points so don't check for the first 2 edges. sum += IntegrateEdge(v[0], v[1]); sum += IntegrateEdge(v[1], v[2]); @@ -247,26 +325,62 @@ float IntegrateQuad(in float3 v[5], in float vertexCount, in bool doubleSided) return sum; } -float LtcQuadEvaluate(in float3 normal, in float3 dirToView, in float3x3 ltcMat, in float3 p[4], in bool doubleSided) +// Evaluate linear transform cosine lighting for a 4 point quad. +// normal - The surface normal +// dirToView - Normalized direction from the surface to the view +// ltcMat - The LTC matrix for specular, or identity for diffuse. +// p[4] - The 4 light positions relative to the surface position. +// doubleSided - If the quad emits light from both sides +// diffuse - The output diffuse response for the quad light +// specular - The output specular response for the quad light +void LtcQuadEvaluate( + in float3 normal, + in float3 dirToView, + in float3x3 ltcMat, + in float3 p[4], + in bool doubleSided, + out float diffuse, + out float specular) { + // Transform the points of the light into the space of the normal's hemisphere. + TransformQuadToOrthonormalBasis(normal, dirToView, p); + // Initialize quad with dummy point at end in case one corner is clipped (resulting in 5 sided polygon) float3 v[5] = {p[0], p[1], p[2], p[3], float3(0.0, 0.0, 0.0)}; - int vertexCount = 0; - LtcClipAndNormalizeQuad(normal, dirToView, ltcMat, v, vertexCount); + // Clip the light polygon to the normal hemisphere. This is done before the LTC matrix is applied to prevent + // parts of the light below the horizon from impacting the surface. The number of points remaining after + // the clip is returned in vertexCount. It's possible for the vertexCount of the resulting clipped quad to be + // 0 - all points clipped (no work to do, so return) + // 3 - 3 points clipped, leaving only a triangular corner of the quad + // 4 - 2 or 0 points clipped, leaving a quad + // 5 - 1 point clipped leaving a pentagon. - if (vertexCount > 0) + int vertexCount = 0; + ClipQuadToHorizon(v, vertexCount); + + if (vertexCount == 0) { - return IntegrateQuad(v, vertexCount, doubleSided); + // Entire light is below the horizon. + return; } - return 0.0; + + // IntegrateQuadDiffuse is a cheap approximation compared to specular. + diffuse = IntegrateQuadDiffuse(v, vertexCount, doubleSided); + + ApplyLtcMatrixToQuad(ltcMat, v, vertexCount); + + // IntegrateQuadSpecular uses more accurate integration to handle smooth surfaces correctly. + specular = IntegrateQuadSpecular(v, vertexCount, doubleSided); } // Checks an edge against the horizon and integrates it. -// p0 - first point -// p1 - second point -// prevClipPoint - the clip point saved from the last time an edge went from above to below the horizon -// sum - the sum total of all integrations to contribute to. +// p0 - First point +// p1 - Second point +// prevClipPoint - The clip point saved from the last time an edge went from above to below the horizon +// ltcMat - The ltc lookup matrix for specular +// diffuse - The current sum total of diffuse contribution to apply additional contribution to +// specular - The current sum total of specular contribution to apply additional contribution to // // Explanation: // When evaluating edges of a polygon there are four possible states to deal with @@ -283,28 +397,34 @@ float LtcQuadEvaluate(in float3 normal, in float3 dirToView, in float3x3 ltcMat, // 4. Both points are below the horizon // - Do nothing. -void EvaluatePolyEdge(in float3 p0, in float3 p1, inout float3 prevClipPoint, inout float sum) +void EvaluatePolyEdge(in float3 p0, in float3 p1, inout float3 prevClipPoint, in float3x3 ltcMat, inout float diffuse, inout float specular) { if (p0.z > 0.0) { if (p1.z > 0.0) { // Both above horizon - sum += IntegrateEdge(normalize(p0), normalize(p1)); + diffuse += IntegrateEdgeDiffuse(normalize(p0), normalize(p1)); + specular += IntegrateEdge(normalize(mul(ltcMat, p0)), normalize(mul(ltcMat, p1))); } else { // Going from above to below horizon - prevClipPoint = normalize(ClipEdge(p0, p1)); - sum += IntegrateEdge(normalize(p0), prevClipPoint); + prevClipPoint = ClipEdge(p0, p1); + diffuse += IntegrateEdgeDiffuse(normalize(p0), normalize(prevClipPoint)); + specular += IntegrateEdge(normalize(mul(ltcMat, p0)), normalize(mul(ltcMat, prevClipPoint))); } } else if (p1.z > 0.0) { // Going from below to above horizon - float3 clipPoint = normalize(ClipEdge(p1, p0)); - sum += IntegrateEdge(prevClipPoint, clipPoint); - sum += IntegrateEdge(clipPoint, normalize(p1)); + float3 clipPoint = ClipEdge(p1, p0); + diffuse += IntegrateEdgeDiffuse(normalize(prevClipPoint), normalize(clipPoint)); + diffuse += IntegrateEdgeDiffuse(normalize(clipPoint), normalize(p1)); + + clipPoint = mul(ltcMat, clipPoint); + specular += IntegrateEdge(normalize(mul(ltcMat, prevClipPoint)), normalize(clipPoint)); + specular += IntegrateEdge(normalize(clipPoint), normalize(mul(ltcMat, p1))); } } @@ -316,26 +436,38 @@ void EvaluatePolyEdge(in float3 p0, in float3 p1, inout float3 prevClipPoint, in // positions - The buffer where the polygon positions are // startIdx - The index of the first polygon position // endIdx - The index of the point directly after the last polygon position -// +// diffuse - The output diffuse response for the polygon light +// specular - The output specular response for the polygon light // The most complicated aspect of this function is clipping the polygon against the horizon of the surface point. See // EvaluatePolyEdge() above for details on the general concept. However, this function must deal with the case of the // first point being below the horizon. In that case, it needs to search in reverse from the end for the first point // above the horizon, and save the intersection point between the above and below points so it can be used in // EvaluatePolyEdge() later. During this search it also adjusts the end point index as necessary to avoid processing // those points that are below the horizon. -float LtcPolygonEvaluate(in float3 pos, in float3 normal, in float3 dirToView, in float3x3 ltcMat, in StructuredBuffer positions, in uint startIdx, in uint endIdx) +void LtcPolygonEvaluate( + in float3 pos, + in float3 normal, + in float3 dirToView, + in float3x3 ltcMat, + in StructuredBuffer positions, + in uint startIdx, + in uint endIdx, + out float diffuse, + out float specular +) { if (endIdx - startIdx < 3) { - return 0.0; // Must have at least 3 points to form a polygon. + return; // Must have at least 3 points to form a polygon. } // Rotate ltc matrix - ltcMat = mul(ltcMat, BuildViewAlignedOrthonormalBasis(normal, dirToView)); + float3x3 orthonormalMat = BuildViewAlignedOrthonormalBasis(normal, dirToView); // Prepare initial values - float sum = 0.0; // sum of edge integation - float3 p0 = mul(ltcMat, positions[startIdx].xyz - pos); // First point in polygon + float3 p0 = mul(orthonormalMat, positions[startIdx].xyz - pos); // First point in polygon + diffuse = 0.0; + specular = 0.0; float3 prevClipPoint = float3(0.0, 0.0, 0.0); // Used to hold previous clip point when polygon dips below horizon. float3 closePoint = p0; @@ -349,10 +481,10 @@ float LtcPolygonEvaluate(in float3 pos, in float3 normal, in float3 dirToView, i // searching backwards, updating the endIdx along the way to avoid reprocessing those points later for ( ; endIdx > startIdx + 1; --endIdx) { - float3 prevPoint = mul(ltcMat, positions[endIdx - 1].xyz - pos); - if (prevPoint.z > 0) + float3 prevPoint = mul(orthonormalMat, positions[endIdx - 1].xyz - pos); + if (prevPoint.z > 0.0) { - prevClipPoint = normalize(ClipEdge(prevPoint, p0)); + prevClipPoint = ClipEdge(prevPoint, p0); closePoint = prevClipPoint; break; } @@ -362,7 +494,7 @@ float LtcPolygonEvaluate(in float3 pos, in float3 normal, in float3 dirToView, i // Check if all points below horizon if (endIdx == startIdx + 1) { - return 0.0; + return; } p0 = firstPoint; // Restore the original p0 @@ -371,13 +503,14 @@ float LtcPolygonEvaluate(in float3 pos, in float3 normal, in float3 dirToView, i // Evaluate all the points for (uint curIdx = startIdx + 1; curIdx < endIdx; ++curIdx) { - float3 p1 = mul(ltcMat, positions[curIdx].xyz - pos); // Current point in polygon - EvaluatePolyEdge(p0, p1, prevClipPoint, sum); + float3 p1 = mul(orthonormalMat, positions[curIdx].xyz - pos); // Current point in polygon + EvaluatePolyEdge(p0, p1, prevClipPoint, ltcMat, diffuse, specular); p0 = p1; } - EvaluatePolyEdge(p0, closePoint, prevClipPoint, sum); + EvaluatePolyEdge(p0, closePoint, prevClipPoint, ltcMat, diffuse, specular); // Note: negated due to winding order - return -sum; + diffuse = -diffuse; + specular = -specular; } diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/PolygonLight.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/PolygonLight.azsli index bbd3c1c9e3..d7313556a2 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/PolygonLight.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/PolygonLight.azsli @@ -50,26 +50,25 @@ void ApplyPoylgonLight(ViewSrg::PolygonLight light, Surface surface, inout Light float radiusAttenuation = 1.0 - (falloff * falloff); radiusAttenuation = radiusAttenuation * radiusAttenuation; - // Diffuse - static const float3x3 identityMatrix = float3x3(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0); - float diffuse = LtcPolygonEvaluate(surface.position, surface.normal, lightingData.dirToCamera, identityMatrix, ViewSrg::m_polygonLightPoints, startIndex, endIndex); - diffuse = doubleSided ? abs(diffuse) : max(0.0, diffuse); - - // Specular float2 ltcCoords = LtcCoords(dot(surface.normal, lightingData.dirToCamera), surface.roughnessLinear); float3x3 ltcMat = LtcMatrix(SceneSrg::m_ltcMatrix, ltcCoords); - float3 specular = LtcPolygonEvaluate(surface.position, surface.normal, lightingData.dirToCamera, ltcMat, ViewSrg::m_polygonLightPoints, startIndex, endIndex); + + float diffuse = 0.0; + float specular = 0.0; + + LtcPolygonEvaluate(surface.position, surface.normal, lightingData.dirToCamera, ltcMat, ViewSrg::m_polygonLightPoints, startIndex, endIndex, diffuse, specular); + diffuse = doubleSided ? abs(diffuse) : max(0.0, diffuse); specular = doubleSided ? abs(specular) : max(0.0, specular); // Apply BRDF scale terms (BRDF magnitude and Schlick Fresnel) float2 schlick = SceneSrg::m_ltcAmplification.Sample(PassSrg::LinearSampler, ltcCoords).xy; - specular *= schlick.x + (1.0 - surface.specularF0) * schlick.y; + float3 specularRGB = specular * (schlick.x + (1.0 - surface.specularF0) * schlick.y); // Scale by inverse surface area of hemisphere (1/2pi), attenuation, and light intensity float3 intensity = 0.5 * INV_PI * radiusAttenuation * abs(light.m_rgbIntensityNits); lightingData.diffuseLighting += surface.albedo * diffuse * intensity; - lightingData.specularLighting += surface.specularF0 * specular * intensity; + lightingData.specularLighting += surface.specularF0 * specularRGB * intensity; } void ApplyPolygonLights(Surface surface, inout LightingData lightingData) diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/QuadLight.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/QuadLight.azsli index 91981e4f4d..29ee97fd6f 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/QuadLight.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/QuadLight.azsli @@ -111,24 +111,22 @@ void ApplyQuadLight(ViewSrg::QuadLight light, Surface surface, inout LightingDat { float3 p[4] = {p0, p1, p2, p3}; - // Diffuse - float3x3 identityMatrix = float3x3(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0); - float diffuse = LtcQuadEvaluate(surface.normal, lightingData.dirToCamera, identityMatrix, p, doubleSided); - - // Specular float2 ltcCoords = LtcCoords(dot(surface.normal, lightingData.dirToCamera), surface.roughnessLinear); float3x3 ltcMat = LtcMatrix(SceneSrg::m_ltcMatrix, ltcCoords); - float3 specular = LtcQuadEvaluate(surface.normal, lightingData.dirToCamera, ltcMat, p, doubleSided); + + float diffuse = 0.0; + float specular = 0.0; + LtcQuadEvaluate(surface.normal, lightingData.dirToCamera, ltcMat, p, doubleSided, diffuse, specular); // Apply BRDF scale terms (BRDF magnitude and Schlick Fresnel) float2 schlick = SceneSrg::m_ltcAmplification.Sample(PassSrg::LinearSampler, ltcCoords).xy; - specular *= schlick.x + (1.0 - surface.specularF0) * schlick.y; + float3 specularRGB = specular * (schlick.x + (1.0 - surface.specularF0) * schlick.y); // Scale by inverse surface area of hemisphere (1/2pi), attenuation, and light intensity float3 intensity = 0.5 * INV_PI * radiusAttenuation * light.m_rgbIntensityNits; lightingData.diffuseLighting += surface.albedo * diffuse * intensity; - lightingData.specularLighting += surface.specularF0 * specular * intensity; + lightingData.specularLighting += surface.specularF0 * specularRGB * intensity; } else { diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/ParallaxMapping.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/ParallaxMapping.azsli index 2c2f956f8f..c979cff128 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/ParallaxMapping.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/ParallaxMapping.azsli @@ -427,7 +427,7 @@ PixelDepthOffset CalcPixelDepthOffset( float depthFactor, float4 clipOffsetPosition = mul(viewProjectionMatrix, float4(worldOffsetPosition, 1.0)); PixelDepthOffset pdo; - pdo.m_depthCS = clipOffsetPosition.z; + pdo.m_depthCS = clipOffsetPosition.w; pdo.m_depthNDC = clipOffsetPosition.z / clipOffsetPosition.w; pdo.m_worldPosition = worldOffsetPosition; return pdo; diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/SkinnedMesh/LinearSkinningCS.azsl b/Gems/Atom/Feature/Common/Assets/Shaders/SkinnedMesh/LinearSkinningCS.azsl index fc5684fe7f..99d38463c7 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/SkinnedMesh/LinearSkinningCS.azsl +++ b/Gems/Atom/Feature/Common/Assets/Shaders/SkinnedMesh/LinearSkinningCS.azsl @@ -14,6 +14,15 @@ option enum class SkinningMethod { LinearSkinning, DualQuaternion } o_skinningMe option bool o_applyMorphTargets = false; option bool o_applyColorMorphTargets = false; +float3 ReadFloat3FromFloatBuffer(Buffer buffer, uint index) +{ + float3 result; + result.x = buffer[index * 3]; + result.y = buffer[index * 3 + 1]; + result.z = buffer[index * 3 + 2]; + return result; +} + // Apply a morph target delta with three components void ApplyMorphTargetDelta(uint streamOffset, uint vertexIndex, inout float3 modifiedValue) { @@ -162,10 +171,10 @@ void MainCS(uint3 thread_id: SV_DispatchThreadID) return; } - float3 position = InstanceSrg::m_sourcePositions[i]; - float3 normal = InstanceSrg::m_sourceNormals[i]; - float4 tangent = InstanceSrg::m_sourceTangents[i]; - float3 bitangent = InstanceSrg::m_sourceBiTangents[i]; + float3 position = ReadFloat3FromFloatBuffer(InstanceSrg::m_sourcePositions, i); + float3 normal = ReadFloat3FromFloatBuffer(InstanceSrg::m_sourceNormals, i); + float4 tangent = InstanceSrg::m_sourceTangents[i]; + float3 bitangent = ReadFloat3FromFloatBuffer(InstanceSrg::m_sourceBiTangents, i); // Four indices, 16-bits each, stored in 2 32-bit uints uint2 rawIndices = InstanceSrg::m_sourceBlendIndices.Load2(i * 8); diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/SkinnedMesh/LinearSkinningPassSRG.azsli b/Gems/Atom/Feature/Common/Assets/Shaders/SkinnedMesh/LinearSkinningPassSRG.azsli index 95802ddbb7..066cefdc37 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/SkinnedMesh/LinearSkinningPassSRG.azsli +++ b/Gems/Atom/Feature/Common/Assets/Shaders/SkinnedMesh/LinearSkinningPassSRG.azsli @@ -20,10 +20,12 @@ ShaderResourceGroup InstanceSrg : SRG_PerDraw uint m_totalNumberOfThreadsX; // Per-model input - Buffer m_sourcePositions; // POSITION 0 - Buffer m_sourceNormals; // NORMAL 0 + // Positions, normals, and bitangents are all 3-component per-vertex buffers, + // but Metal doesn't support float3 buffers so Buffer is used instead + Buffer m_sourcePositions; // POSITION 0 + Buffer m_sourceNormals; // NORMAL 0 Buffer m_sourceTangents; // TANGENT 0 - Buffer m_sourceBiTangents; // BITANGENT 0 + Buffer m_sourceBiTangents; // BITANGENT 0 ByteAddressBuffer m_sourceBlendIndices; // BLENDINDICES 0 Buffer m_sourceBlendWeights; // BLENDWEIGHTS 0 diff --git a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/FrameCaptureBus.h b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/FrameCaptureBus.h index e783a03071..53e7de9148 100644 --- a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/FrameCaptureBus.h +++ b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/FrameCaptureBus.h @@ -46,14 +46,16 @@ namespace AZ //! Save a buffer attachment or a image attachment binded to a pass's slot to a data file. //! @param passHierarchy For finding the pass by using PassHierarchyFilter //! @param slotName Name of the pass's slot. The attachment bound to this slot will be captured. + //! @param option Only valid for an InputOutput attachment. Use PassAttachmentReadbackOption::Input to capture the input state + //! and use PassAttachmentReadbackOption::Output to capture the output state //! @param outputFilename The output file path. virtual bool CapturePassAttachment(const AZStd::vector& passHierarchy, const AZStd::string& slotName - , const AZStd::string& outputFilePath) = 0; + , const AZStd::string& outputFilePath, RPI::PassAttachmentReadbackOption option) = 0; //! Similar to CapturePassAttachment. But instead of saving the read back result to a file, it will call the callback function provide //! in the input when callback is finished virtual bool CapturePassAttachmentWithCallback(const AZStd::vector& passHierarchy, const AZStd::string& slotName - , RPI::AttachmentReadback::CallbackFunction callback) = 0; + , RPI::AttachmentReadback::CallbackFunction callback, RPI::PassAttachmentReadbackOption option) = 0; }; using FrameCaptureRequestBus = EBus; diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGrid.cpp b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGrid.cpp index e435de7799..438c8c2f28 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGrid.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGrid.cpp @@ -245,6 +245,29 @@ namespace AZ m_bakedClassificationImage.get(); } + void DiffuseProbeGrid::ResetCullingVisibility() + { + m_cullable.m_isVisible = false; + } + + bool DiffuseProbeGrid::GetIsVisible() const + { + // we need to go through the DiffuseProbeGrid passes at least once in order to initialize + // the RenderObjectSrg, which means we need to be visible until the RenderObjectSrg is created + if (m_renderObjectSrg == nullptr) + { + return true; + } + + // if a bake is in progress we need to make this DiffuseProbeGrid visible + if (!m_textureReadback.IsIdle()) + { + return true; + } + + return m_cullable.m_isVisible; + } + uint32_t DiffuseProbeGrid::GetTotalProbeCount() const { return m_probeCountX * m_probeCountY * m_probeCountZ; diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGrid.h b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGrid.h index 3c5c481fea..06fa8592a3 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGrid.h +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGrid.h @@ -103,6 +103,9 @@ namespace AZ void DecrementRemainingRelocationIterations() { m_remainingRelocationIterations = AZStd::max(0, m_remainingRelocationIterations - 1); } void ResetRemainingRelocationIterations() { m_remainingRelocationIterations = DefaultNumRelocationIterations; } + void ResetCullingVisibility(); + bool GetIsVisible() const; + // compute total number of probes in the grid uint32_t GetTotalProbeCount() const; diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBlendDistancePass.cpp b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBlendDistancePass.cpp index e8c99a630f..f75c62cd6c 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBlendDistancePass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBlendDistancePass.cpp @@ -82,7 +82,7 @@ namespace AZ RPI::Scene* scene = m_pipeline->GetScene(); DiffuseProbeGridFeatureProcessor* diffuseProbeGridFeatureProcessor = scene->GetFeatureProcessor(); - if (!diffuseProbeGridFeatureProcessor || diffuseProbeGridFeatureProcessor->GetRealTimeProbeGrids().empty()) + if (!diffuseProbeGridFeatureProcessor || diffuseProbeGridFeatureProcessor->GetVisibleRealTimeProbeGrids().empty()) { // no diffuse probe grids return; @@ -106,7 +106,7 @@ namespace AZ RPI::Scene* scene = m_pipeline->GetScene(); DiffuseProbeGridFeatureProcessor* diffuseProbeGridFeatureProcessor = scene->GetFeatureProcessor(); - for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetRealTimeProbeGrids()) + for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetVisibleRealTimeProbeGrids()) { // probe raytrace image { @@ -145,7 +145,7 @@ namespace AZ RPI::Scene* scene = m_pipeline->GetScene(); DiffuseProbeGridFeatureProcessor* diffuseProbeGridFeatureProcessor = scene->GetFeatureProcessor(); - for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetRealTimeProbeGrids()) + for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetVisibleRealTimeProbeGrids()) { // the diffuse probe grid Srg must be updated in the Compile phase in order to successfully bind the ReadWrite shader inputs // (see ValidateSetImageView() in ShaderResourceGroupData.cpp) @@ -162,7 +162,7 @@ namespace AZ DiffuseProbeGridFeatureProcessor* diffuseProbeGridFeatureProcessor = scene->GetFeatureProcessor(); // submit the DispatchItem for each DiffuseProbeGrid - for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetRealTimeProbeGrids()) + for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetVisibleRealTimeProbeGrids()) { const RHI::ShaderResourceGroup* shaderResourceGroup = diffuseProbeGrid->GetBlendDistanceSrg()->GetRHIShaderResourceGroup(); commandList->SetShaderResourceGroupForDispatch(*shaderResourceGroup); diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBlendIrradiancePass.cpp b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBlendIrradiancePass.cpp index 637c655074..748f0b8093 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBlendIrradiancePass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBlendIrradiancePass.cpp @@ -82,7 +82,7 @@ namespace AZ RPI::Scene* scene = m_pipeline->GetScene(); DiffuseProbeGridFeatureProcessor* diffuseProbeGridFeatureProcessor = scene->GetFeatureProcessor(); - if (!diffuseProbeGridFeatureProcessor || diffuseProbeGridFeatureProcessor->GetRealTimeProbeGrids().empty()) + if (!diffuseProbeGridFeatureProcessor || diffuseProbeGridFeatureProcessor->GetVisibleRealTimeProbeGrids().empty()) { // no diffuse probe grids return; @@ -106,7 +106,7 @@ namespace AZ RPI::Scene* scene = m_pipeline->GetScene(); DiffuseProbeGridFeatureProcessor* diffuseProbeGridFeatureProcessor = scene->GetFeatureProcessor(); - for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetRealTimeProbeGrids()) + for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetVisibleRealTimeProbeGrids()) { // probe raytrace image { @@ -145,7 +145,7 @@ namespace AZ RPI::Scene* scene = m_pipeline->GetScene(); DiffuseProbeGridFeatureProcessor* diffuseProbeGridFeatureProcessor = scene->GetFeatureProcessor(); - for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetRealTimeProbeGrids()) + for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetVisibleRealTimeProbeGrids()) { // the diffuse probe grid Srg must be updated in the Compile phase in order to successfully bind the ReadWrite shader inputs // (see ValidateSetImageView() in ShaderResourceGroupData.cpp) @@ -162,7 +162,7 @@ namespace AZ DiffuseProbeGridFeatureProcessor* diffuseProbeGridFeatureProcessor = scene->GetFeatureProcessor(); // submit the DispatchItem for each DiffuseProbeGrid - for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetRealTimeProbeGrids()) + for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetVisibleRealTimeProbeGrids()) { const RHI::ShaderResourceGroup* shaderResourceGroup = diffuseProbeGrid->GetBlendIrradianceSrg()->GetRHIShaderResourceGroup(); commandList->SetShaderResourceGroupForDispatch(*shaderResourceGroup); diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBorderUpdatePass.cpp b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBorderUpdatePass.cpp index f437b3a1ef..a46ee0e550 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBorderUpdatePass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBorderUpdatePass.cpp @@ -95,7 +95,7 @@ namespace AZ RPI::Scene* scene = m_pipeline->GetScene(); DiffuseProbeGridFeatureProcessor* diffuseProbeGridFeatureProcessor = scene->GetFeatureProcessor(); - if (!diffuseProbeGridFeatureProcessor || diffuseProbeGridFeatureProcessor->GetRealTimeProbeGrids().empty()) + if (!diffuseProbeGridFeatureProcessor || diffuseProbeGridFeatureProcessor->GetVisibleRealTimeProbeGrids().empty()) { // no diffuse probe grids return; @@ -119,7 +119,7 @@ namespace AZ RPI::Scene* scene = m_pipeline->GetScene(); DiffuseProbeGridFeatureProcessor* diffuseProbeGridFeatureProcessor = scene->GetFeatureProcessor(); - for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetRealTimeProbeGrids()) + for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetVisibleRealTimeProbeGrids()) { // probe irradiance image { @@ -148,7 +148,7 @@ namespace AZ RPI::Scene* scene = m_pipeline->GetScene(); DiffuseProbeGridFeatureProcessor* diffuseProbeGridFeatureProcessor = scene->GetFeatureProcessor(); - for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetRealTimeProbeGrids()) + for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetVisibleRealTimeProbeGrids()) { // the diffuse probe grid Srg must be updated in the Compile phase in order to successfully bind the ReadWrite shader inputs // (see line ValidateSetImageView() in ShaderResourceGroupData.cpp) @@ -168,7 +168,7 @@ namespace AZ DiffuseProbeGridFeatureProcessor* diffuseProbeGridFeatureProcessor = scene->GetFeatureProcessor(); // submit the DispatchItems for each DiffuseProbeGrid - for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetRealTimeProbeGrids()) + for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetVisibleRealTimeProbeGrids()) { uint32_t probeCountX; uint32_t probeCountY; diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridClassificationPass.cpp b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridClassificationPass.cpp index 93297fe336..7ddc3f7d68 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridClassificationPass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridClassificationPass.cpp @@ -86,7 +86,7 @@ namespace AZ RPI::Scene* scene = m_pipeline->GetScene(); DiffuseProbeGridFeatureProcessor* diffuseProbeGridFeatureProcessor = scene->GetFeatureProcessor(); - if (!diffuseProbeGridFeatureProcessor || diffuseProbeGridFeatureProcessor->GetRealTimeProbeGrids().empty()) + if (!diffuseProbeGridFeatureProcessor || diffuseProbeGridFeatureProcessor->GetVisibleRealTimeProbeGrids().empty()) { // no diffuse probe grids return; @@ -110,7 +110,7 @@ namespace AZ RPI::Scene* scene = m_pipeline->GetScene(); DiffuseProbeGridFeatureProcessor* diffuseProbeGridFeatureProcessor = scene->GetFeatureProcessor(); - for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetRealTimeProbeGrids()) + for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetVisibleRealTimeProbeGrids()) { // probe raytrace image { @@ -138,7 +138,7 @@ namespace AZ { RPI::Scene* scene = m_pipeline->GetScene(); DiffuseProbeGridFeatureProcessor* diffuseProbeGridFeatureProcessor = scene->GetFeatureProcessor(); - for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetRealTimeProbeGrids()) + for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetVisibleRealTimeProbeGrids()) { // the diffuse probe grid Srg must be updated in the Compile phase in order to successfully bind the ReadWrite shader inputs // (see ValidateSetImageView() in ShaderResourceGroupData.cpp) @@ -154,7 +154,7 @@ namespace AZ DiffuseProbeGridFeatureProcessor* diffuseProbeGridFeatureProcessor = scene->GetFeatureProcessor(); // submit the DispatchItems for each DiffuseProbeGrid - for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetRealTimeProbeGrids()) + for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetVisibleRealTimeProbeGrids()) { const RHI::ShaderResourceGroup* shaderResourceGroup = diffuseProbeGrid->GetClassificationSrg()->GetRHIShaderResourceGroup(); commandList->SetShaderResourceGroupForDispatch(*shaderResourceGroup); diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridFeatureProcessor.cpp index 5ceb8a197d..a001f60e89 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridFeatureProcessor.cpp @@ -175,6 +175,27 @@ namespace AZ } } + void DiffuseProbeGridFeatureProcessor::OnBeginPrepareRender() + { + for (auto& diffuseProbeGrid : m_realTimeDiffuseProbeGrids) + { + diffuseProbeGrid->ResetCullingVisibility(); + } + } + + void DiffuseProbeGridFeatureProcessor::OnEndPrepareRender() + { + // re-build the list of visible real-time diffuse probe grids + m_visibleRealTimeDiffuseProbeGrids.clear(); + for (auto& diffuseProbeGrid : m_realTimeDiffuseProbeGrids) + { + if (diffuseProbeGrid->GetIsVisible()) + { + m_visibleRealTimeDiffuseProbeGrids.push_back(diffuseProbeGrid); + } + } + } + DiffuseProbeGridHandle DiffuseProbeGridFeatureProcessor::AddProbeGrid(const AZ::Transform& transform, const AZ::Vector3& extents, const AZ::Vector3& probeSpacing) { AZStd::shared_ptr diffuseProbeGrid = AZStd::make_shared(); @@ -215,6 +236,17 @@ namespace AZ m_realTimeDiffuseProbeGrids.erase(itEntry); } + // remove from side list of visible real-time grids + itEntry = AZStd::find_if(m_visibleRealTimeDiffuseProbeGrids.begin(), m_visibleRealTimeDiffuseProbeGrids.end(), [&](AZStd::shared_ptr const& entry) + { + return (entry == probeGrid); + }); + + if (itEntry != m_visibleRealTimeDiffuseProbeGrids.end()) + { + m_visibleRealTimeDiffuseProbeGrids.erase(itEntry); + } + probeGrid = nullptr; } diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridFeatureProcessor.h b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridFeatureProcessor.h index 4d045ec62d..9771c058ad 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridFeatureProcessor.h +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridFeatureProcessor.h @@ -76,6 +76,9 @@ namespace AZ // retrieve the side list of probe grids that are using real-time (raytraced) mode DiffuseProbeGridVector& GetRealTimeProbeGrids() { return m_realTimeDiffuseProbeGrids; } + // retrieve the side list of probe grids that are using real-time (raytraced) mode and visible (on screen) + DiffuseProbeGridVector& GetVisibleRealTimeProbeGrids() { return m_visibleRealTimeDiffuseProbeGrids; } + private: AZ_DISABLE_COPY_MOVE(DiffuseProbeGridFeatureProcessor); @@ -96,6 +99,8 @@ namespace AZ void HandleAssetNotification(Data::Asset asset, DiffuseProbeGridTextureNotificationType notificationType); // RPI::SceneNotificationBus::Handler overrides + void OnBeginPrepareRender() override; + void OnEndPrepareRender() override; void OnRenderPipelinePassesChanged(RPI::RenderPipeline* renderPipeline) override; void OnRenderPipelineAdded(RPI::RenderPipelinePtr pipeline) override; void OnRenderPipelineRemoved(RPI::RenderPipeline* pipeline) override; @@ -110,6 +115,9 @@ namespace AZ // side list of diffuse probe grids that are in real-time mode (subset of m_diffuseProbeGrids) DiffuseProbeGridVector m_realTimeDiffuseProbeGrids; + // side list of diffuse probe grids that are in real-time mode and visible (subset of m_realTimeDiffuseProbeGrids) + DiffuseProbeGridVector m_visibleRealTimeDiffuseProbeGrids; + // position structure for the box vertices struct Position { diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridRayTracingPass.cpp b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridRayTracingPass.cpp index 8079912363..2ff9c5991e 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridRayTracingPass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridRayTracingPass.cpp @@ -130,7 +130,7 @@ namespace AZ } DiffuseProbeGridFeatureProcessor* diffuseProbeGridFeatureProcessor = scene->GetFeatureProcessor(); - if (!diffuseProbeGridFeatureProcessor || diffuseProbeGridFeatureProcessor->GetRealTimeProbeGrids().empty()) + if (!diffuseProbeGridFeatureProcessor || diffuseProbeGridFeatureProcessor->GetVisibleRealTimeProbeGrids().empty()) { // no diffuse probe grids return; @@ -147,9 +147,9 @@ namespace AZ DiffuseProbeGridFeatureProcessor* diffuseProbeGridFeatureProcessor = scene->GetFeatureProcessor(); RayTracingFeatureProcessor* rayTracingFeatureProcessor = scene->GetFeatureProcessor(); - frameGraph.SetEstimatedItemCount(aznumeric_cast(diffuseProbeGridFeatureProcessor->GetRealTimeProbeGrids().size())); + frameGraph.SetEstimatedItemCount(aznumeric_cast(diffuseProbeGridFeatureProcessor->GetVisibleRealTimeProbeGrids().size())); - for (const auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetRealTimeProbeGrids()) + for (const auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetVisibleRealTimeProbeGrids()) { // TLAS { @@ -254,7 +254,7 @@ namespace AZ rayTracingFeatureProcessor->GetMeshInfoBuffer() && rayTracingFeatureProcessor->GetSubMeshCount()) { - for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetRealTimeProbeGrids()) + for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetVisibleRealTimeProbeGrids()) { // the diffuse probe grid Srg must be updated in the Compile phase in order to successfully bind the ReadWrite shader // inputs (see line ValidateSetImageView() in ShaderResourceGroupData.cpp) @@ -302,7 +302,7 @@ namespace AZ m_rayTracingShaderTable) { // submit the DispatchRaysItem for each DiffuseProbeGrid - for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetRealTimeProbeGrids()) + for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetVisibleRealTimeProbeGrids()) { const RHI::ShaderResourceGroup* shaderResourceGroups[] = { diffuseProbeGrid->GetRayTraceSrg()->GetRHIShaderResourceGroup(), diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridRelocationPass.cpp b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridRelocationPass.cpp index c6464fcc72..efdfbebcae 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridRelocationPass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridRelocationPass.cpp @@ -86,7 +86,7 @@ namespace AZ RPI::Scene* scene = m_pipeline->GetScene(); DiffuseProbeGridFeatureProcessor* diffuseProbeGridFeatureProcessor = scene->GetFeatureProcessor(); - if (!diffuseProbeGridFeatureProcessor || diffuseProbeGridFeatureProcessor->GetRealTimeProbeGrids().empty()) + if (!diffuseProbeGridFeatureProcessor || diffuseProbeGridFeatureProcessor->GetVisibleRealTimeProbeGrids().empty()) { // no diffuse probe grids return; @@ -103,7 +103,7 @@ namespace AZ // create the Relocation Srgs for each DiffuseProbeGrid, and check to see if any grids need relocation bool needRelocation = false; - for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetRealTimeProbeGrids()) + for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetVisibleRealTimeProbeGrids()) { uint32_t rayTracingDataRevision = rayTracingFeatureProcessor->GetRevision(); if (rayTracingDataRevision != m_rayTracingDataRevision) @@ -134,7 +134,7 @@ namespace AZ RPI::Scene* scene = m_pipeline->GetScene(); DiffuseProbeGridFeatureProcessor* diffuseProbeGridFeatureProcessor = scene->GetFeatureProcessor(); - for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetRealTimeProbeGrids()) + for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetVisibleRealTimeProbeGrids()) { // probe raytrace image { @@ -162,7 +162,7 @@ namespace AZ { RPI::Scene* scene = m_pipeline->GetScene(); DiffuseProbeGridFeatureProcessor* diffuseProbeGridFeatureProcessor = scene->GetFeatureProcessor(); - for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetRealTimeProbeGrids()) + for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetVisibleRealTimeProbeGrids()) { // the diffuse probe grid Srg must be updated in the Compile phase in order to successfully bind the ReadWrite shader inputs // (see ValidateSetImageView() in ShaderResourceGroupData.cpp) @@ -182,7 +182,7 @@ namespace AZ DiffuseProbeGridFeatureProcessor* diffuseProbeGridFeatureProcessor = scene->GetFeatureProcessor(); // submit the DispatchItems for each DiffuseProbeGrid - for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetRealTimeProbeGrids()) + for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetVisibleRealTimeProbeGrids()) { const RHI::ShaderResourceGroup* shaderResourceGroup = diffuseProbeGrid->GetRelocationSrg()->GetRHIShaderResourceGroup(); commandList->SetShaderResourceGroupForDispatch(*shaderResourceGroup); diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridRenderPass.cpp b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridRenderPass.cpp index 6f6f83dda2..a50d0084f1 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridRenderPass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridRenderPass.cpp @@ -94,7 +94,12 @@ namespace AZ { continue; } - + + if (!diffuseProbeGrid->GetIsVisible()) + { + continue; + } + // probe irradiance image { if (diffuseProbeGrid->GetMode() == DiffuseProbeGridMode::Baked) @@ -182,6 +187,11 @@ namespace AZ continue; } + if (!diffuseProbeGrid->GetIsVisible()) + { + continue; + } + // the diffuse probe grid Srg must be updated in the Compile phase in order to successfully bind the ReadWrite shader inputs // (see ValidateSetImageView() of ShaderResourceGroupData.cpp) diffuseProbeGrid->UpdateRenderObjectSrg(); diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridTextureReadback.cpp b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridTextureReadback.cpp index 3e808a99c1..8931a4feb1 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridTextureReadback.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridTextureReadback.cpp @@ -22,7 +22,9 @@ namespace AZ AZ_Assert(m_readbackState == DiffuseProbeGridReadbackState::Idle, "DiffuseProbeGridTextureReadback is already processing a readback request"); m_callback = callback; - m_readbackState = DiffuseProbeGridReadbackState::Irradiance; + + m_remainingInitializationFrames = DefaultNumInitializationFrames; + m_readbackState = DiffuseProbeGridReadbackState::Initializing; } void DiffuseProbeGridTextureReadback::Update(const AZ::Name& passName) @@ -32,6 +34,19 @@ namespace AZ return; } + if (m_readbackState == DiffuseProbeGridReadbackState::Initializing) + { + if (m_remainingInitializationFrames > 0) + { + // still in the initialization state to allow the irradiance textures to settle, decrement the frame count + m_remainingInitializationFrames--; + return; + } + + // settling complete, move to the irradiance readback state to begin the readback process + m_readbackState = DiffuseProbeGridReadbackState::Irradiance; + } + if (m_attachmentReadback.get() && m_attachmentReadback->GetReadbackState() > RPI::AttachmentReadback::ReadbackState::Idle) { // still processing previous request diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridTextureReadback.h b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridTextureReadback.h index c399fac534..b0d35069a7 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridTextureReadback.h +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridTextureReadback.h @@ -20,6 +20,7 @@ namespace AZ enum class DiffuseProbeGridReadbackState { Idle, + Initializing, Irradiance, Distance, Relocation, @@ -39,6 +40,8 @@ namespace AZ void Update(const AZ::Name& passName); void FrameBegin(AZ::RPI::Pass::FramePrepareParams& params); + bool IsIdle() const { return m_readbackState == DiffuseProbeGridReadbackState::Idle; } + private: DiffuseProbeGrid* m_diffuseProbeGrid = nullptr; @@ -50,6 +53,10 @@ namespace AZ AZ::RPI::AttachmentReadback::ReadbackResult m_distanceReadbackResult; AZ::RPI::AttachmentReadback::ReadbackResult m_relocationReadbackResult; AZ::RPI::AttachmentReadback::ReadbackResult m_classificationReadbackResult; + + // number of frames to delay before starting the texture readbacks, this allows the textures to settle + static constexpr int32_t DefaultNumInitializationFrames = 50; + int32_t m_remainingInitializationFrames = DefaultNumInitializationFrames; }; } // namespace Render } // namespace AZ diff --git a/Gems/Atom/Feature/Common/Code/Source/FrameCaptureSystemComponent.cpp b/Gems/Atom/Feature/Common/Code/Source/FrameCaptureSystemComponent.cpp index a115bfa6e8..e8e4609ec4 100644 --- a/Gems/Atom/Feature/Common/Code/Source/FrameCaptureSystemComponent.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/FrameCaptureSystemComponent.cpp @@ -343,7 +343,7 @@ namespace AZ } bool FrameCaptureSystemComponent::CapturePassAttachment(const AZStd::vector& passHierarchy, const AZStd::string& slot, - const AZStd::string& outputFilePath) + const AZStd::string& outputFilePath, RPI::PassAttachmentReadbackOption option) { InitReadback(); @@ -376,40 +376,22 @@ namespace AZ return false; } - AZ::RPI::RenderPass* renderPass = azrtti_cast(foundPasses[0]); - if (renderPass) + AZ::RPI::Pass* pass = foundPasses[0]; + if (pass->ReadbackAttachment(m_readback, Name(slot), option)) { - Name slotName = Name(slot); - AZ::RPI::PassAttachment* attachment = nullptr; - for (auto& binding : renderPass->GetAttachmentBindings()) - { - if (binding.m_name == slotName) - { - attachment = binding.m_attachment.get(); - break; - } - } - if (attachment) - { - m_state = State::Pending; - m_result = FrameCaptureResult::None; - SystemTickBus::Handler::BusConnect(); - renderPass->ReadbackAttachment(m_readback, attachment); - } - else - { - AZ_Warning("FrameCaptureSystemComponent", false, "Failed to find attachment bound to pass [%s] slot [%s]", - renderPass->GetName().GetCStr(), slotName.GetCStr()); - return false; - } + m_state = State::Pending; + m_result = FrameCaptureResult::None; + SystemTickBus::Handler::BusConnect(); + return true; } - return true; + AZ_Warning("FrameCaptureSystemComponent", false, "Failed to readback the attachment bound to pass [%s] slot [%s]", pass->GetName().GetCStr(), slot.c_str()); + return false; } bool FrameCaptureSystemComponent::CapturePassAttachmentWithCallback(const AZStd::vector& passHierarchy, const AZStd::string& slotName - , RPI::AttachmentReadback::CallbackFunction callback) + , RPI::AttachmentReadback::CallbackFunction callback, RPI::PassAttachmentReadbackOption option) { - bool result = CapturePassAttachment(passHierarchy, slotName, ""); + bool result = CapturePassAttachment(passHierarchy, slotName, "", option); // Append state change to user provided call back AZ::RPI::AttachmentReadback::CallbackFunction callbackSetState = [&, callback](const AZ::RPI::AttachmentReadback::ReadbackResult& result) diff --git a/Gems/Atom/Feature/Common/Code/Source/FrameCaptureSystemComponent.h b/Gems/Atom/Feature/Common/Code/Source/FrameCaptureSystemComponent.h index 472dd5da74..eb08494699 100644 --- a/Gems/Atom/Feature/Common/Code/Source/FrameCaptureSystemComponent.h +++ b/Gems/Atom/Feature/Common/Code/Source/FrameCaptureSystemComponent.h @@ -36,9 +36,10 @@ namespace AZ bool CaptureScreenshot(const AZStd::string& filePath) override; bool CaptureScreenshotForWindow(const AZStd::string& filePath, AzFramework::NativeWindowHandle windowHandle) override; bool CaptureScreenshotWithPreview(const AZStd::string& outputFilePath) override; - bool CapturePassAttachment(const AZStd::vector& passHierarchy, const AZStd::string& slotName, const AZStd::string& outputFilePath) override; + bool CapturePassAttachment(const AZStd::vector& passHierarchy, const AZStd::string& slotName, const AZStd::string& outputFilePath, + RPI::PassAttachmentReadbackOption option) override; bool CapturePassAttachmentWithCallback(const AZStd::vector& passHierarchy, const AZStd::string& slotName - , RPI::AttachmentReadback::CallbackFunction callback) override; + , RPI::AttachmentReadback::CallbackFunction callback, RPI::PassAttachmentReadbackOption option) override; private: void CaptureAttachmentCallback(const AZ::RPI::AttachmentReadback::ReadbackResult& readbackResult); diff --git a/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreTexturePass.cpp b/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreTexturePass.cpp index 5faaba136e..63437ebbad 100644 --- a/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreTexturePass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreTexturePass.cpp @@ -64,23 +64,9 @@ namespace AZ // Set up read back attachment before children prepare if (m_readback->IsReady()) { - AZ::RPI::RenderPass* renderPass = azrtti_cast(m_renderTargetPass.get()); - if (renderPass) + if (m_renderTargetPass) { - RPI::PassAttachment* attachment = nullptr; - for (auto& binding : renderPass->GetAttachmentBindings()) - { - if (binding.m_slotType == RPI::PassSlotType::Output) - { - attachment = binding.m_attachment.get(); - break; - } - } - if (attachment) - { - renderPass->ReadbackAttachment(m_readback, attachment); - m_attachmentReadbackComplete = true; - } + m_attachmentReadbackComplete = m_renderTargetPass->ReadbackAttachment(m_readback, AZ::Name("RenderTargetOutput")); } } } diff --git a/Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbeFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbeFeatureProcessor.cpp index 3ec7bd4186..36e4689325 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbeFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbeFeatureProcessor.cpp @@ -266,6 +266,10 @@ namespace AZ { AZ_Assert(probe.get(), "SetProbeCubeMap called with an invalid handle"); probe->SetCubeMapImage(cubeMapImage, relativePath); + + // notify the MeshFeatureProcessor that the reflection probe changed + MeshFeatureProcessor* meshFeatureProcessor = GetParentScene()->GetFeatureProcessor(); + meshFeatureProcessor->UpdateMeshReflectionProbes(); } void ReflectionProbeFeatureProcessor::SetProbeTransform(const ReflectionProbeHandle& probe, const AZ::Transform& transform) diff --git a/Gems/Atom/Feature/Common/Code/Source/SkinnedMesh/SkinnedMeshInputBuffers.cpp b/Gems/Atom/Feature/Common/Code/Source/SkinnedMesh/SkinnedMeshInputBuffers.cpp index 75d079c937..8ef82dfac4 100644 --- a/Gems/Atom/Feature/Common/Code/Source/SkinnedMesh/SkinnedMeshInputBuffers.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/SkinnedMesh/SkinnedMeshInputBuffers.cpp @@ -118,7 +118,29 @@ namespace AZ } m_inputBufferAssets[static_cast(inputStream)] = bufferAsset; - m_inputBuffers[static_cast(inputStream)] = RPI::Buffer::FindOrCreate(bufferAsset); + Data::Instance buffer = RPI::Buffer::FindOrCreate(bufferAsset); + m_inputBuffers[static_cast(inputStream)] = buffer; + + // Create a buffer view to use as input to the skinning shader + AZ::RHI::Ptr bufferView = RHI::Factory::Get().CreateBufferView(); + bufferView->SetName(Name{ AZStd::string(buffer->GetBufferView()->GetName().GetStringView()) + "_SkinningInputBufferView" }); + RHI::BufferViewDescriptor bufferViewDescriptor = bufferAsset->GetBufferViewDescriptor(); + + // 3-component float buffers are not supported on metal for non-input assembly buffer views, so use a float view instead + if (bufferViewDescriptor.m_elementFormat == RHI::Format::R32G32B32_FLOAT) + { + // Use one float per element, with 3x as many elements + bufferViewDescriptor = RHI::BufferViewDescriptor::CreateTyped( + bufferViewDescriptor.m_elementOffset * 3, bufferViewDescriptor.m_elementCount * 3, RHI::Format::R32_FLOAT); + } + + [[maybe_unused]] RHI::ResultCode resultCode = + bufferView->Init(*buffer->GetRHIBuffer(), bufferViewDescriptor); + AZ_Error( + "SkinnedMeshInputBuffers", resultCode == RHI::ResultCode::Success, + "Failed to initialize buffer view for skinned mesh input."); + + m_bufferViews[static_cast(inputStream)] = bufferView; } void SkinnedMeshInputLod::SetStaticBufferAsset(const Data::Asset bufferAsset, SkinnedMeshStaticVertexStreams staticStream) @@ -315,7 +337,7 @@ namespace AZ [[maybe_unused]] bool success = false; if (m_lods[lodIndex].m_inputBuffers[inputStream]) { - success = perInstanceSRG->SetBufferView(srgIndex, m_lods[lodIndex].m_inputBuffers[inputStream]->GetBufferView()); + success = perInstanceSRG->SetBufferView(srgIndex, m_lods[lodIndex].m_bufferViews[inputStream].get()); } AZ_Error("SkinnedMeshInputBuffers", success, "Failed to bind buffer view for %s", streamInfo.m_bufferName.GetCStr()); diff --git a/Gems/Atom/RHI/Code/Include/Atom/RHI/CpuProfilerImpl.h b/Gems/Atom/RHI/Code/Include/Atom/RHI/CpuProfilerImpl.h index eb35a29e26..697e58cdd4 100644 --- a/Gems/Atom/RHI/Code/Include/Atom/RHI/CpuProfilerImpl.h +++ b/Gems/Atom/RHI/Code/Include/Atom/RHI/CpuProfilerImpl.h @@ -9,13 +9,13 @@ #include #include +#include #include #include #include #include #include -#include namespace AZ { @@ -83,7 +83,7 @@ namespace AZ //! cached regions, which are stored on a per thread frequency. class CpuProfilerImpl final : public CpuProfiler - , public FrameEventBus::Handler + , public SystemTickBus::Handler { friend class CpuTimingLocalStorage; @@ -99,7 +99,10 @@ namespace AZ //! Unregisters the CpuProfilerImpl instance from the interface void Shutdown(); - void OnFrameBegin(); + // SystemTickBus::Handler overrides + // When fired, the profiler collects all profiling data from registered threads and updates + // m_timeRegionMap so that the next frame has up-to-date profiling data. + void OnSystemTick() final override; //! CpuProfiler overrides... void BeginTimeRegion(TimeRegion& timeRegion) final; diff --git a/Gems/Atom/RHI/Code/Source/RHI/CpuProfilerImpl.cpp b/Gems/Atom/RHI/Code/Source/RHI/CpuProfilerImpl.cpp index a69ad3f3af..187dfca1d9 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/CpuProfilerImpl.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/CpuProfilerImpl.cpp @@ -79,8 +79,7 @@ namespace AZ { Interface::Register(this); m_initialized = true; - Device* rhiDevice = GetRHIDevice().get(); - FrameEventBus::Handler::BusConnect(rhiDevice); + SystemTickBus::Handler::BusConnect(); } void CpuProfilerImpl::Shutdown() @@ -101,7 +100,7 @@ namespace AZ m_registeredThreads.clear(); m_timeRegionMap.clear(); m_initialized = false; - FrameEventBus::Handler::BusDisconnect(); + SystemTickBus::Handler::BusDisconnect(); } void CpuProfilerImpl::BeginTimeRegion(TimeRegion& timeRegion) @@ -173,7 +172,7 @@ namespace AZ return m_enabled; } - void CpuProfilerImpl::OnFrameBegin() + void CpuProfilerImpl::OnSystemTick() { if (!m_enabled) { @@ -199,7 +198,6 @@ namespace AZ m_timeRegionMap = AZStd::move(newMap); } - void CpuProfilerImpl::RegisterThreadStorage() { AZStd::unique_lock lock(m_threadRegisterMutex); @@ -229,6 +227,7 @@ namespace AZ { m_clearContainers = false; + m_stackLevel = 0; m_cachedTimeRegionMap.clear(); m_timeRegionStack.clear(); m_cachedTimeRegions.clear(); diff --git a/Gems/Atom/RHI/Code/Source/RHI/RayTracingPipelineState.cpp b/Gems/Atom/RHI/Code/Source/RHI/RayTracingPipelineState.cpp index 5e5932456e..480c11b7c9 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/RayTracingPipelineState.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/RayTracingPipelineState.cpp @@ -142,6 +142,8 @@ namespace AZ void RayTracingPipelineState::Shutdown() { + ShutdownInternal(); + DeviceObject::Shutdown(); } } } diff --git a/Gems/Atom/RHI/DX12/Code/Source/Platform/Linux/RHI.Builders/BuilderModule_Linux.cpp b/Gems/Atom/RHI/DX12/Code/Source/Platform/Linux/RHI.Builders/BuilderModule_Linux.cpp new file mode 100644 index 0000000000..28609898bf --- /dev/null +++ b/Gems/Atom/RHI/DX12/Code/Source/Platform/Linux/RHI.Builders/BuilderModule_Linux.cpp @@ -0,0 +1,36 @@ +/* + * 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 + +namespace AZ +{ + namespace DX12 + { + //! Exposes DX12 RHI Building components to the Asset Processor. + class BuilderModule final + : public AZ::Module + { + public: + AZ_RTTI(BuilderModule, "{5A01F206-87C7-419A-9E37-43E4AD51B070}", AZ::Module); + + BuilderModule() + { + m_descriptors.insert(m_descriptors.end(), { + ReflectSystemComponent::CreateDescriptor() + }); + } + }; + } // namespace DX12 +} // namespace AZ + +// DO NOT MODIFY THIS LINE UNLESS YOU RENAME THE GEM +// The first parameter should be GemName_GemIdLower +// The second should be the fully qualified name of the class above +AZ_DECLARE_MODULE_CLASS(Gem_Atom_RHI_DX12_Builders, AZ::DX12::BuilderModule); diff --git a/Gems/Atom/RHI/DX12/Code/Source/Platform/Linux/platform_builders_linux_files.cmake b/Gems/Atom/RHI/DX12/Code/Source/Platform/Linux/platform_builders_linux_files.cmake index ea5912045e..3ca8e19fda 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/Platform/Linux/platform_builders_linux_files.cmake +++ b/Gems/Atom/RHI/DX12/Code/Source/Platform/Linux/platform_builders_linux_files.cmake @@ -6,4 +6,5 @@ # set(FILES + RHI.Builders/BuilderModule_Linux.cpp ) diff --git a/Gems/Atom/RHI/Metal/Code/Source/Platform/Linux/RHI.Builders/BuilderModule_Linux.cpp b/Gems/Atom/RHI/Metal/Code/Source/Platform/Linux/RHI.Builders/BuilderModule_Linux.cpp new file mode 100644 index 0000000000..90fd79f68b --- /dev/null +++ b/Gems/Atom/RHI/Metal/Code/Source/Platform/Linux/RHI.Builders/BuilderModule_Linux.cpp @@ -0,0 +1,36 @@ +/* + * 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 + +namespace AZ +{ + namespace Metal + { + //! Exposes Metal RHI Building components to the Asset Processor. + class BuilderModule final + : public AZ::Module + { + public: + AZ_RTTI(BuilderModule, "{B5D96879-3772-4079-A030-AE3EB0BC22D2}", AZ::Module); + + BuilderModule() + { + m_descriptors.insert(m_descriptors.end(), { + ReflectSystemComponent::CreateDescriptor() + }); + } + }; + } // namespace Metal +} // namespace AZ + +// DO NOT MODIFY THIS LINE UNLESS YOU RENAME THE GEM +// The first parameter should be GemName_GemIdLower +// The second should be the fully qualified name of the class above +AZ_DECLARE_MODULE_CLASS(Gem_Atom_RHI_Metal_Builders, AZ::Metal::BuilderModule); diff --git a/Gems/Atom/RHI/Metal/Code/Source/Platform/Linux/platform_builders_linux_files.cmake b/Gems/Atom/RHI/Metal/Code/Source/Platform/Linux/platform_builders_linux_files.cmake index ea5912045e..3ca8e19fda 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/Platform/Linux/platform_builders_linux_files.cmake +++ b/Gems/Atom/RHI/Metal/Code/Source/Platform/Linux/platform_builders_linux_files.cmake @@ -6,4 +6,5 @@ # set(FILES + RHI.Builders/BuilderModule_Linux.cpp ) diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/PhysicalDevice.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/PhysicalDevice.cpp index 36560868af..52aabdec1d 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/PhysicalDevice.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/PhysicalDevice.cpp @@ -261,7 +261,7 @@ namespace AZ VK_KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME } }; - uint32_t optionalExtensionCount = sizeof(optionalExtensions) / sizeof(VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAME); + [[maybe_unused]] uint32_t optionalExtensionCount = sizeof(optionalExtensions) / sizeof(VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAME); AZ_Assert(optionalExtensionCount == static_cast(OptionalDeviceExtension::Count), "The order and size must match the enum OptionalDeviceExtensions."); diff --git a/Gems/Atom/RPI/Code/CMakeLists.txt b/Gems/Atom/RPI/Code/CMakeLists.txt index 71e5d82e48..d806b8c687 100644 --- a/Gems/Atom/RPI/Code/CMakeLists.txt +++ b/Gems/Atom/RPI/Code/CMakeLists.txt @@ -25,6 +25,8 @@ ly_add_target( ../Assets/atom_rpi_asset_files.cmake ${pal_source_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake ${MASKED_OCCLUSION_CULLING_FILES} + PLATFORM_INCLUDE_FILES + ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/Common/${PAL_TRAIT_COMPILER_ID}/atom_rpi_public_${PAL_TRAIT_COMPILER_ID_LOWERCASE}.cmake INCLUDE_DIRECTORIES PRIVATE Source diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Culling.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Culling.h index 72d0e3c69c..7f042e58cb 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Culling.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Culling.h @@ -91,6 +91,10 @@ namespace AZ }; LodData m_lodData; + //! Flag indicating if the object is visible in any view, meaning it passed the culling tests in the previous frame. + //! This flag must be manually cleared by the Cullable object every frame. + bool m_isVisible = false; + //! Flag indicating if the object is hidden, i.e., was specifically marked as //! something that shouldn't be rendered, regardless of its actual position relative to the camera bool m_isHidden = false; diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Pass.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Pass.h index c6667e660a..736252a8a2 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Pass.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Pass.h @@ -57,6 +57,7 @@ namespace AZ class PassTemplate; struct PassRequest; struct PassValidationResults; + class AttachmentReadback; using SortedPipelineViewTags = AZStd::set; using PassesByDrawList = AZStd::map; @@ -65,7 +66,12 @@ namespace AZ const uint32_t PassInputBindingCountMax = 16; const uint32_t PassInputOutputBindingCountMax = PassInputBindingCountMax; const uint32_t PassOutputBindingCountMax = PassInputBindingCountMax; - + + enum class PassAttachmentReadbackOption : uint8_t + { + Input = 0, + Output + }; //! Atom's base pass class (every pass class in Atom must derive from this class). //! @@ -222,6 +228,14 @@ namespace AZ //! Enables/Disables PipelineStatistics queries for this pass virtual void SetPipelineStatisticsQueryEnabled(bool enable); + //! Readback an attachment attached to the specified slot name + //! @param readback The AttachmentReadback object which is used for readback. Its callback function will be called when readback is finished. + //! @param slotName The attachment bind to the slot with this slotName is to be readback + //! @param option The option is used for choosing input or output state when readback an InputOutput attachment. + //! It's ignored if the attachment isn't an InputOutput attachment. + //! Return true if the readback request was successful. User may expect the AttachmentReadback's callback function would be called. + bool ReadbackAttachment(AZStd::shared_ptr readback, const Name& slotName, PassAttachmentReadbackOption option = PassAttachmentReadbackOption::Output); + //! Returns whether the Timestamp queries is enabled/disabled for this pass bool IsTimestampQueryEnabled() const; @@ -266,7 +280,6 @@ namespace AZ // Update output bindings on this pass that are connected to bindings on other passes void UpdateConnectedOutputBindings(); - protected: explicit Pass(const PassDescriptor& descriptor); @@ -349,6 +362,7 @@ namespace AZ void FrameEnd(); virtual void FrameEndInternal() { } + void UpdateReadbackAttachment(FramePrepareParams params, bool beforeAddScopes); // --- Protected Members --- @@ -442,7 +456,10 @@ namespace AZ // Sort type to be used by the default sort implementation. Passes can also provide // fully custom sort implementations by overriding the SortDrawList() function. RHI::DrawListSortType m_drawListSortType = RHI::DrawListSortType::KeyThenDepth; - + + // For read back attachment + AZStd::shared_ptr m_attachmentReadback; + PassAttachmentReadbackOption m_readbackOption; private: // Return the Timestamp result of this pass diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/RenderPass.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/RenderPass.h index b13091082b..3d4ab0a573 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/RenderPass.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/RenderPass.h @@ -55,10 +55,7 @@ namespace AZ //! Get MultisampleState of this pass from its output attachments RHI::MultisampleState GetMultisampleState() const; - - //! Capture pass's output and input/output attachments in following frames - void ReadbackAttachment(AZStd::shared_ptr readback, const PassAttachment* attachment); - + //! Returns a pointer to the Pass ShaderResourceGroup Data::Instance GetShaderResourceGroup(); @@ -145,9 +142,6 @@ namespace AZ // Readback the results from the ScopeQueries void ReadbackScopeQueryResults(); - // For read back attachments - AZStd::shared_ptr m_attachmentReadback; - AZStd::weak_ptr m_attachmentCopy; // Readback results from the Timestamp queries diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/ImageAttachmentPreviewPass.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/ImageAttachmentPreviewPass.h index f855154975..fac9abfe28 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/ImageAttachmentPreviewPass.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/ImageAttachmentPreviewPass.h @@ -166,9 +166,6 @@ namespace AZ AZ::Vector2 m_position = AZ::Vector2(0, 0.6f); AZ::Vector2 m_size = AZ::Vector2(0.4f, 0.4f); bool m_keepAspectRatio = true; - - // For readback the output image attachment - AZStd::shared_ptr m_readback; }; } // namespace RPI } // namespace AZ diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/RenderToTexturePass.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/RenderToTexturePass.h index 0a689f2f74..f96fe92610 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/RenderToTexturePass.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/RenderToTexturePass.h @@ -60,9 +60,6 @@ namespace AZ // Name of the template used to create the child pass. Needed for Recreate() Name m_childTemplateName; - // For read back output - AZStd::shared_ptr m_readback; - Ptr m_outputAttachment; // saved settings for this pass diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/SelectorPass.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/SelectorPass.h index 6b9559e824..9d1376c840 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/SelectorPass.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/SelectorPass.h @@ -15,7 +15,6 @@ #include #include -#include #include #include diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/SwapChainPass.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/SwapChainPass.h index e7869d463c..e8aeddf7e7 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/SwapChainPass.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/SwapChainPass.h @@ -15,7 +15,6 @@ #include #include -#include #include #include @@ -88,9 +87,6 @@ namespace AZ // Name of the template used to create the child pass. Needed for Recreate() Name m_childTemplateName; - - // For read back swap chain - AZStd::shared_ptr m_swapChainReadback; }; } // namespace RPI diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContext.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContext.h index 982ef498a0..92e50be75e 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContext.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContext.h @@ -65,9 +65,15 @@ namespace AZ ConstViewPtr GetDefaultView() const; //! Gets the current size of the viewport. + //! This value is cached and updated on-demand, so may be efficiently queried. AzFramework::WindowSize GetViewportSize() const; - // SceneNotificationBus interface + //! Gets the screen DPI scaling factor. + //! This value is cached and updated on-demand, so may be efficiently queried. + //! \see AzFramework::WindowRequests::GetDpiScaleFactor + float GetDpiScalingFactor() const; + + // SceneNotificationBus interface overrides... //! Ensures our default view remains set when our scene's render pipelines are modified. void OnRenderPipelineAdded(RenderPipelinePtr pipeline) override; //! Ensures our default view remains set when our scene's render pipelines are modified. @@ -75,15 +81,22 @@ namespace AZ //! OnBeginPrepareRender is forwarded to our RenderTick notification to allow subscribers to do rendering. void OnBeginPrepareRender() override; - //WindowNotificationBus interface - //! Used to fire a notification when our window resizes + // WindowNotificationBus interface overrides... + //! Used to fire a notification when our window resizes. void OnWindowResized(uint32_t width, uint32_t height) override; + //! Used to fire a notification when our window DPI changes. + void OnDpiScaleFactorChanged(float dpiScaleFactor) override; using SizeChangedEvent = AZ::Event; //! Notifies consumers when the viewport size has changed. //! Alternatively, connect to ViewportContextNotificationsBus and listen to ViewportContextNotifications::OnViewportSizeChanged. void ConnectSizeChangedHandler(SizeChangedEvent::Handler& handler); + using ScalarChangedEvent = AZ::Event; + //! Notifies consumers when the viewport DPI scaling ratio has changed. + //! Alternatively, connect to ViewportContextNotificationsBus and listen to ViewportContextNotifications::OnViewportDpiScalingChanged. + void ConnectDpiScalingFactorChangedHandler(ScalarChangedEvent::Handler& handler); + using MatrixChangedEvent = AZ::Event; //! Notifies consumers when the view matrix has changed. void ConnectViewMatrixChangedHandler(MatrixChangedEvent::Handler& handler); @@ -106,7 +119,7 @@ namespace AZ //! Notifies consumers when this ViewportContext is about to be destroyed. void ConnectAboutToBeDestroyedHandler(ViewportIdEvent::Handler& handler); - // ViewportRequestBus interface + // ViewportRequestBus interface overrides... //! Gets the current camera's view matrix. const AZ::Matrix4x4& GetCameraViewMatrix() const override; //! Sets the current camera's view matrix. @@ -130,8 +143,10 @@ namespace AZ WindowContextSharedPtr m_windowContext; ViewPtr m_defaultView; AzFramework::WindowSize m_viewportSize; + float m_viewportDpiScaleFactor = 1.0f; SizeChangedEvent m_sizeChangedEvent; + ScalarChangedEvent m_dpiScalingFactorChangedEvent; MatrixChangedEvent m_viewMatrixChangedEvent; MatrixChangedEvent::Handler m_onViewMatrixChangedHandler; MatrixChangedEvent m_projectionMatrixChangedEvent; 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 da0c850f3d..152c8cf2c1 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContextBus.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContextBus.h @@ -105,8 +105,10 @@ namespace AZ class ViewportContextNotifications { public: - //! Called when the underlying native window size changes for a given viewport context name. + //! Called when the underlying native window size changes for a given viewport context. virtual void OnViewportSizeChanged(AzFramework::WindowSize size){AZ_UNUSED(size);} + //! Called when the window DPI scaling changes for a given viewport context. + virtual void OnViewportDpiScalingChanged(float dpiScale){AZ_UNUSED(dpiScale);} //! Called when the active view for a given viewport context name changes. virtual void OnViewportDefaultViewChanged(AZ::RPI::ViewPtr view){AZ_UNUSED(view);} //! Called when the viewport is to be rendered. 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 008565d178..e50525cff0 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContextManager.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContextManager.h @@ -51,6 +51,7 @@ namespace AZ { AZStd::weak_ptr context; ViewportContext::SizeChangedEvent::Handler sizeChangedHandler; + ViewportContext::ScalarChangedEvent::Handler dpiScalingChangedHandler; }; // ViewportContextManager is a singleton owned solely by RPISystem, which is tagged as a friend diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Model/ModelKdTree.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Model/ModelKdTree.h index cd3f1968bf..fc915bcd07 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Model/ModelKdTree.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Model/ModelKdTree.h @@ -67,7 +67,8 @@ namespace AZ void ConstructMeshList(const ModelAsset* model, const AZ::Transform& matParent); static const int s_MinimumVertexSizeInLeafNode = 3 * 10; - + // Stop splitting the tree if more than 10% of the triangles are straddling the split axis + static constexpr float s_MaximumSplitAxisStraddlingTriangles = 1.1; AZStd::unique_ptr m_pRootNode; struct MeshData diff --git a/Gems/Atom/RPI/Code/Source/Platform/Common/Clang/atom_rpi_public_clang.cmake b/Gems/Atom/RPI/Code/Source/Platform/Common/Clang/atom_rpi_public_clang.cmake new file mode 100644 index 0000000000..88309e590c --- /dev/null +++ b/Gems/Atom/RPI/Code/Source/Platform/Common/Clang/atom_rpi_public_clang.cmake @@ -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 +# +# + +ly_add_source_properties( + SOURCES External/MaskedOcclusionCulling/MaskedOcclusionCullingAVX2.cpp + PROPERTY COMPILE_OPTIONS + VALUES -mavx2 -mfma -msse4.1 +) + +ly_add_source_properties( + SOURCES External/MaskedOcclusionCulling/MaskedOcclusionCulling.cpp + PROPERTY COMPILE_OPTIONS + VALUES -mno-avx +) diff --git a/Gems/Atom/RPI/Code/Source/Platform/Common/MSVC/atom_rpi_public_msvc.cmake b/Gems/Atom/RPI/Code/Source/Platform/Common/MSVC/atom_rpi_public_msvc.cmake new file mode 100644 index 0000000000..50cfc8a179 --- /dev/null +++ b/Gems/Atom/RPI/Code/Source/Platform/Common/MSVC/atom_rpi_public_msvc.cmake @@ -0,0 +1,19 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +ly_add_source_properties( + SOURCES External/MaskedOcclusionCulling/MaskedOcclusionCullingAVX2.cpp + PROPERTY COMPILE_OPTIONS + VALUES /arch:AVX2 /W3 +) +ly_add_source_properties( + SOURCES + External/MaskedOcclusionCulling/MaskedOcclusionCullingAVX512.cpp + External/MaskedOcclusionCulling/MaskedOcclusionCulling.cpp + PROPERTY COMPILE_OPTIONS + VALUES /W3 +) diff --git a/Gems/Atom/RPI/Code/Source/Platform/Windows/PAL_windows.cmake b/Gems/Atom/RPI/Code/Source/Platform/Windows/PAL_windows.cmake index 896f505d05..a9e3cf10f9 100644 --- a/Gems/Atom/RPI/Code/Source/Platform/Windows/PAL_windows.cmake +++ b/Gems/Atom/RPI/Code/Source/Platform/Windows/PAL_windows.cmake @@ -7,16 +7,3 @@ set (PAL_TRAIT_BUILD_ATOM_RPI_ASSETS_SUPPORTED TRUE) set (PAL_TRAIT_BUILD_ATOM_RPI_MASKED_OCCLUSION_CULLING_SUPPORTED TRUE) - -ly_add_source_properties( - SOURCES External/MaskedOcclusionCulling/MaskedOcclusionCullingAVX2.cpp - PROPERTY COMPILE_OPTIONS - VALUES /arch:AVX2 /W3 -) -ly_add_source_properties( - SOURCES - External/MaskedOcclusionCulling/MaskedOcclusionCullingAVX512.cpp - External/MaskedOcclusionCulling/MaskedOcclusionCulling.cpp - PROPERTY COMPILE_OPTIONS - VALUES /W3 -) \ No newline at end of file diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Culling.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Culling.cpp index cd1b0e925a..c78d8e8169 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Culling.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Culling.cpp @@ -339,6 +339,7 @@ namespace AZ { numDrawPackets += AddLodDataToView(c->m_cullData.m_boundingSphere.GetCenter(), c->m_lodData, *m_jobData->m_view); ++numVisibleCullables; + c->m_isVisible = true; } } } @@ -374,6 +375,7 @@ namespace AZ { numDrawPackets += AddLodDataToView(c->m_cullData.m_boundingSphere.GetCenter(), c->m_lodData, *m_jobData->m_view); ++numVisibleCullables; + c->m_isVisible = true; } } } diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Pass.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Pass.cpp index 9d3a776b80..dfe470c3f8 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Pass.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Pass.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -36,8 +37,7 @@ namespace AZ { namespace RPI - { - + { // --- Constructors --- Pass::Pass(const PassDescriptor& descriptor) @@ -1285,9 +1285,15 @@ namespace AZ CreateTransientAttachments(params.m_frameGraphBuilder->GetAttachmentDatabase()); ImportAttachments(params.m_frameGraphBuilder->GetAttachmentDatabase()); + // readback attachment with input state + UpdateReadbackAttachment(params, true); + // FrameBeginInternal needs to be the last function be called in FrameBegin because its implementation expects // all the attachments are imported to database (for example, ImageAttachmentPreview) FrameBeginInternal(params); + + // readback attachment with output state + UpdateReadbackAttachment(params, false); UpdateConnectedOutputBindings(); } @@ -1426,6 +1432,57 @@ namespace AZ m_flags.m_pipelineStatisticsQueryEnabled = enable; } + bool Pass::ReadbackAttachment(AZStd::shared_ptr readback, const Name& slotName, PassAttachmentReadbackOption option) + { + // Return false if it's already readback + if (m_attachmentReadback) + { + AZ_Warning("Pass", false, "ReadbackAttachment: skip readback pass [%s] slot [%s]because there is an another active readback", m_name.GetCStr(), slotName.GetCStr()); + return false; + } + uint32_t bindingIndex = 0; + for (auto& binding : m_attachmentBindings) + { + if (slotName == binding.m_name) + { + RHI::AttachmentType type = binding.m_attachment->GetAttachmentType(); + if (type == RHI::AttachmentType::Buffer || type == RHI::AttachmentType::Image) + { + RHI::AttachmentId attachmentId = binding.m_attachment->GetAttachmentId(); + + // Append slot index and pass name so the read back's name won't be same as the attachment used in other passes. + AZStd::string readbackName = AZStd::string::format("%s_%d_%s", attachmentId.GetCStr(), + bindingIndex, GetName().GetCStr()); + if (readback->ReadPassAttachment(binding.m_attachment.get(), AZ::Name(readbackName))) + { + m_readbackOption = PassAttachmentReadbackOption::Output; + // The m_readbackOption is only meaningful if the attachment is used for InputOutput. + if (binding.m_slotType == PassSlotType::InputOutput) + { + m_readbackOption = option; + } + m_attachmentReadback = readback; + return true; + } + return false; + } + } + bindingIndex++; + } + AZ_Warning("Pass", false, "ReadbackAttachment: failed to find slot [%s] from pass [%s]", slotName.GetCStr(), m_name.GetCStr()); + return false; + } + + void Pass::UpdateReadbackAttachment(FramePrepareParams params, bool beforeAddScopes) + { + if (beforeAddScopes == (m_readbackOption == PassAttachmentReadbackOption::Input) && m_attachmentReadback) + { + // Read the attachment for one frame. The reference can be released afterwards + m_attachmentReadback->FrameBegin(params); + m_attachmentReadback = nullptr; + } + } + bool Pass::IsTimestampQueryEnabled() const { return m_flags.m_timestampQueryEnabled; diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/RenderPass.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/RenderPass.cpp index f82d4bd9ef..96649573b2 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/RenderPass.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/RenderPass.cpp @@ -189,14 +189,8 @@ namespace AZ { SetScopeId(RHI::ScopeId(GetPathName())); } - params.m_frameGraphBuilder->ImportScopeProducer(*this); - // Read the attachment for one frame. The reference can be released afterwards - if (m_attachmentReadback) - { - m_attachmentReadback->FrameBegin(params); - m_attachmentReadback = nullptr; - } + params.m_frameGraphBuilder->ImportScopeProducer(*this); // Read back the ScopeQueries submitted from previous frames ReadbackScopeQueryResults(); @@ -415,31 +409,6 @@ namespace AZ m_flags.m_hasPipelineViewTag = !viewTag.IsEmpty(); } - void RenderPass::ReadbackAttachment(AZStd::shared_ptr readback, const PassAttachment* attachment) - { - m_attachmentReadback = readback; - - uint32_t bindingIndex = 0; - for (auto& binding : m_attachmentBindings) - { - if (attachment == binding.m_attachment) - { - RHI::AttachmentType type = binding.m_attachment->GetAttachmentType(); - if (type == RHI::AttachmentType::Buffer || type == RHI::AttachmentType::Image) - { - RHI::AttachmentId attachmentId = binding.m_attachment->GetAttachmentId(); - - // Append slot index and pass name so the read back's name won't be same as the attachment used in other passes. - AZStd::string readbackName = AZStd::string::format("%s_%d_%s", attachmentId.GetCStr(), - bindingIndex, GetName().GetCStr()); - m_attachmentReadback->ReadPassAttachment(binding.m_attachment.get(), AZ::Name(readbackName)); - return; - } - } - bindingIndex++; - } - } - TimestampResult RenderPass::GetTimestampResultInternal() const { return m_timestampResult; diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/ImageAttachmentPreviewPass.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/ImageAttachmentPreviewPass.cpp index 0241d6ec25..5ee2c0a440 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/ImageAttachmentPreviewPass.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/ImageAttachmentPreviewPass.cpp @@ -333,22 +333,16 @@ namespace AZ m_passSrg->Compile(); m_passSrgChanged = false; } - - // Read preview output - if (m_readback) - { - m_readback->FrameBegin(params); - m_readback = nullptr; - } } bool ImageAttachmentPreviewPass::ReadbackOutput(AZStd::shared_ptr readback) { if (m_outputColorAttachment) { - m_readback = readback; + m_readbackOption = PassAttachmentReadbackOption::Output; + m_attachmentReadback = readback; AZStd::string readbackName = AZStd::string::format("%s_%s", m_outputColorAttachment->GetAttachmentId().GetCStr(), GetName().GetCStr()); - return m_readback->ReadPassAttachment(m_outputColorAttachment.get(), AZ::Name(readbackName)); + return m_attachmentReadback->ReadPassAttachment(m_outputColorAttachment.get(), AZ::Name(readbackName)); } return false; } diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/RenderToTexturePass.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/RenderToTexturePass.cpp index 8b4c9b8aab..c532a1324f 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/RenderToTexturePass.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/RenderToTexturePass.cpp @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -77,17 +78,6 @@ namespace AZ params.m_viewportState = m_viewport; Base::FrameBeginInternal(params); - - // for read back output - if (m_readback) - { - m_readback->FrameBegin(params); - if (m_readback->IsFinished()) - { - // Done reading. Remove the reference - m_readback = nullptr; - } - } } void RenderToTexturePass::ResizeOutput(uint32_t width, uint32_t height) @@ -118,9 +108,10 @@ namespace AZ { if (m_outputAttachment) { - m_readback = readback; + m_readbackOption = PassAttachmentReadbackOption::Output; + m_attachmentReadback = readback; AZStd::string readbackName = AZStd::string::format("%s_%s", m_outputAttachment->GetAttachmentId().GetCStr(), GetName().GetCStr()); - m_readback->ReadPassAttachment(m_outputAttachment.get(), AZ::Name(readbackName)); + m_attachmentReadback->ReadPassAttachment(m_outputAttachment.get(), AZ::Name(readbackName)); } } diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/SwapChainPass.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/SwapChainPass.cpp index 7a3bf3a011..62649cd0b2 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/SwapChainPass.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/SwapChainPass.cpp @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -134,13 +135,6 @@ namespace AZ attachmentDatabase.ImportSwapChain(m_windowContext->GetSwapChainAttachmentId(), m_windowContext->GetSwapChain()); ParentPass::FrameBeginInternal(params); - - // Read swap chain for one frame. The reference can be released afterwards - if (m_swapChainReadback) - { - m_swapChainReadback->FrameBegin(params); - m_swapChainReadback = nullptr; - } } void SwapChainPass::OnWindowResized([[maybe_unused]] uint32_t width, [[maybe_unused]] uint32_t height) @@ -152,9 +146,11 @@ namespace AZ { if (m_swapChainAttachment) { - m_swapChainReadback = readback; + m_readbackOption = PassAttachmentReadbackOption::Output; + m_attachmentReadback = readback; + AZStd::string readbackName = AZStd::string::format("%s_%s", m_swapChainAttachment->GetAttachmentId().GetCStr(), GetName().GetCStr()); - m_swapChainReadback->ReadPassAttachment(m_swapChainAttachment.get(), AZ::Name(readbackName)); + m_attachmentReadback->ReadPassAttachment(m_swapChainAttachment.get(), AZ::Name(readbackName)); } } diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContext.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContext.cpp index 23d5805c12..eacdbe0293 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContext.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContext.cpp @@ -28,6 +28,10 @@ namespace AZ m_viewportSize, nativeWindow, &AzFramework::WindowRequestBus::Events::GetClientAreaSize); + AzFramework::WindowRequestBus::EventResult( + m_viewportDpiScaleFactor, + nativeWindow, + &AzFramework::WindowRequestBus::Events::GetDpiScaleFactor); AzFramework::WindowNotificationBus::Handler::BusConnect(nativeWindow); AzFramework::ViewportRequestBus::Handler::BusConnect(id); @@ -148,11 +152,21 @@ namespace AZ return m_viewportSize; } + float ViewportContext::GetDpiScalingFactor() const + { + return m_viewportDpiScaleFactor; + } + void ViewportContext::ConnectSizeChangedHandler(SizeChangedEvent::Handler& handler) { handler.Connect(m_sizeChangedEvent); } + void ViewportContext::ConnectDpiScalingFactorChangedHandler(ScalarChangedEvent::Handler& handler) + { + handler.Connect(m_dpiScalingFactorChangedEvent); + } + void ViewportContext::ConnectViewMatrixChangedHandler(MatrixChangedEvent::Handler& handler) { handler.Connect(m_viewMatrixChangedEvent); @@ -289,5 +303,11 @@ namespace AZ m_sizeChangedEvent.Signal(m_viewportSize); } } + + void ViewportContext::OnDpiScaleFactorChanged(float dpiScaleFactor) + { + m_viewportDpiScaleFactor = dpiScaleFactor; + m_dpiScalingFactorChangedEvent.Signal(dpiScaleFactor); + } } // 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 552304557f..606b5e5b8c 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContextManager.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContextManager.cpp @@ -55,16 +55,28 @@ namespace AZ auto onSizeChanged = [this, viewportId](AzFramework::WindowSize size) { // Ensure we emit OnViewportSizeChanged with the correct name. - auto viewportContext = this->GetViewportContextById(viewportId); + auto viewportContext = GetViewportContextById(viewportId); if (viewportContext) { ViewportContextNotificationBus::Event(viewportContext->GetName(), &ViewportContextNotificationBus::Events::OnViewportSizeChanged, size); } ViewportContextIdNotificationBus::Event(viewportId, &ViewportContextIdNotificationBus::Events::OnViewportSizeChanged, size); }; + auto onDpiScalingChanged = [this, viewportId](float dpiScalingFactor) + { + // Ensure we emit OnViewportDpiScalingChanged with the correct name. + auto viewportContext = GetViewportContextById(viewportId); + if (viewportContext) + { + ViewportContextNotificationBus::Event(viewportContext->GetName(), &ViewportContextNotificationBus::Events::OnViewportDpiScalingChanged, dpiScalingFactor); + } + ViewportContextIdNotificationBus::Event(viewportId, &ViewportContextIdNotificationBus::Events::OnViewportDpiScalingChanged, dpiScalingFactor); + }; viewportContext->m_name = contextName; viewportData.sizeChangedHandler = ViewportContext::SizeChangedEvent::Handler(onSizeChanged); + viewportData.dpiScalingChangedHandler = ViewportContext::ScalarChangedEvent::Handler(onDpiScalingChanged); viewportContext->ConnectSizeChangedHandler(viewportData.sizeChangedHandler); + viewportContext->ConnectDpiScalingFactorChangedHandler(viewportData.dpiScalingChangedHandler); ViewPtrStack& associatedViews = GetOrCreateViewStackForContext(contextName); viewportContext->SetDefaultView(associatedViews.back()); onSizeChanged(viewportContext->GetViewportSize()); @@ -176,6 +188,7 @@ namespace AZ UpdateViewForContext(newContextName); // Ensure anyone listening on per-name viewport size updates gets notified. ViewportContextNotificationBus::Event(newContextName, &ViewportContextNotificationBus::Events::OnViewportSizeChanged, viewportContext->GetViewportSize()); + ViewportContextNotificationBus::Event(newContextName, &ViewportContextNotificationBus::Events::OnViewportDpiScalingChanged, viewportContext->GetDpiScalingFactor()); } void ViewportContextManager::EnumerateViewportContexts(AZStd::function visitorFunction) diff --git a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Model/ModelKdTree.cpp b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Model/ModelKdTree.cpp index 54ec002893..ace4df5c0b 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Model/ModelKdTree.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Model/ModelKdTree.cpp @@ -84,7 +84,11 @@ namespace AZ // If either the top or bottom contain all the input indices, the triangles are too close to cut any // further and the split failed - return indices.size() != outInfo.m_aboveIndices.size() && indices.size() != outInfo.m_belowIndices.size(); + // Additionally, if too many triangles straddle the split-axis, + // the triangles are too close and the split failed + // [ATOM-15944] - Use a more sophisticated method to terminate KdTree generation + return indices.size() != outInfo.m_aboveIndices.size() && indices.size() != outInfo.m_belowIndices.size() + && aznumeric_cast(outInfo.m_aboveIndices.size() + outInfo.m_belowIndices.size()) / aznumeric_cast(indices.size()) < s_MaximumSplitAxisStraddlingTriangles; } bool ModelKdTree::Build(const ModelAsset* model) 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 c649031280..d8171a83a1 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/RenderViewportWidget.h +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/RenderViewportWidget.h @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -81,6 +82,12 @@ namespace AtomToolsFramework //! Gets the default camera that's been automatically registered to our ViewportContext. AZ::RPI::ViewPtr GetDefaultCamera(); AZ::RPI::ConstViewPtr GetDefaultCamera() const; + //! Sets whether or not input processing is enabled for this RenderViewportWidget. + //! While input processing is enabled, synthetic input events may appear in OnInputChannelEventFiltered + //! due to internal viewport input mapping via QtEventToAzInputMapper, so it may be desirable to disable + //! camera controller input processing wholesale to avoid competing input messages. + //! Input processing is enabled by default. + void SetInputProcessingEnabled(bool enabled); // AzToolsFramework::ViewportInteraction::ViewportInteractionRequestBus::Handler ... AzFramework::CameraState GetCameraState() override; @@ -113,6 +120,7 @@ namespace AtomToolsFramework void SetFullScreenState(bool fullScreenState) override; bool CanToggleFullScreenState() const override; void ToggleFullScreenState() override; + float GetDpiScaleFactor() const override; protected: // AzFramework::InputChannelEventListener ... @@ -130,7 +138,6 @@ namespace AtomToolsFramework private: void SendWindowResizeEvent(); - bool CanInputGrantFocus(const AzFramework::InputChannel& inputChannel) const; // The underlying ViewportContext, our entry-point to the Atom RPI. AZ::RPI::ViewportContextPtr m_viewportContext; @@ -157,5 +164,7 @@ namespace AtomToolsFramework AZStd::optional m_lastCursorPosition; // The viewport settings (e.g. grid snapping, grid size) for this viewport. const AzToolsFramework::ViewportInteraction::ViewportSettings* m_viewportSettings = nullptr; + // Maps our internal Qt events into AzFramework InputChannels for our ViewportControllerList. + AzToolsFramework::QtEventToAzInputMapper* m_inputChannelMapper = nullptr; }; } //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 529652e1a9..6ab96bbebb 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp @@ -81,6 +81,23 @@ namespace AtomToolsFramework AZ::TickBus::Handler::BusConnect(); AzFramework::WindowRequestBus::Handler::BusConnect(params.windowHandle); + m_inputChannelMapper = new AzToolsFramework::QtEventToAzInputMapper(this, id); + + // Forward input events to our controller list. + QObject::connect(m_inputChannelMapper, &AzToolsFramework::QtEventToAzInputMapper::InputChannelUpdated, this, + [this](const AzFramework::InputChannel* inputChannel, QEvent* event) + { + AzFramework::NativeWindowHandle windowId = reinterpret_cast(winId()); + if (m_controllerList->HandleInputChannelEvent({GetId(), windowId, *inputChannel})) + { + // If the controller handled the input event, mark the event as accepted so it doesn't continue to propagate. + if (event) + { + event->setAccepted(true); + } + } + }); + return true; } @@ -149,86 +166,24 @@ namespace AtomToolsFramework return m_defaultCamera; } - static bool IsMouseButtonEvent(const AzFramework::InputChannel& inputChannel) - { - const auto& mouseButtons = AzFramework::InputDeviceMouse::Button::All; - return AZStd::find(mouseButtons.begin(), mouseButtons.end(), inputChannel.GetInputChannelId()) != mouseButtons.end(); - } - - static bool IsMouseMoveEvent(const AzFramework::InputChannel& inputChannel) - { - return inputChannel.GetInputChannelId() == AzFramework::InputDeviceMouse::SystemCursorPosition; - } - - static bool IsMouseButtonOrWheelEvent(const AzFramework::InputChannel& inputChannel) - { - return IsMouseButtonEvent(inputChannel) || inputChannel.GetInputChannelId() == AzFramework::InputDeviceMouse::Movement::Z; - } - - bool RenderViewportWidget::CanInputGrantFocus(const AzFramework::InputChannel& inputChannel) const - { - // Only take focus from a mouse event if the cursor is currently within the viewport - if (!m_mouseOver) - { - return false; - } - - // Only mouse button down events (clicks) can grant focus - if (inputChannel.GetState() != AzFramework::InputChannel::State::Began) - { - return false; - } - - // Only mouse button events can grant focus - return IsMouseButtonEvent(inputChannel); - } - bool RenderViewportWidget::OnInputChannelEventFiltered(const AzFramework::InputChannel& inputChannel) { - bool shouldConsumeEvent = true; - - // Grab keyboard focus if we've been clicked on. - // Qt normally handles this for us, but we're filtering native events before they get - // synthesized into QMouseEvents. - if (!hasFocus() && CanInputGrantFocus(inputChannel)) - { - setFocus(); - } - - // Don't consume new input events if we don't currently have focus. - // We do forward Ended events, as they may be relevant to our current state - // (e.g. a key gets released after we lose focus, it shouldn't remain "stuck"). if (!hasFocus()) { - if (inputChannel.GetState() == AzFramework::InputChannel::State::Ended) - { - // Forward the input ended event to our controllers, but don't prevent other viewports from receiving it. - shouldConsumeEvent = false; - } - else - { - // Not an event we should listen to, abort. - return false; - } + return false; } - // If we receive a mouse button event from outside of our viewport, ignore it even if we have focus. - if (!m_mouseOver - && inputChannel.GetState() == AzFramework::InputChannel::State::Began - && IsMouseButtonOrWheelEvent(inputChannel)) + // Only forward channels that aren't covered by our Qt -> AZ event mapper + if (!m_inputChannelMapper || m_inputChannelMapper->HandlesInputEvent(inputChannel)) { return false; } - // Don't forward system cursor position updates, we'll do that ourselves for in-window movements once the result of - // ViewportCursorScreenPosition is guaranteed to be correct (see mouseMoveEvent). - if (IsMouseMoveEvent(inputChannel)) - { - return false; - } + bool shouldConsumeEvent = true; AzFramework::NativeWindowHandle windowId = reinterpret_cast(winId()); const bool eventHandled = m_controllerList->HandleInputChannelEvent({GetId(), windowId, inputChannel}); + // If our controllers handled the event and it's one we can safely consume (i.e. it's not an Ended event that other viewports might need), consume it. return eventHandled && shouldConsumeEvent; } @@ -262,6 +217,7 @@ namespace AtomToolsFramework { SendWindowResizeEvent(); } + return QWidget::event(event); } @@ -279,23 +235,12 @@ namespace AtomToolsFramework { m_mousePosition = event->localPos(); - // Now that we've looked a viewport local mouse position, - // we can go ahead and broadcast the system cursor input event to the controllers. - // This allows any controllers not listening to pure mouse deltas to consistently - // look up the mouse position in viewport screen coordinates. - const AzFramework::InputDevice* mouseInputDevice = nullptr; - if (AzFramework::InputDeviceRequestBus::EventResult( - mouseInputDevice, AzFramework::InputDeviceMouse::Id, &AzFramework::InputDeviceRequests::GetInputDevice); - mouseInputDevice != nullptr) - { - const AzFramework::NativeWindowHandle windowId = reinterpret_cast(winId()); - AzFramework::InputChannel syntheticInput(AzFramework::InputDeviceMouse::SystemCursorPosition, *mouseInputDevice); - m_controllerList->HandleInputChannelEvent({GetId(), windowId, syntheticInput}); - } - if (m_capturingCursor && m_lastCursorPosition.has_value()) { AzQtComponents::SetCursorPos(m_lastCursorPosition.value()); + // Even though we just set the cursor position, there are edge cases such as remote desktop that will leave + // the cursor position unchanged. For safety, we re-cache our last cursor position for delta generation. + m_lastCursorPosition = QCursor::pos(); } else { @@ -354,6 +299,12 @@ namespace AtomToolsFramework } } + void RenderViewportWidget::SetInputProcessingEnabled(bool enabled) + { + m_inputChannelMapper->SetEnabled(enabled); + m_controllerList->SetEnabled(enabled); + } + AzFramework::CameraState RenderViewportWidget::GetCameraState() { AZ::RPI::ViewPtr currentView = m_viewportContext->GetDefaultView(); @@ -540,4 +491,9 @@ namespace AtomToolsFramework { // The RenderViewportWidget does not currently support full screen. } + + float RenderViewportWidget::GetDpiScaleFactor() const + { + return aznumeric_cast(devicePixelRatioF()); + } } //namespace AtomToolsFramework diff --git a/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiCpuProfiler.h b/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiCpuProfiler.h index 1dd2622603..0c019f19aa 100644 --- a/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiCpuProfiler.h +++ b/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiCpuProfiler.h @@ -7,8 +7,12 @@ #pragma once -#include +#include +#include + #include +#include + namespace AZ { @@ -19,24 +23,41 @@ namespace AZ namespace Render { - struct ThreadRegionEntry + struct ThreadRegionEntry { AZStd::thread_id m_threadId; AZStd::sys_time_t m_startTick = 0; AZStd::sys_time_t m_endTick = 0; }; + // Stores data about a region that is agreggated from all collected frames + // Data collection can be toggled on and off through m_record. + struct RegionStatistics + { + float CalcAverageTimeMs() const; + void RecordRegion(const AZ::RHI::CachedTimeRegion& region); + + bool m_draw = false; + bool m_record = true; + u64 m_invocations = 0; + AZStd::sys_time_t m_totalTicks = 0; + }; + //! Visual profiler for Cpu statistics. //! It uses ImGui as the library for displaying the Attachments and Heaps. //! It shows all heaps that are being used by the RHI and how the //! resources are allocated in each heap. class ImGuiCpuProfiler + : SystemTickBus::Handler { // Region Name -> Array of ThreadRegion entries using RegionEntryMap = AZStd::map>; // Group Name -> RegionEntryMap using GroupRegionMap = AZStd::map; + using TimeRegion = AZ::RHI::CachedTimeRegion; + using GroupRegionName = AZ::RHI::CachedTimeRegion::GroupRegionName; + public: ImGuiCpuProfiler() = default; ~ImGuiCpuProfiler() = default; @@ -44,7 +65,13 @@ namespace AZ //! Draws the provided Cpu statistics. void Draw(bool& keepDrawing, const AZ::RHI::CpuTimingStatistics& cpuTimingStatistics); + //! Draws the CPU profiling visualizer in a new window. + void DrawVisualizer(bool& keepDrawing, const AZ::RHI::CpuTimingStatistics& currentCpuTimingStatistics); + private: + static constexpr float RowHeight = 50.0; + static constexpr int DefaultFramesToCollect = 50; + // Update the GroupRegionMap with the latest cached time regions void UpdateGroupRegionMap(); @@ -62,8 +89,73 @@ namespace AZ AZ::RHI::CpuTimingStatistics m_cpuTimingStatisticsWhenPause; AZStd::string m_lastCapturedFilePath; + + // Visualizer methods + + // Get the profiling data from the last frame, only called when the profiler is not paused. + void CollectFrameData(); + + // Cull old data from internal storage, only called when profiler is not paused. + void CullFrameData(const AZ::RHI::CpuTimingStatistics& currentCpuTimingStatistics); + + // Draws a single block onto the timeline + void DrawBlock(const TimeRegion& block, u64 targetRow); + + // Draw horizontal lines between threads in the timeline + void DrawThreadSeparator(u64 threadBoundary, u64 maxDepth); + + // Draw the "Thread XXXXX" label onto the viewport + void DrawThreadLabel(u64 baseRow, AZStd::thread_id threadId); + + // Draws all active function statistics windows + void DrawRegionStatistics(); + + // Draw the vertical lines separating frames in the timeline + void DrawFrameBoundaries(); + + // Draw the ruler with frame time labels + void DrawRuler(); + + // Converts raw ticks to a pixel value suitable to give to ImDrawList, handles window scrolling + float ConvertTickToPixelSpace(AZStd::sys_time_t tick) const; + + AZStd::sys_time_t GetViewportTickWidth() const; + + // Gets the color for a block using the GroupRegionName as a key into the cache + // Generates a random ImU32 if the block does not yet have a color + ImU32 GetBlockColor(const TimeRegion& block); + + // System tick bus overrides + virtual void OnSystemTick() override; + + // Visualizer state + + bool m_showVisualizer = false; + + int m_framesToCollect = DefaultFramesToCollect; + + // Tally of the number of saved profiling events so far + u64 m_savedRegionCount = 0; + + // Viewport tick bounds, these are used to convert tick space -> screen space and cull so we only draw onscreen objects + AZStd::sys_time_t m_viewportStartTick; + AZStd::sys_time_t m_viewportEndTick; + + // Map to store each thread's TimeRegions, individual vectors are sorted by start tick + AZStd::unordered_map> m_savedData; + + // Region color cache + AZStd::unordered_map m_regionColorMap; + + // Tracks the frame boundaries + AZStd::vector m_frameEndTicks = { INT64_MIN }; + + // Main data structure for storing function statistics to be shown in the popup windows. + // For now we default allocate for all regions on the first render frame and then use RegionStatistics.m_draw to determine + // if we should draw the window or not. FIXME(ATOM-15948) this should be changed once RegionStatistics gets heavier. + AZStd::unordered_map m_regionStatisticsMap; }; } // namespace Render -} +} // namespace AZ #include "ImGuiCpuProfiler.inl" diff --git a/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiCpuProfiler.inl b/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiCpuProfiler.inl index 7551cf50dc..cc1bc9b3c0 100644 --- a/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiCpuProfiler.inl +++ b/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiCpuProfiler.inl @@ -6,10 +6,16 @@ */ #include +#include +#include #include + #include -#include +#include #include +#include +#include + namespace AZ { @@ -19,17 +25,15 @@ namespace AZ { // NOTE: Fix build error in case AZStd::thread_id is not of an arithmetic type, and instead a pointer template::value>::type* = nullptr> - void TextThreadId(ThreadId threadId) + AZStd::string TextThreadId(ThreadId threadId) { - const AZStd::string threadIdText = AZStd::string::format("Thread: %p", threadId); - ImGui::Text(threadIdText.c_str()); + return AZStd::string::format("Thread: %p", threadId); } template::value>::type* = nullptr> - void TextThreadId(ThreadId threadId) + AZStd::string TextThreadId(ThreadId threadId) { - const AZStd::string threadIdText = AZStd::string::format("Thread: %zu", static_cast(threadId)); - ImGui::Text(threadIdText.c_str()); + return AZStd::string::format("Thread: %zu", static_cast(threadId)); } inline float TicksToMs(AZStd::sys_time_t ticks) { @@ -38,14 +42,14 @@ namespace AZ AZ_Assert(ticksPerSecond >= 1000, "Error in converting ticks to ms, expected ticksPerSecond >= 1000"); return static_cast((ticks * 1000) / (ticksPerSecond / 1000)) / 1000.0f; } - } + } // namespace CpuProfilerImGuiHelper inline void ImGuiCpuProfiler::Draw(bool& keepDrawing, const AZ::RHI::CpuTimingStatistics& currentCpuTimingStatistics) { // Cache the value to detect if it was changed by ImGui(user pressed 'x') const bool cachedShowCpuProfiler = keepDrawing; - const ImVec2 windowSize(640.0f, 480.0f); + const ImVec2 windowSize(900.0f, 600.0f); ImGui::SetNextWindowSize(windowSize, ImGuiCond_Once); bool captureToFile = false; if (ImGui::Begin("Cpu Profiler", &keepDrawing, ImGuiWindowFlags_None)) @@ -102,7 +106,7 @@ namespace AZ for (ThreadRegionEntry& entry : entries) { - CpuProfilerImGuiHelper::TextThreadId(entry.m_threadId.m_id); + ImGui::Text(CpuProfilerImGuiHelper::TextThreadId(entry.m_threadId.m_id).c_str()); const AZStd::sys_time_t elapsed = entry.m_endTick - entry.m_startTick; ShowTimeInMs(elapsed); @@ -114,9 +118,9 @@ namespace AZ } }; - const auto ShowRegionRow = [ticksPerSecond, &DrawRegionHoverMarker, &ShowTimeInMs](const char* regionLabel, - AZStd::vector regions, - AZStd::sys_time_t duration) + const auto ShowRegionRow = + [ticksPerSecond, &DrawRegionHoverMarker, + &ShowTimeInMs](const char* regionLabel, AZStd::vector regions, AZStd::sys_time_t duration) { // Draw the region label ImGui::Text(regionLabel); @@ -142,14 +146,15 @@ namespace AZ ImGui::NextColumn(); // Draw the time labels (max and then total) - const AZStd::string timeLabel = - AZStd::string::format("%.2f ms max, %.2f ms total", - CpuProfilerImGuiHelper::TicksToMs(duration), + const AZStd::string timeLabel = AZStd::string::format( + "%.2f ms max, %.2f ms total", CpuProfilerImGuiHelper::TicksToMs(duration), CpuProfilerImGuiHelper::TicksToMs(totalTime)); ImGui::Text(timeLabel.c_str()); ImGui::NextColumn(); }; + ImGui::Checkbox("Enable Visualizer", &m_showVisualizer); + // Set column settings. ImGui::Columns(2, "view", false); ImGui::SetColumnWidth(0, 660.0f); @@ -216,8 +221,8 @@ namespace AZ char resolvedPath[AZ::IO::MaxPathLength]; AZ::IO::FileIOBase::GetInstance()->ResolvePath(frameDataFilePath.c_str(), resolvedPath, AZ::IO::MaxPathLength); m_lastCapturedFilePath = resolvedPath; - AZ::Render::ProfilingCaptureRequestBus::Broadcast(&AZ::Render::ProfilingCaptureRequestBus::Events::CaptureCpuProfilingStatistics, - frameDataFilePath); + AZ::Render::ProfilingCaptureRequestBus::Broadcast( + &AZ::Render::ProfilingCaptureRequestBus::Events::CaptureCpuProfilingStatistics, frameDataFilePath); } // Toggle if the bool isn't the same as the cached value @@ -225,6 +230,11 @@ namespace AZ { AZ::RHI::CpuProfiler::Get()->SetProfilerEnabled(keepDrawing); } + + if (m_showVisualizer) + { + DrawVisualizer(m_showVisualizer, currentCpuTimingStatistics); + } } inline void ImGuiCpuProfiler::UpdateGroupRegionMap() @@ -251,5 +261,527 @@ namespace AZ } } } - } -} + + // -- CPU Visualizer -- + inline void ImGuiCpuProfiler::DrawVisualizer(bool& keepDrawing, const AZ::RHI::CpuTimingStatistics& currentCpuTimingStatistics) + { + ImGui::SetNextWindowSize({ 900, 600 }, ImGuiCond_Once); + if (ImGui::Begin("CPU Visualizer", &keepDrawing, ImGuiWindowFlags_None)) + { + // Get the instrumentation data for the last frame if active + if (!m_paused && m_groupRegionMap.size() != 0) + { + CollectFrameData(); // Also updates viewport bounds + + CullFrameData(currentCpuTimingStatistics); // Trim data if necessary + + if (!SystemTickBus::Handler::BusIsConnected()) + { + SystemTickBus::Handler::BusConnect(); + } + } + + // Options & Statistics + if (ImGui::BeginChild("Options and Statistics", { 0, 0 }, true)) + { + ImGui::Columns(3, "Options", true); + ImGui::Text("Frames To Collect:"); + ImGui::SliderInt("", &m_framesToCollect, 10, 100, "%d", ImGuiSliderFlags_AlwaysClamp | ImGuiSliderFlags_Logarithmic); + + ImGui::NextColumn(); + + ImGui::Text("Viewport width: %.3f ms", CpuProfilerImGuiHelper::TicksToMs(GetViewportTickWidth())); + ImGui::Text("Ticks [%lld , %lld]", m_viewportStartTick, m_viewportEndTick); + ImGui::Text("Recording %ld threads", RHI::CpuProfiler::Get()->GetTimeRegionMap().size()); + ImGui::Text("%llu profiling events saved", m_savedRegionCount); + + ImGui::NextColumn(); + + ImGui::TextWrapped( + "Hold the right mouse button to move around. Zoom by scrolling the mouse wheel while holding ."); + } + + + ImGui::Columns(1, "RulerColumn", true); + + // Ruler + if (ImGui::BeginChild("Ruler", { 0, 30 }, true, ImGuiWindowFlags_NoNavFocus)) + { + DrawRuler(); + } + ImGui::EndChild(); + + + ImGui::Columns(1, "TimelineColumn", true); + + // Timeline + if (ImGui::BeginChild( + "Timeline", { 0, 0 }, true, ImGuiWindowFlags_AlwaysVerticalScrollbar | ImGuiWindowFlags_NoScrollWithMouse)) + { + // Find the next frame boundary after the viewport's right bound and draw until that tick + auto nextFrameBoundaryItr = AZStd::lower_bound(m_frameEndTicks.begin(), m_frameEndTicks.end(), m_viewportEndTick); + if (nextFrameBoundaryItr == m_frameEndTicks.end() && + m_frameEndTicks.size() != 0) // lower_bound returns end() if not found + { + nextFrameBoundaryItr--; + } + const AZStd::sys_time_t nextFrameBoundary = *nextFrameBoundaryItr; + + // Find the start tick of the leftmost frame, which may be offscreen. + auto startTickItr = AZStd::lower_bound(m_frameEndTicks.begin(), m_frameEndTicks.end(), m_viewportStartTick); + if (startTickItr != m_frameEndTicks.begin()) + { + startTickItr--; + } + + // Main draw loop + u64 baseRow = 0; + for (const auto& [currentThreadId, singleThreadData] : m_savedData) + { + // Find the first TimeRegion that we should draw + auto regionItr = AZStd::lower_bound( + singleThreadData.begin(), singleThreadData.end(), *startTickItr, + [](const TimeRegion& wrapper, AZStd::sys_time_t target) + { + return wrapper.m_startTick < target; + }); + + // Draw all of the blocks for a given thread/row + u64 maxDepth = 0; + while (regionItr != singleThreadData.end()) + { + const TimeRegion& region = *regionItr; + + // Early out if we have drawn all the onscreen regions + if (region.m_startTick > nextFrameBoundary) + { + break; + } + u64 targetRow = region.m_stackDepth + baseRow; + maxDepth = AZStd::max(aznumeric_cast(region.m_stackDepth), maxDepth); + + DrawBlock(region, targetRow); + + regionItr++; + } + + // Draw UI details + DrawThreadLabel(baseRow, currentThreadId); + DrawThreadSeparator(baseRow, maxDepth); + + baseRow += maxDepth + 1; // Next draw loop should start one row down + } + + DrawRegionStatistics(); + DrawFrameBoundaries(); + + // Draw an invisible button to capture inputs + ImGui::InvisibleButton("Timeline Input", { ImGui::GetWindowContentRegionWidth(), baseRow * RowHeight }); + + // Controls + ImGuiIO& io = ImGui::GetIO(); + if (ImGui::IsWindowFocused() && ImGui::IsItemHovered()) + { + io.WantCaptureMouse = true; + if (ImGui::IsMouseDragging(ImGuiMouseButton_Right)) // Scrolling + { + auto [deltaX, deltaY] = io.MouseDelta; + if (deltaX != 0 || deltaY != 0) + { + // We want to maintain uniformity in scrolling (a click and drag should leave the cursor at the same spot + // relative to the objects on screen) + const float pixelDeltaNormalized = deltaX / ImGui::GetWindowWidth(); + auto tickDelta = aznumeric_cast(-1 * pixelDeltaNormalized * GetViewportTickWidth()); + m_viewportStartTick += tickDelta; + m_viewportEndTick += tickDelta; + + ImGui::SetScrollY(ImGui::GetScrollY() + deltaY * -1); + } + } + else if (io.MouseWheel != 0 && io.KeyCtrl) // Zooming + { + // We want zooming to be relative to the mouse's current position + const float mouseVel = io.MouseWheel; + const float mouseX = ImGui::GetMousePos().x; + + // Find the normalized position of the cursor relative to the window + const float percentWindow = (mouseX - ImGui::GetWindowPos().x) / ImGui::GetWindowWidth(); + + const auto overallTickDelta = aznumeric_cast(0.05 * io.MouseWheel * GetViewportTickWidth()); + + // Split the overall delta between the two bounds depending on mouse pos + const auto newStartTick = m_viewportStartTick + aznumeric_cast(percentWindow * overallTickDelta); + const auto newEndTick = m_viewportEndTick - aznumeric_cast((1-percentWindow) * overallTickDelta); + + // Avoid zooming too much, start tick should always be less than end tick + if (newStartTick < newEndTick) + { + m_viewportStartTick = newStartTick; + m_viewportEndTick = newEndTick; + } + } + } + } + ImGui::EndChild(); + } + ImGui::End(); + } + + inline void ImGuiCpuProfiler::CollectFrameData() + { + const RHI::CpuProfiler::TimeRegionMap& timeRegionMap = RHI::CpuProfiler::Get()->GetTimeRegionMap(); + + m_viewportStartTick = INT64_MAX; + m_viewportEndTick = INT64_MIN; + + // Iterate through the entire TimeRegionMap and copy the data since it will get deleted on the next frame + for (const auto& [threadId, singleThreadRegionMap] : timeRegionMap) + { + // The profiler can sometime return threads without any profiling events when dropping threads, FIXME(ATOM-15949) + if (singleThreadRegionMap.size() == 0) + { + continue; + } + + // Now focus on just the data for the current thread + AZStd::vector newData; + newData.reserve(singleThreadRegionMap.size()); // Avoids reallocation in the normal case when each region only has one invocation + for (const auto& [regionName, regionVec] : singleThreadRegionMap) + { + for (const TimeRegion& region : regionVec) + { + newData.push_back(region); // Copies + + // Update running statistics if we want to record this region's data + if (m_regionStatisticsMap[region.m_groupRegionName].m_record) + { + m_regionStatisticsMap[region.m_groupRegionName].RecordRegion(region); + } + } + } + + // Sorting by start tick allows us to speed up some other processes (ex. finding the first block to draw) + // since we can binary search by start tick. + AZStd::sort( + newData.begin(), newData.end(), + [](const TimeRegion& lhs, const TimeRegion& rhs) + { + return lhs.m_startTick < rhs.m_startTick; + }); + + // Use the latest frame's data as the new bounds of the viewport + m_viewportStartTick = AZStd::min(newData.front().m_startTick, m_viewportStartTick); + m_viewportEndTick = AZStd::max(newData.back().m_endTick, m_viewportEndTick); + + m_savedRegionCount += newData.size(); + + // Move onto the end of the current thread's saved data, sorted order maintained + AZStd::vector& savedDataVec = m_savedData[threadId]; + savedDataVec.insert( + savedDataVec.end(), AZStd::make_move_iterator(newData.begin()), AZStd::make_move_iterator(newData.end())); + } + } + + inline void ImGuiCpuProfiler::CullFrameData(const AZ::RHI::CpuTimingStatistics& currentCpuTimingStatistics) + { + const AZStd::sys_time_t frameToFrameTime = currentCpuTimingStatistics.m_frameToFrameTime; + const AZStd::sys_time_t deleteBeforeTick = AZStd::GetTimeNowTicks() - frameToFrameTime * m_framesToCollect; + + // Remove old frame boundary data + auto firstBoundaryToKeepItr = AZStd::upper_bound(m_frameEndTicks.begin(), m_frameEndTicks.end(), deleteBeforeTick); + m_frameEndTicks.erase(m_frameEndTicks.begin(), firstBoundaryToKeepItr); + + // Remove old region data for each thread + for (auto& [threadId, savedRegions] : m_savedData) + { + AZStd::size_t sizeBeforeRemove = savedRegions.size(); + + auto firstRegionToKeep = AZStd::lower_bound( + savedRegions.begin(), savedRegions.end(), deleteBeforeTick, + [](const TimeRegion& region, AZStd::sys_time_t target) + { + return region.m_startTick < target; + }); + savedRegions.erase(savedRegions.begin(), firstRegionToKeep); + + m_savedRegionCount -= sizeBeforeRemove - savedRegions.size(); + } + } + + inline void ImGuiCpuProfiler::DrawBlock(const TimeRegion& block, u64 targetRow) + { + float wy = ImGui::GetWindowPos().y - ImGui::GetScrollY(); + + ImDrawList* drawList = ImGui::GetWindowDrawList(); + + const float startPixel = ConvertTickToPixelSpace(block.m_startTick); + const float endPixel = ConvertTickToPixelSpace(block.m_endTick); + + const ImVec2 startPoint = { startPixel, wy + targetRow * RowHeight }; + const ImVec2 endPoint = { endPixel, wy + targetRow * RowHeight + 40 }; + + const ImU32 blockColor = GetBlockColor(block); + + drawList->AddRectFilled(startPoint, endPoint, blockColor, 0); + + // Draw the region name if possible + // If the block's current width is too small, we skip drawing the label. + const float regionPixelWidth = endPixel - startPixel; + const float maxCharWidth = ImGui::CalcTextSize("M").x; // M is usually the largest character in most fonts (see CSS em) + if (regionPixelWidth > maxCharWidth) // We can draw at least one character + { + const AZStd::string label = + AZStd::string::format("%s/ %s", block.m_groupRegionName->m_groupName, block.m_groupRegionName->m_regionName); + const float textWidth = ImGui::CalcTextSize(label.c_str()).x; + + if (regionPixelWidth < textWidth) // Not enough space in the block to draw the whole name, draw clipped text. + { + // clipRect appears to only clip when a character is fully outside of its bounds which can lead to overflow + // for now subtract the width of a character + const ImVec4 clipRect = { startPoint.x, startPoint.y, endPoint.x - maxCharWidth, endPoint.y }; + const float fontSize = ImGui::GetFont()->FontSize; + + ImGui::GetFont()->RenderText(drawList, fontSize, startPoint, IM_COL32_WHITE, clipRect, label.c_str(), 0); + } + else // We have enough space to draw the entire label, draw and center text. + { + const float remainingWidth = regionPixelWidth - textWidth; + const float offset = remainingWidth * .5; + + drawList->AddText({ startPoint.x + offset, startPoint.y }, IM_COL32_WHITE, label.c_str()); + } + } + + // Tooltip and block highlighting + if (ImGui::IsMouseHoveringRect(startPoint, endPoint) && ImGui::IsWindowHovered()) + { + // Open function statistics map on click + if (ImGui::IsMouseClicked(ImGuiMouseButton_Left)) + { + const GroupRegionName* key = block.m_groupRegionName; + m_regionStatisticsMap[key].m_draw = true; + } + + // Hovering outline + drawList->AddRect(startPoint, endPoint, ImGui::GetColorU32({ 1, 1, 1, 1 }), 0.0, 0, 1.5); + + ImGui::BeginTooltip(); + ImGui::Text("%s::%s", block.m_groupRegionName->m_groupName, block.m_groupRegionName->m_regionName); + ImGui::Text("Execution time: %.3f ms", CpuProfilerImGuiHelper::TicksToMs(block.m_endTick - block.m_startTick)); + ImGui::Text("Ticks %lld => %lld", block.m_startTick, block.m_endTick); + ImGui::EndTooltip(); + } + } + + inline ImU32 ImGuiCpuProfiler::GetBlockColor(const TimeRegion& block) + { + // Use the GroupRegionName pointer a key into the cache, equal regions will have equal pointers + const GroupRegionName* key = block.m_groupRegionName; + if (m_regionColorMap.contains(key)) // Cache hit + { + return ImGui::GetColorU32(m_regionColorMap[key]); + } + + // Cache miss, generate a new random color + AZ::SimpleLcgRandom rand(aznumeric_cast(AZStd::GetTimeNowTicks())); + const float r = AZStd::clamp(rand.GetRandomFloat(), .1f, .9f); + const float g = AZStd::clamp(rand.GetRandomFloat(), .1f, .9f); + const float b = AZStd::clamp(rand.GetRandomFloat(), .1f, .9f); + const ImVec4 randomColor = {r, g, b, .8}; + m_regionColorMap.emplace(key, randomColor); + return ImGui::GetColorU32(randomColor); + } + + inline void ImGuiCpuProfiler::DrawThreadSeparator(u64 baseRow, u64 maxDepth) + { + const ImU32 red = ImGui::GetColorU32({ 1, 0, 0, 1 }); + + auto [wx, wy] = ImGui::GetWindowPos(); + wy -= ImGui::GetScrollY(); + const float windowWidth = ImGui::GetWindowWidth(); + const float boundaryY = wy + (baseRow + maxDepth + 1) * RowHeight - 5; + + ImGui::GetWindowDrawList()->AddLine({ wx, boundaryY }, { wx + windowWidth, boundaryY }, red, 2.0f); + } + + inline void ImGuiCpuProfiler::DrawThreadLabel(u64 baseRow, AZStd::thread_id threadId) + { + auto [wx, wy] = ImGui::GetWindowPos(); + wy -= ImGui::GetScrollY(); + const AZStd::string threadIdText = CpuProfilerImGuiHelper::TextThreadId(threadId.m_id); + + ImGui::GetWindowDrawList()->AddText({ wx + 10, wy + baseRow * RowHeight + 5 }, IM_COL32_WHITE, threadIdText.c_str()); + } + + inline void ImGuiCpuProfiler::DrawRegionStatistics() + { + for (auto& [groupRegionName, stat] : m_regionStatisticsMap) + { + if (stat.m_draw) + { + ImGui::SetNextWindowSize({300, 340}, ImGuiCond_FirstUseEver); + ImGui::Begin(groupRegionName->m_regionName, &stat.m_draw, 0); + + if (ImGui::Button(stat.m_record ? "Pause" : "Resume")) + { + stat.m_record = !stat.m_record; + } + + ImGui::Text("Invocations: %llu", stat.m_invocations); + ImGui::Text("Average time: %.3f ms", stat.CalcAverageTimeMs()); + + ImGui::Separator(); + + ImGui::ColorPicker4("Region color", &m_regionColorMap[groupRegionName].x); + ImGui::End(); + } + } + } + + inline void ImGuiCpuProfiler::DrawFrameBoundaries() + { + ImDrawList* drawList = ImGui::GetWindowDrawList(); + + const float wy = ImGui::GetWindowPos().y; + const float windowHeight = ImGui::GetWindowHeight(); + const ImU32 red = ImGui::GetColorU32({ 1, 0, 0, 1 }); + + // End ticks are sorted in increasing order, find the first frame bound to draw + auto endTickItr = AZStd::lower_bound(m_frameEndTicks.begin(), m_frameEndTicks.end(), m_viewportStartTick); + + // Draw to one element before the last collected boundary if possible to avoid empty frame at the end + auto drawToItr = m_frameEndTicks.size() > 1 ? m_frameEndTicks.end() - 1 : m_frameEndTicks.end(); + + while (endTickItr != drawToItr && *endTickItr < m_viewportEndTick) + { + const float horizontalPixel = ConvertTickToPixelSpace(*endTickItr); + drawList->AddLine({ horizontalPixel, wy }, { horizontalPixel, wy + windowHeight }, red); + endTickItr++; + } + } + + inline void ImGuiCpuProfiler::DrawRuler() + { + // Use a pair of iterators to go through all saved frame boundaries and draw ruler lines + auto lastFrameBoundaryItr = AZStd::lower_bound(m_frameEndTicks.begin(), m_frameEndTicks.end(), m_viewportStartTick); + auto nextFrameBoundaryItr = lastFrameBoundaryItr; + if (lastFrameBoundaryItr != m_frameEndTicks.begin()) + { + lastFrameBoundaryItr--; + } + + const auto [wx, wy] = ImGui::GetWindowPos(); + ImDrawList* drawList = ImGui::GetWindowDrawList(); + + auto drawToItr = m_frameEndTicks.size() > 1 ? m_frameEndTicks.end() - 1 : m_frameEndTicks.end(); + + while (nextFrameBoundaryItr != drawToItr && *lastFrameBoundaryItr <= m_viewportEndTick) + { + const AZStd::sys_time_t lastFrameBoundaryTick = *lastFrameBoundaryItr; + const AZStd::sys_time_t nextFrameBoundaryTick = *nextFrameBoundaryItr; + if (lastFrameBoundaryTick > m_viewportEndTick) + { + break; + } + + const float lastFrameBoundaryPixel = ConvertTickToPixelSpace(lastFrameBoundaryTick); + const float nextFrameBoundaryPixel = ConvertTickToPixelSpace(nextFrameBoundaryTick); + + const AZStd::string label = + AZStd::string::format("%.2f ms", CpuProfilerImGuiHelper::TicksToMs(nextFrameBoundaryTick - lastFrameBoundaryTick)); + const float labelWidth = ImGui::CalcTextSize(label.c_str()).x; + + // The label can fit between the two boundaries, center it and draw + if (labelWidth <= nextFrameBoundaryPixel - lastFrameBoundaryPixel) + { + const float offset = (nextFrameBoundaryPixel - lastFrameBoundaryPixel - labelWidth) /2; + const float textBeginPixel = lastFrameBoundaryPixel + offset; + const float textEndPixel = textBeginPixel + labelWidth; + + // Execution time label + drawList->AddText({ textBeginPixel, wy + ImGui::GetWindowHeight() / 4 }, IM_COL32_WHITE, label.c_str()); + + // Left side + drawList->AddLine( + { lastFrameBoundaryPixel, wy + ImGui::GetWindowHeight() / 2 }, + { textBeginPixel - 5, wy + ImGui::GetWindowHeight() / 2}, + IM_COL32_WHITE); + + // Right side + drawList->AddLine( + { textEndPixel, wy + ImGui::GetWindowHeight()/2 }, + { nextFrameBoundaryPixel, wy + ImGui::GetWindowHeight()/2 }, + IM_COL32_WHITE); + } + else // Cannot fit inside, just draw a line between the two boundaries + { + drawList->AddLine( + { lastFrameBoundaryPixel, wy + ImGui::GetWindowHeight() / 2 }, + { nextFrameBoundaryPixel, wy + ImGui::GetWindowHeight() / 2 }, + IM_COL32_WHITE); + } + + // Left bound + drawList->AddLine( + { lastFrameBoundaryPixel, wy }, + { lastFrameBoundaryPixel, wy + ImGui::GetWindowHeight() }, + IM_COL32_WHITE); + + // Right bound + drawList->AddLine( + { nextFrameBoundaryPixel, wy }, + { nextFrameBoundaryPixel, wy + ImGui::GetWindowHeight() }, + IM_COL32_WHITE); + + lastFrameBoundaryItr = nextFrameBoundaryItr; + nextFrameBoundaryItr++; + } + } + + inline AZStd::sys_time_t ImGuiCpuProfiler::GetViewportTickWidth() const + { + return m_viewportEndTick - m_viewportStartTick; + } + + inline float ImGuiCpuProfiler::ConvertTickToPixelSpace(AZStd::sys_time_t tick) const + { + const float wx = ImGui::GetWindowPos().x; + const float tickSpaceShifted = aznumeric_cast(tick - m_viewportStartTick); // This will be close to zero, so FP inaccuracy should not be too bad + const float tickSpaceNormalized = tickSpaceShifted / GetViewportTickWidth(); + const float pixelSpace = tickSpaceNormalized * ImGui::GetWindowWidth() + wx; + return pixelSpace; + } + + // System tick bus overrides + inline void ImGuiCpuProfiler::OnSystemTick() + { + if (!m_paused) + { + m_frameEndTicks.push_back(AZStd::GetTimeNowTicks()); + } + + if (!m_showVisualizer || m_paused) + { + SystemTickBus::Handler::BusDisconnect(); + } + } + + // ----- RegionStatistics implementation ----- + + inline float RegionStatistics::CalcAverageTimeMs() const + { + if (m_invocations == 0) + { + return 0.0; + } + const double averageTicks = aznumeric_cast(m_totalTicks) / m_invocations; + return CpuProfilerImGuiHelper::TicksToMs(aznumeric_cast(averageTicks)); + } + + inline void RegionStatistics::RecordRegion(const AZ::RHI::CachedTimeRegion& region) + { + m_invocations++; + m_totalTicks += region.m_endTick - region.m_startTick; + } + } // namespace Render +} // namespace AZ diff --git a/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiPassTree.h b/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiPassTree.h index e735852926..d907e7e7eb 100644 --- a/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiPassTree.h +++ b/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiPassTree.h @@ -32,11 +32,14 @@ namespace AZ void ReadbackCallback(const AZ::RPI::AttachmentReadback::ReadbackResult& readbackResult); + void DrawPassAttachments(AZ::RPI::Pass* pass); + bool m_previewAttachment = false; bool m_showAttachments = false; AZ::RPI::Pass* m_selectedPass = nullptr; AZ::RHI::AttachmentId m_attachmentId; + AZ::Name m_slotName; bool m_selectedChanged = false; AZStd::shared_ptr m_readback; diff --git a/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiPassTree.inl b/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiPassTree.inl index cd53131933..d31674754e 100644 --- a/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiPassTree.inl +++ b/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiPassTree.inl @@ -76,6 +76,7 @@ namespace AZ::Render { m_selectedChanged = true; m_attachmentId = AZ::RHI::AttachmentId{}; + m_slotName = AZ::Name{}; } } @@ -88,13 +89,12 @@ namespace AZ::Render m_readback->SetCallback(AZStd::bind(&ImGuiPassTree::ReadbackCallback, this, AZStd::placeholders::_1)); } - if (m_selectedPass && !m_attachmentId.IsEmpty()) + if (m_selectedPass && !m_slotName.IsEmpty()) { - AZ::RPI::RenderPass* renderPass = azrtti_cast(m_selectedPass); - if (renderPass) + bool readbackResult = m_selectedPass->ReadbackAttachment(m_readback, m_slotName); + if (!readbackResult) { - AZ::RPI::PassAttachment* attachment = FindPassAttachment(renderPass, m_attachmentId); - renderPass->ReadbackAttachment(m_readback, attachment); + AZ_Error("ImGuiPassTree", false, "Failed to readback attachment from pass [%s] slot [%s]", m_selectedPass->GetName().GetCStr(), m_slotName.GetCStr()); } } } @@ -144,6 +144,77 @@ namespace AZ::Render } ImGui::End(); } + + inline void ImGuiPassTree::DrawPassAttachments(AZ::RPI::Pass* pass) + { + for (const auto& binding : pass->GetAttachmentBindings()) + { + // Binding info: [slot type] [slot name] + AZStd::string label = AZStd::string::format("[%s] [%s]", AZ::RPI::ToString(binding.m_slotType), + binding.m_name.GetCStr()); + + // Append attachment info if the attachment exists + if (binding.m_attachment) + { + AZ::RHI::AttachmentType type = binding.m_attachment->GetAttachmentType(); + + // Append attachment info: [attachment type] attachment name + label += AZStd::string::format(" [%s] %s", + AZ::RHI::ToString(type), + binding.m_attachment->m_name.GetCStr()); + + if (type == AZ::RHI::AttachmentType::Image) + { + // Append image info: [format] [size] [msaa] + AZ::RHI::ImageDescriptor descriptor; + if (binding.m_attachment->m_importedResource) + { + AZ::RPI::Image* image = static_cast(binding.m_attachment->m_importedResource.get()); + descriptor = image->GetRHIImage()->GetDescriptor(); + } + else + { + descriptor = binding.m_attachment->m_descriptor.m_image; + } + auto format = descriptor.m_format; + auto size = descriptor.m_size; + label += AZStd::string::format(" [%s] [%dx%d]", AZ::RHI::ToString(format), size.m_width, size.m_height); + + if (descriptor.m_multisampleState.m_samples > 1) + { + if (descriptor.m_multisampleState.m_customPositionsCount > 0) + { + label += AZStd::string::format(" [MSAA_Custom_%dx]", descriptor.m_multisampleState.m_samples); + } + else + { + label += AZStd::string::format(" [MSAA_%dx]", descriptor.m_multisampleState.m_samples); + } + } + } + else if (type == AZ::RHI::AttachmentType::Buffer) + { + // Append buffer info: [size] + auto size = binding.m_attachment->m_descriptor.m_buffer.m_byteCount; + label += AZStd::string::format(" [%llu]", size); + } + + if (Scriptable_ImGui::Selectable(label.c_str(), m_attachmentId == binding.m_attachment->GetAttachmentId())) + { + m_selectedPass = pass; + m_attachmentId = binding.m_attachment->GetAttachmentId(); + m_slotName = binding.m_name; + m_selectedChanged = true; + } + } + else + { + // Only draw text (not selectable) if there is no attachment binded to the slot. + ImGui::Text(label.c_str()); + } + } + + } inline void ImGuiPassTree::DrawTreeView(AZ::RPI::Pass* pass) { @@ -164,6 +235,7 @@ namespace AZ::Render { m_selectedPass = pass; m_attachmentId = AZ::RHI::AttachmentId{}; + m_slotName = AZ::Name{}; m_selectedChanged = true; } } @@ -179,76 +251,13 @@ namespace AZ::Render { m_selectedPass = pass; m_attachmentId = AZ::RHI::AttachmentId{}; + m_slotName = AZ::Name{}; m_selectedChanged = true; } if (nodeOpen) { - for (const auto& binding : pass->GetAttachmentBindings()) - { - // Binding info: [slot type] [slot name] - AZStd::string label = AZStd::string::format("[%s] [%s]", AZ::RPI::ToString(binding.m_slotType), - binding.m_name.GetCStr()); - - // Append attachment info if the attachment exists - if (binding.m_attachment) - { - AZ::RHI::AttachmentType type = binding.m_attachment->GetAttachmentType(); - - // Append attachment info: [attachment type] attachment name - label += AZStd::string::format(" [%s] %s", - AZ::RHI::ToString(type), - binding.m_attachment->m_name.GetCStr()); - - if (type == AZ::RHI::AttachmentType::Image) - { - // Append image info: [format] [size] [msaa] - AZ::RHI::ImageDescriptor descriptor; - if (binding.m_attachment->m_importedResource) - { - AZ::RPI::Image* image = static_cast(binding.m_attachment->m_importedResource.get()); - descriptor = image->GetRHIImage()->GetDescriptor(); - } - else - { - descriptor = binding.m_attachment->m_descriptor.m_image; - } - auto format = descriptor.m_format; - auto size = descriptor.m_size; - label += AZStd::string::format(" [%s] [%dx%d]", AZ::RHI::ToString(format), size.m_width, size.m_height); - - if (descriptor.m_multisampleState.m_samples > 1) - { - if (descriptor.m_multisampleState.m_customPositionsCount > 0) - { - label += AZStd::string::format(" [MSAA_Custom_%dx]", descriptor.m_multisampleState.m_samples); - } - else - { - label += AZStd::string::format(" [MSAA_%dx]", descriptor.m_multisampleState.m_samples); - } - } - } - else if (type == AZ::RHI::AttachmentType::Buffer) - { - // Append buffer info: [size] - auto size = binding.m_attachment->m_descriptor.m_buffer.m_byteCount; - label += AZStd::string::format(" [%llu]", size); - } - - if (Scriptable_ImGui::Selectable(label.c_str(), m_attachmentId == binding.m_attachment->GetAttachmentId())) - { - m_selectedPass = pass; - m_attachmentId = binding.m_attachment->GetAttachmentId(); - m_selectedChanged = true; - } - } - else - { - // Only draw text (not selectable) if there is no attachment binded to the slot. - ImGui::Text(label.c_str()); - } - } + DrawPassAttachments(pass); Scriptable_ImGui::TreePop(); } @@ -266,11 +275,13 @@ namespace AZ::Render { m_selectedPass = pass; m_attachmentId = AZ::RHI::AttachmentId{}; + m_slotName = AZ::Name{}; m_selectedChanged = true; } if (nodeOpen) { + DrawPassAttachments(pass); for (const auto& child : asParent->GetChildren()) { DrawTreeView(child.get()); @@ -354,6 +365,7 @@ namespace AZ::Render m_selectedPass = nullptr; m_attachmentId = AZ::RHI::AttachmentId{}; + m_slotName = AZ::Name{}; m_selectedChanged = false; m_readback = nullptr; m_previewPass = nullptr; diff --git a/Gems/AtomLyIntegration/AtomFont/Code/Include/AtomLyIntegration/AtomFont/AtomFont.h b/Gems/AtomLyIntegration/AtomFont/Code/Include/AtomLyIntegration/AtomFont/AtomFont.h index 9fe3f2c25b..9e6c38a939 100644 --- a/Gems/AtomLyIntegration/AtomFont/Code/Include/AtomLyIntegration/AtomFont/AtomFont.h +++ b/Gems/AtomLyIntegration/AtomFont/Code/Include/AtomLyIntegration/AtomFont/AtomFont.h @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -38,6 +39,7 @@ namespace AZ class AtomFont : public ICryFont , public AzFramework::FontQueryInterface + , private Data::AssetBus::Handler { friend class FFont; @@ -122,6 +124,9 @@ namespace AZ //! \param outputFullPath Full path to loaded font family, may need resolving with PathUtil::MakeGamePath. XmlNodeRef LoadFontFamilyXml(const char* fontFamilyName, string& outputDirectory, string& outputFullPath); + // Data::AssetBus::Handler overrides... + void OnAssetReady(Data::Asset asset) override; + private: AzFramework::ISceneSystem::SceneEvent::Handler m_sceneEventHandler; diff --git a/Gems/AtomLyIntegration/AtomFont/Code/Source/AtomFont.cpp b/Gems/AtomLyIntegration/AtomFont/Code/Source/AtomFont.cpp index 114dbf62bb..cb157b95f6 100644 --- a/Gems/AtomLyIntegration/AtomFont/Code/Source/AtomFont.cpp +++ b/Gems/AtomLyIntegration/AtomFont/Code/Source/AtomFont.cpp @@ -29,6 +29,7 @@ #include #include +#include // Static member definitions const AZ::AtomFont::GlyphSize AZ::AtomFont::defaultGlyphSize = AZ::AtomFont::GlyphSize(ICryFont::defaultGlyphSizeX, ICryFont::defaultGlyphSizeY); @@ -349,30 +350,18 @@ AZ::AtomFont::AtomFont(ISystem* system) #endif AZ::Interface::Register(this); - // register font per viewport dynamic draw context. + // Queue a load for the font per viewport dynamic draw context shader, and wait for it to load static const char* shaderFilepath = "Shaders/SimpleTextured.azshader"; - AZ::AtomBridge::PerViewportDynamicDraw::Get()->RegisterDynamicDrawContext( - AZ::Name(AZ::AtomFontDynamicDrawContextName), - [](RPI::Ptr drawContext) - { - Data::Instance shader = AZ::RPI::LoadShader(shaderFilepath); - AZ::RPI::ShaderOptionList shaderOptions; - shaderOptions.push_back(AZ::RPI::ShaderOption(AZ::Name("o_useColorChannels"), AZ::Name("false"))); - shaderOptions.push_back(AZ::RPI::ShaderOption(AZ::Name("o_clamp"), AZ::Name("true"))); - drawContext->InitShaderWithVariant(shader, &shaderOptions); - drawContext->InitVertexFormat( - { - {"POSITION", RHI::Format::R32G32B32_FLOAT}, - {"COLOR", RHI::Format::B8G8R8A8_UNORM}, - {"TEXCOORD0", RHI::Format::R32G32_FLOAT} - }); - drawContext->EndInit(); - }); + Data::Asset shaderAsset = RPI::AssetUtils::GetAssetByProductPath(shaderFilepath, RPI::AssetUtils::TraceLevel::Assert); + shaderAsset.QueueLoad(); + Data::AssetBus::Handler::BusConnect(shaderAsset.GetId()); } AZ::AtomFont::~AtomFont() { + Data::AssetBus::Handler::BusDisconnect(); + AZ::Interface::Unregister(this); m_defaultFontDrawInterface = nullptr; @@ -864,5 +853,36 @@ XmlNodeRef AZ::AtomFont::LoadFontFamilyXml(const char* fontFamilyName, string& o return root; } + +void AZ::AtomFont::OnAssetReady(Data::Asset asset) +{ + Data::Asset shaderAsset = asset; + + AZ::AtomBridge::PerViewportDynamicDraw::Get()->RegisterDynamicDrawContext( + AZ::Name(AZ::AtomFontDynamicDrawContextName), + [shaderAsset](RPI::Ptr drawContext) + { + AZ_Assert(shaderAsset->IsReady(), "Attempting to register the AtomFont" + " dynamic draw context before the shader asset is loaded. The shader should be loaded first" + " to avoid a blocking asset load and potential deadlock, since the DynamicDrawContext lambda" + " will be executed during scene processing and there may be multiple scenes executing in parallel."); + + Data::Instance shader = RPI::Shader::FindOrCreate(shaderAsset); + AZ::RPI::ShaderOptionList shaderOptions; + shaderOptions.push_back(AZ::RPI::ShaderOption(AZ::Name("o_useColorChannels"), AZ::Name("false"))); + shaderOptions.push_back(AZ::RPI::ShaderOption(AZ::Name("o_clamp"), AZ::Name("true"))); + drawContext->InitShaderWithVariant(shader, &shaderOptions); + drawContext->InitVertexFormat( + { + {"POSITION", RHI::Format::R32G32B32_FLOAT}, + {"COLOR", RHI::Format::B8G8R8A8_UNORM}, + {"TEXCOORD0", RHI::Format::R32G32_FLOAT} + }); + drawContext->EndInit(); + }); + + Data::AssetBus::Handler::BusDisconnect(); +} + #endif diff --git a/Gems/AtomLyIntegration/AtomViewportDisplayIcons/Code/Source/AtomViewportDisplayIconsSystemComponent.cpp b/Gems/AtomLyIntegration/AtomViewportDisplayIcons/Code/Source/AtomViewportDisplayIconsSystemComponent.cpp index 305fad8ad0..f3f06a2efc 100644 --- a/Gems/AtomLyIntegration/AtomViewportDisplayIcons/Code/Source/AtomViewportDisplayIconsSystemComponent.cpp +++ b/Gems/AtomLyIntegration/AtomViewportDisplayIcons/Code/Source/AtomViewportDisplayIconsSystemComponent.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -87,6 +88,7 @@ namespace AZ::Render void AtomViewportDisplayIconsSystemComponent::Deactivate() { + Data::AssetBus::Handler::BusDisconnect(); Bootstrap::NotificationBus::Handler::BusDisconnect(); auto perViewportDynamicDrawInterface = AtomBridge::PerViewportDynamicDraw::Get(); @@ -338,15 +340,32 @@ namespace AZ::Render void AtomViewportDisplayIconsSystemComponent::OnBootstrapSceneReady([[maybe_unused]]AZ::RPI::Scene* bootstrapScene) { - AtomBridge::PerViewportDynamicDraw::Get()->RegisterDynamicDrawContext(m_drawContextName, [](RPI::Ptr drawContext) - { - auto shader = RPI::LoadShader(DrawContextShaderPath); - drawContext->InitShader(shader); - drawContext->InitVertexFormat( - {{"POSITION", RHI::Format::R32G32B32_FLOAT}, - {"COLOR", RHI::Format::R8G8B8A8_UNORM}, - {"TEXCOORD", RHI::Format::R32G32_FLOAT}}); - drawContext->EndInit(); - }); + // Queue a load for the draw context shader, and wait for it to load + Data::Asset shaderAsset = RPI::AssetUtils::GetAssetByProductPath(DrawContextShaderPath, RPI::AssetUtils::TraceLevel::Assert); + shaderAsset.QueueLoad(); + Data::AssetBus::Handler::BusConnect(shaderAsset.GetId()); + } + + void AtomViewportDisplayIconsSystemComponent::OnAssetReady(Data::Asset asset) + { + // Once the shader is loaded, register it with the dynamic draw context + Data::Asset shaderAsset = asset; + AtomBridge::PerViewportDynamicDraw::Get()->RegisterDynamicDrawContext(m_drawContextName, [shaderAsset](RPI::Ptr drawContext) + { + AZ_Assert(shaderAsset->IsReady(), "Attempting to register the AtomViewportDisplayIconsSystemComponent" + " dynamic draw context before the shader asset is loaded. The shader should be loaded first" + " to avoid a blocking asset load and potential deadlock, since the DynamicDrawContext lambda" + " will be executed during scene processing and there may be multiple scenes executing in parallel."); + + Data::Instance shader = RPI::Shader::FindOrCreate(shaderAsset); + drawContext->InitShader(shader); + drawContext->InitVertexFormat( + { {"POSITION", RHI::Format::R32G32B32_FLOAT}, + {"COLOR", RHI::Format::R8G8B8A8_UNORM}, + {"TEXCOORD", RHI::Format::R32G32_FLOAT} }); + drawContext->EndInit(); + }); + + Data::AssetBus::Handler::BusDisconnect(); } } // namespace AZ::Render diff --git a/Gems/AtomLyIntegration/AtomViewportDisplayIcons/Code/Source/AtomViewportDisplayIconsSystemComponent.h b/Gems/AtomLyIntegration/AtomViewportDisplayIcons/Code/Source/AtomViewportDisplayIconsSystemComponent.h index 8cb268d36a..cd6fddf745 100644 --- a/Gems/AtomLyIntegration/AtomViewportDisplayIcons/Code/Source/AtomViewportDisplayIconsSystemComponent.h +++ b/Gems/AtomLyIntegration/AtomViewportDisplayIcons/Code/Source/AtomViewportDisplayIconsSystemComponent.h @@ -27,6 +27,7 @@ namespace AZ : public AZ::Component , public AzToolsFramework::EditorViewportIconDisplayInterface , public AZ::Render::Bootstrap::NotificationBus::Handler + , private Data::AssetBus::Handler { public: AZ_COMPONENT(AtomViewportDisplayIconsSystemComponent, "{AEC1D3E1-1D9A-437A-B4C6-CFAEE620C160}"); @@ -51,6 +52,9 @@ namespace AZ // AZ::Render::Bootstrap::NotificationBus::Handler overrides... void OnBootstrapSceneReady(AZ::RPI::Scene* bootstrapScene) override; + // Data::AssetBus::Handler overrides... + void OnAssetReady(Data::Asset asset) override; + private: static constexpr const char* DrawContextShaderPath = "Shaders/TexturedIcon.azshader"; static constexpr QSize MinimumRenderedSvgSize = QSize(128, 128); diff --git a/Gems/AtomLyIntegration/AtomViewportDisplayInfo/Code/Source/AtomViewportDisplayInfoSystemComponent.cpp b/Gems/AtomLyIntegration/AtomViewportDisplayInfo/Code/Source/AtomViewportDisplayInfoSystemComponent.cpp index 5b14fbebb9..af9fd7fdd8 100644 --- a/Gems/AtomLyIntegration/AtomViewportDisplayInfo/Code/Source/AtomViewportDisplayInfoSystemComponent.cpp +++ b/Gems/AtomLyIntegration/AtomViewportDisplayInfo/Code/Source/AtomViewportDisplayInfoSystemComponent.cpp @@ -155,9 +155,9 @@ namespace AZ::Render m_drawParams.m_drawViewportId = viewportContext->GetId(); auto viewportSize = viewportContext->GetViewportSize(); - m_drawParams.m_position = AZ::Vector3(viewportSize.m_width, 0.0f, 1.0f) + AZ::Vector3(r_topRightBorderPadding); + m_drawParams.m_position = AZ::Vector3(viewportSize.m_width, 0.0f, 1.0f) + AZ::Vector3(r_topRightBorderPadding) * viewportContext->GetDpiScalingFactor(); m_drawParams.m_color = AZ::Colors::White; - m_drawParams.m_scale = AZ::Vector2(0.7f); + m_drawParams.m_scale = AZ::Vector2(BaseFontSize * viewportContext->GetDpiScalingFactor()); m_drawParams.m_hAlign = AzFramework::TextHorizontalAlignment::Right; m_drawParams.m_monospace = false; m_drawParams.m_depthTest = false; diff --git a/Gems/AtomLyIntegration/AtomViewportDisplayInfo/Code/Source/AtomViewportDisplayInfoSystemComponent.h b/Gems/AtomLyIntegration/AtomViewportDisplayInfo/Code/Source/AtomViewportDisplayInfoSystemComponent.h index 13f42dd638..cec6cd958c 100644 --- a/Gems/AtomLyIntegration/AtomViewportDisplayInfo/Code/Source/AtomViewportDisplayInfoSystemComponent.h +++ b/Gems/AtomLyIntegration/AtomViewportDisplayInfo/Code/Source/AtomViewportDisplayInfoSystemComponent.h @@ -60,6 +60,8 @@ namespace AZ void DrawPassInfo(); void DrawFramerate(); + static constexpr float BaseFontSize = 0.7f; + AZStd::string m_rendererDescription; AzFramework::TextDrawParameters m_drawParams; AzFramework::FontDrawInterface* m_fontDrawInterface = nullptr; diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/DirectionalLightComponentConfig.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/DirectionalLightComponentConfig.cpp index 3923136bcc..5325ba911d 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/DirectionalLightComponentConfig.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/DirectionalLightComponentConfig.cpp @@ -9,6 +9,7 @@ #include #include #include +#include namespace AZ { @@ -55,21 +56,15 @@ namespace AZ case PhotometricUnit::Lux: return 0.0f; case PhotometricUnit::Ev100Illuminance: - return -10.0f; + return AZStd::numeric_limits::lowest(); } return 0.0f; } float DirectionalLightComponentConfig::GetIntensityMax() const { - switch (m_intensityMode) - { - case PhotometricUnit::Lux: - return 1'000'000.0f; - case PhotometricUnit::Ev100Illuminance: - return 20.0f; - } - return 0.0f; + // While there is no hard-max, a max must be included when there is a hard min. + return AZStd::numeric_limits::max(); } float DirectionalLightComponentConfig::GetIntensitySoftMin() const diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorAreaLightComponent.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorAreaLightComponent.cpp index 5dabd7317b..c27faa2241 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorAreaLightComponent.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorAreaLightComponent.cpp @@ -154,19 +154,19 @@ namespace AZ ->Attribute(Edit::Attributes::Visibility, &AreaLightComponentConfig::SupportsShadows) ->Attribute(Edit::Attributes::ReadOnly, &AreaLightComponentConfig::IsPcfBoundarySearchDisabled) ->DataElement(Edit::UIHandlers::Slider, &AreaLightComponentConfig::m_predictionSampleCount, "Prediction sample count", - "Sample Count for prediction of whether the pixel is on the boundary. Specific to PCF and ESM+PCF.") + "Sample count for prediction of whether the pixel is on the boundary. Specific to PCF and ESM+PCF.") ->Attribute(Edit::Attributes::Min, 4) ->Attribute(Edit::Attributes::Max, 16) ->Attribute(Edit::Attributes::Visibility, &AreaLightComponentConfig::SupportsShadows) ->Attribute(Edit::Attributes::ReadOnly, &AreaLightComponentConfig::IsPcfBoundarySearchDisabled) ->DataElement(Edit::UIHandlers::Slider, &AreaLightComponentConfig::m_filteringSampleCount, "Filtering sample count", - "It is used only when the pixel is predicted to be on the boundary. Specific to PCF and ESM+PCF.") + "This is only used when the pixel is predicted to be on the boundary. Specific to PCF and ESM+PCF.") ->Attribute(Edit::Attributes::Min, 4) ->Attribute(Edit::Attributes::Max, 64) ->Attribute(Edit::Attributes::Visibility, &AreaLightComponentConfig::SupportsShadows) ->Attribute(Edit::Attributes::ReadOnly, &AreaLightComponentConfig::IsShadowPcfDisabled) ->DataElement( - Edit::UIHandlers::ComboBox, &AreaLightComponentConfig::m_pcfMethod, "Pcf method", + Edit::UIHandlers::ComboBox, &AreaLightComponentConfig::m_pcfMethod, "PCF method", "Type of PCF to use.\n" " Bicubic: a smooth, fixed-size kernel \n" " Boundary search: do several taps to first determine if we are on a shadow boundary\n") @@ -176,8 +176,8 @@ namespace AZ ->Attribute(Edit::Attributes::Visibility, &AreaLightComponentConfig::SupportsShadows) ->Attribute(Edit::Attributes::ReadOnly, &AreaLightComponentConfig::IsShadowPcfDisabled) ->DataElement( - Edit::UIHandlers::Slider, &AreaLightComponentConfig::m_esmExponent, "Esm Exponent", - "Exponent used by Esm shadows. " + Edit::UIHandlers::Slider, &AreaLightComponentConfig::m_esmExponent, "ESM exponent", + "Exponent used by ESM shadows. " "Larger values increase the sharpness of the border between lit and unlit areas.") ->Attribute(Edit::Attributes::Min, 50.0f) ->Attribute(Edit::Attributes::Max, 5000.0f) @@ -263,7 +263,23 @@ namespace AZ // Update the cached light type. m_lightType = m_controller.m_configuration.m_lightType; + + // Check to see if the current photometric type is supported by the light type. If not, convert to lumens before deactivating. + auto supportedPhotometricUnits = m_controller.m_configuration.GetValidPhotometricUnits(); + auto foundIt = AZStd::find_if( + supportedPhotometricUnits.begin(), + supportedPhotometricUnits.end(), + [&](const Edit::EnumConstant& entry) -> bool + { + return AZStd::RemoveEnum::type(m_controller.m_configuration.m_intensityMode) == entry.m_value; + } + ); + if (foundIt == supportedPhotometricUnits.end()) + { + m_controller.ConvertToIntensityMode(PhotometricUnit::Lumen); + } + // componets may be removed or added here, so deactivate now and reactivate the entity when everything is done shifting around. GetEntity()->Deactivate(); @@ -320,7 +336,7 @@ namespace AZ // Some light types don't require a shape, this is ok. break; } - + GetEntity()->Activate(); // Set more reasonable default values for certain shapes. @@ -333,7 +349,7 @@ namespace AZ LmbrCentral::DiskShapeComponentRequestBus::Event(GetEntityId(), &LmbrCentral::DiskShapeComponentRequests::SetRadius, 0.05f); break; } - + return true; } diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorDirectionalLightComponent.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorDirectionalLightComponent.cpp index 8163dcfe20..4d43c23e25 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorDirectionalLightComponent.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorDirectionalLightComponent.cpp @@ -57,74 +57,74 @@ namespace AZ editContext->Class("DirectionalLightComponentConfig", "") ->ClassElement(Edit::ClassElements::EditorData, "") ->DataElement(Edit::UIHandlers::Color, &DirectionalLightComponentConfig::m_color, "Color", "Color of the light") - ->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly) - ->Attribute("ColorEditorConfiguration", AZ::RPI::ColorUtils::GetLinearRgbEditorConfig()) - ->DataElement(Edit::UIHandlers::ComboBox, &DirectionalLightComponentConfig::m_intensityMode, "Intensity Mode", "Allows specifying light values in lux or Ev100") - ->EnumAttribute(PhotometricUnit::Lux, "Lux") - ->EnumAttribute(PhotometricUnit::Ev100Illuminance, "Ev100") - ->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::AttributesAndValues) + ->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly) + ->Attribute("ColorEditorConfiguration", AZ::RPI::ColorUtils::GetLinearRgbEditorConfig()) + ->DataElement(Edit::UIHandlers::ComboBox, &DirectionalLightComponentConfig::m_intensityMode, "Intensity mode", "Allows specifying light values in lux or Ev100") + ->EnumAttribute(PhotometricUnit::Lux, "Lux") + ->EnumAttribute(PhotometricUnit::Ev100Illuminance, "Ev100") + ->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::AttributesAndValues) ->DataElement(Edit::UIHandlers::Slider, &DirectionalLightComponentConfig::m_intensity, "Intensity", "Intensity of the light in the set photometric unit.") - ->Attribute(Edit::Attributes::Min, &DirectionalLightComponentConfig::GetIntensityMin) - ->Attribute(Edit::Attributes::Max, &DirectionalLightComponentConfig::GetIntensityMax) - ->Attribute(Edit::Attributes::SoftMin, &DirectionalLightComponentConfig::GetIntensitySoftMin) - ->Attribute(Edit::Attributes::SoftMax, &DirectionalLightComponentConfig::GetIntensitySoftMax) - ->Attribute(Edit::Attributes::Suffix, &DirectionalLightComponentConfig::GetIntensitySuffix) - ->DataElement(Edit::UIHandlers::Slider, &DirectionalLightComponentConfig::m_angularDiameter, "Angular Diameter", "Angular Diameter of the directional light in degrees. The sun is about 0.5.") - ->Attribute(Edit::Attributes::Min, 0.0f) - ->Attribute(Edit::Attributes::Max, 5.0f) - ->Attribute(Edit::Attributes::SoftMax, 1.0f) - ->Attribute(Edit::Attributes::Suffix, " deg") + ->Attribute(Edit::Attributes::Min, &DirectionalLightComponentConfig::GetIntensityMin) + ->Attribute(Edit::Attributes::Max, &DirectionalLightComponentConfig::GetIntensityMax) + ->Attribute(Edit::Attributes::SoftMin, &DirectionalLightComponentConfig::GetIntensitySoftMin) + ->Attribute(Edit::Attributes::SoftMax, &DirectionalLightComponentConfig::GetIntensitySoftMax) + ->Attribute(Edit::Attributes::Suffix, &DirectionalLightComponentConfig::GetIntensitySuffix) + ->DataElement(Edit::UIHandlers::Slider, &DirectionalLightComponentConfig::m_angularDiameter, "Angular diameter", "Angular diameter of the directional light in degrees. The sun is about 0.5.") + ->Attribute(Edit::Attributes::Min, 0.0f) + ->Attribute(Edit::Attributes::Max, 5.0f) + ->Attribute(Edit::Attributes::SoftMax, 1.0f) + ->Attribute(Edit::Attributes::Suffix, " deg") ->ClassElement(AZ::Edit::ClassElements::Group, "Shadow") - ->Attribute(AZ::Edit::Attributes::AutoExpand, true) + ->Attribute(AZ::Edit::Attributes::AutoExpand, true) ->DataElement(Edit::UIHandlers::EntityId, &DirectionalLightComponentConfig::m_cameraEntityId, "Camera", "Entity of the camera for cascaded shadowmap view frustum.") ->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly) - ->DataElement(Edit::UIHandlers::Default, &DirectionalLightComponentConfig::m_shadowFarClipDistance, "Shadow Far Clip", "Shadow sepcific far clip distance.") + ->DataElement(Edit::UIHandlers::Default, &DirectionalLightComponentConfig::m_shadowFarClipDistance, "Shadow far clip", "Shadow specific far clip distance.") ->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly) - ->DataElement(Edit::UIHandlers::ComboBox, &DirectionalLightComponentConfig::m_shadowmapSize, "Shadowmap Size", "Width/Height of shadowmap") + ->DataElement(Edit::UIHandlers::ComboBox, &DirectionalLightComponentConfig::m_shadowmapSize, "Shadowmap size", "Width/Height of shadowmap") ->EnumAttribute(ShadowmapSize::Size256, " 256") ->EnumAttribute(ShadowmapSize::Size512, " 512") ->EnumAttribute(ShadowmapSize::Size1024, "1024") ->EnumAttribute(ShadowmapSize::Size2048, "2048") ->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly) - ->DataElement(Edit::UIHandlers::Slider, &DirectionalLightComponentConfig::m_cascadeCount, "Cascade Count", "Number of cascades") + ->DataElement(Edit::UIHandlers::Slider, &DirectionalLightComponentConfig::m_cascadeCount, "Cascade count", "Number of cascades") ->Attribute(Edit::Attributes::Min, 1) ->Attribute(Edit::Attributes::Max, Shadow::MaxNumberOfCascades) ->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly) - ->DataElement(Edit::UIHandlers::Default, &DirectionalLightComponentConfig::m_isShadowmapFrustumSplitAutomatic, "Split Automatic", + ->DataElement(Edit::UIHandlers::Default, &DirectionalLightComponentConfig::m_isShadowmapFrustumSplitAutomatic, "Automatic splitting", "Switch splitting of shadowmap frustum to cascades automatically or not.") - ->DataElement(Edit::UIHandlers::Slider, &DirectionalLightComponentConfig::m_shadowmapFrustumSplitSchemeRatio, "Split Ratio", + ->DataElement(Edit::UIHandlers::Slider, &DirectionalLightComponentConfig::m_shadowmapFrustumSplitSchemeRatio, "Split ratio", "Ratio to lerp between the two types of frustum splitting scheme.\n" - "0 = Uniform scheme which will split the Frustum evenly across all cascades.\n" + "0 = Uniform scheme which will split the frustum evenly across all cascades.\n" "1 = Logarithmic scheme which is designed to split the frustum in a logarithmic fashion " "in order to enable us to produce a more optimal perspective aliasing across the frustum.") ->Attribute(Edit::Attributes::Min, 0.f) ->Attribute(Edit::Attributes::Max, 1.f) ->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly) - ->Attribute(Edit::Attributes::ReadOnly, &DirectionalLightComponentConfig::IsSplitManual) - ->DataElement(Edit::UIHandlers::Vector4, &DirectionalLightComponentConfig::m_cascadeFarDepths, "Far Depth Cascade", - "Far Depth of each cascade. The value of the index greater than or equal to cascade count is ignored.") + ->Attribute(Edit::Attributes::ReadOnly, &DirectionalLightComponentConfig::IsSplitManual) + ->DataElement(Edit::UIHandlers::Vector4, &DirectionalLightComponentConfig::m_cascadeFarDepths, "Far depth cascade", + "Far depth of each cascade. The value of the index greater than or equal to cascade count is ignored.") ->Attribute(Edit::Attributes::Min, 0.01f) ->Attribute(Edit::Attributes::Max, &DirectionalLightComponentConfig::m_shadowFarClipDistance) ->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly) ->Attribute(Edit::Attributes::ReadOnly, &DirectionalLightComponentConfig::IsSplitAutomatic) - ->DataElement(Edit::UIHandlers::Default, &DirectionalLightComponentConfig::m_groundHeight, "Ground Height", + ->DataElement(Edit::UIHandlers::Default, &DirectionalLightComponentConfig::m_groundHeight, "Ground height", "Height of the ground. Used to correct position of cascades.") ->Attribute(Edit::Attributes::Suffix, " m") ->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly) - ->Attribute(Edit::Attributes::ReadOnly, &DirectionalLightComponentConfig::IsCascadeCorrectionDisabled) + ->Attribute(Edit::Attributes::ReadOnly, &DirectionalLightComponentConfig::IsCascadeCorrectionDisabled) ->DataElement(Edit::UIHandlers::CheckBox, - &DirectionalLightComponentConfig::m_isCascadeCorrectionEnabled, "Enable Cascade Correction?", + &DirectionalLightComponentConfig::m_isCascadeCorrectionEnabled, "Cascade correction", "Enable position correction of cascades to optimize the appearance for certain camera positions.") ->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly) ->DataElement(Edit::UIHandlers::CheckBox, - &DirectionalLightComponentConfig::m_isDebugColoringEnabled, "Enable Debug Coloring?", + &DirectionalLightComponentConfig::m_isDebugColoringEnabled, "Debug coloring", "Enable coloring to see how cascades places 0:red, 1:green, 2:blue, 3:yellow.") ->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly) - ->DataElement(Edit::UIHandlers::ComboBox, &DirectionalLightComponentConfig::m_shadowFilterMethod, "Shadow Filter Method", + ->DataElement(Edit::UIHandlers::ComboBox, &DirectionalLightComponentConfig::m_shadowFilterMethod, "Shadow filter method", "Filtering method of edge-softening of shadows.\n" - " None: no filtering\n" - " PCF: Percentage-Closer Filtering\n" - " ESM: Exponential Shadow Maps\n" + " None: No filtering\n" + " PCF: Percentage-closer filtering\n" + " ESM: Exponential shadow maps\n" " ESM+PCF: ESM with a PCF fallback\n" "For BehaviorContext (or TrackView), None=0, PCF=1, ESM=2, ESM+PCF=3") ->EnumAttribute(ShadowFilterMethod::None, "None") @@ -132,7 +132,7 @@ namespace AZ ->EnumAttribute(ShadowFilterMethod::Esm, "ESM") ->EnumAttribute(ShadowFilterMethod::EsmPcf, "ESM+PCF") ->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly) - ->DataElement(Edit::UIHandlers::Slider, &DirectionalLightComponentConfig::m_boundaryWidth, "Softening Boundary Width", + ->DataElement(Edit::UIHandlers::Slider, &DirectionalLightComponentConfig::m_boundaryWidth, "Softening boundary width", "Width of the boundary between shadowed area and lit one. " "Units are in meters. " "If this is 0, softening edge is disabled.") @@ -141,29 +141,29 @@ namespace AZ ->Attribute(Edit::Attributes::Suffix, " m") ->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly) ->Attribute(Edit::Attributes::ReadOnly, &DirectionalLightComponentConfig::IsPcfBoundarySearchDisabled) - ->DataElement(Edit::UIHandlers::Slider, &DirectionalLightComponentConfig::m_predictionSampleCount, "Prediction Sample Count", - "Sample Count for prediction of whether the pixel is on the boundary. " + ->DataElement(Edit::UIHandlers::Slider, &DirectionalLightComponentConfig::m_predictionSampleCount, "Prediction sample count", + "Sample count for prediction of whether the pixel is on the boundary. " "Specific to PCF and ESM+PCF.") ->Attribute(Edit::Attributes::Min, 4) ->Attribute(Edit::Attributes::Max, 16) ->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly) ->Attribute(Edit::Attributes::ReadOnly, &DirectionalLightComponentConfig::IsPcfBoundarySearchDisabled) - ->DataElement(Edit::UIHandlers::Slider, &DirectionalLightComponentConfig::m_filteringSampleCount, "Filtering Sample Count", - "It is used only when the pixel is predicted as on the boundary. " + ->DataElement(Edit::UIHandlers::Slider, &DirectionalLightComponentConfig::m_filteringSampleCount, "Filtering sample count", + "This is used only when the pixel is predicted as on the boundary. " "Specific to PCF and ESM+PCF.") ->Attribute(Edit::Attributes::Min, 4) ->Attribute(Edit::Attributes::Max, 64) ->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly) ->Attribute(Edit::Attributes::ReadOnly, &DirectionalLightComponentConfig::IsShadowPcfDisabled) ->DataElement( - Edit::UIHandlers::ComboBox, &DirectionalLightComponentConfig::m_pcfMethod, "Pcf Method", - "Type of Pcf to use.\n" + Edit::UIHandlers::ComboBox, &DirectionalLightComponentConfig::m_pcfMethod, "Pcf method", + "Type of PCF to use.\n" " Bicubic: a smooth, fixed-size kernel \n" " Boundary search: do several taps to first determine if we are on a shadow boundary\n") - ->EnumAttribute(PcfMethod::Bicubic, "Bicubic") - ->EnumAttribute(PcfMethod::BoundarySearch, "Boundary Search") - ->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly) - ->Attribute(Edit::Attributes::ReadOnly, &DirectionalLightComponentConfig::IsShadowPcfDisabled); + ->EnumAttribute(PcfMethod::Bicubic, "Bicubic") + ->EnumAttribute(PcfMethod::BoundarySearch, "Boundary search") + ->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly) + ->Attribute(Edit::Attributes::ReadOnly, &DirectionalLightComponentConfig::IsShadowPcfDisabled); ; } diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/LightDelegateBase.inl b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/LightDelegateBase.inl index 36c53c8fab..a84487749f 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/LightDelegateBase.inl +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/LightDelegateBase.inl @@ -134,6 +134,11 @@ namespace AZ // For lights that get their transform from the shape bus, force an OnShapeChanged to update the transform. OnShapeChanged(ShapeChangeReasons::TransformChanged); } + else + { + // OnShapeChanged() already calls this for delegates with a shape bus + HandleShapeChanged(); + } } } diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/EditorMaterialSystemComponent.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/EditorMaterialSystemComponent.cpp index a8d6270c7e..efb79bb06c 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/EditorMaterialSystemComponent.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/EditorMaterialSystemComponent.cpp @@ -130,6 +130,12 @@ namespace AZ arguments.append(QString("--rhi=%1").arg(apiName.GetCStr())); } + AZ::IO::FixedMaxPathString projectPath(AZ::Utils::GetProjectPath()); + if (!projectPath.empty()) + { + arguments.append(QString("--project-path=%1").arg(projectPath.c_str())); + } + AtomToolsFramework::LaunchTool("MaterialEditor", ".exe", arguments); } diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Thumbnails/Rendering/ThumbnailRendererSteps/CaptureStep.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Thumbnails/Rendering/ThumbnailRendererSteps/CaptureStep.cpp index 46d9b59edb..3881a8c8f8 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Thumbnails/Rendering/ThumbnailRendererSteps/CaptureStep.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Thumbnails/Rendering/ThumbnailRendererSteps/CaptureStep.cpp @@ -114,7 +114,7 @@ namespace AZ Render::FrameCaptureRequestBus::BroadcastResult( startedCapture, &Render::FrameCaptureRequestBus::Events::CapturePassAttachmentWithCallback, - m_context->GetData()->m_passHierarchy, AZStd::string("Output"), readbackCallback); + m_context->GetData()->m_passHierarchy, AZStd::string("Output"), readbackCallback, RPI::PassAttachmentReadbackOption::Output); // Reset the capture flag if the capture request was successful. Otherwise try capture it again next tick. if (startedCapture) { diff --git a/Gems/AtomLyIntegration/ImguiAtom/Code/Source/ImguiAtomSystemComponent.cpp b/Gems/AtomLyIntegration/ImguiAtom/Code/Source/ImguiAtomSystemComponent.cpp index fd41ff45a5..c9fcbe33ca 100644 --- a/Gems/AtomLyIntegration/ImguiAtom/Code/Source/ImguiAtomSystemComponent.cpp +++ b/Gems/AtomLyIntegration/ImguiAtom/Code/Source/ImguiAtomSystemComponent.cpp @@ -50,7 +50,8 @@ namespace AZ { ImGui::OtherActiveImGuiRequestBus::Handler::BusConnect(); - auto atomViewportRequests = AZ::Interface::Get(); + auto atomViewportRequests = AZ::RPI::ViewportContextRequests::Get(); + AZ_Assert(atomViewportRequests, "AtomViewportContextRequests interface not found!"); const AZ::Name contextName = atomViewportRequests->GetDefaultViewportContextName(); AZ::RPI::ViewportContextNotificationBus::Handler::BusConnect(contextName); @@ -105,10 +106,20 @@ namespace AZ // Let our ImguiAtomSystemComponent know once we successfully connect and update the viewport size. if (!m_initialized) { + auto atomViewportRequests = AZ::RPI::ViewportContextRequests::Get(); + auto defaultViewportContext = atomViewportRequests->GetDefaultViewportContext(); + OnViewportDpiScalingChanged(defaultViewportContext->GetDpiScalingFactor()); m_initialized = true; } }); -#endif +#endif //define(IMGUI_ENABLED) + } + + void ImguiAtomSystemComponent::OnViewportDpiScalingChanged([[maybe_unused]] float dpiScale) + { +#if defined(IMGUI_ENABLED) + ImGui::ImGuiManagerBus::Broadcast(&ImGui::ImGuiManagerBus::Events::SetDpiScalingFactor, dpiScale); +#endif //define(IMGUI_ENABLED) } } } diff --git a/Gems/AtomLyIntegration/ImguiAtom/Code/Source/ImguiAtomSystemComponent.h b/Gems/AtomLyIntegration/ImguiAtom/Code/Source/ImguiAtomSystemComponent.h index e487c9a39a..a0ff1a5dd9 100644 --- a/Gems/AtomLyIntegration/ImguiAtom/Code/Source/ImguiAtomSystemComponent.h +++ b/Gems/AtomLyIntegration/ImguiAtom/Code/Source/ImguiAtomSystemComponent.h @@ -51,6 +51,7 @@ namespace AZ // ViewportContextNotificationBus overrides... void OnRenderTick() override; void OnViewportSizeChanged(AzFramework::WindowSize size) override; + void OnViewportDpiScalingChanged(float dpiScale) override; DebugConsole m_debugConsole; bool m_initialized = false; diff --git a/Gems/Blast/Code/Include/Blast/BlastDebug.h b/Gems/Blast/Code/Include/Blast/BlastDebug.h index 2530eb4217..9613b94ff5 100644 --- a/Gems/Blast/Code/Include/Blast/BlastDebug.h +++ b/Gems/Blast/Code/Include/Blast/BlastDebug.h @@ -8,7 +8,7 @@ #include #include -#include +#include namespace Blast { diff --git a/Gems/Blast/Code/Source/Family/ActorRenderManager.h b/Gems/Blast/Code/Source/Family/ActorRenderManager.h index c4037bb638..c0cdda158c 100644 --- a/Gems/Blast/Code/Source/Family/ActorRenderManager.h +++ b/Gems/Blast/Code/Source/Family/ActorRenderManager.h @@ -8,7 +8,7 @@ #include #include -#include +#include namespace Blast { diff --git a/Gems/EMotionFX/Code/EMotionFX/Pipeline/SceneAPIExt/Rules/MotionMetaDataRule.h b/Gems/EMotionFX/Code/EMotionFX/Pipeline/SceneAPIExt/Rules/MotionMetaDataRule.h index 873dccef72..e2f530a887 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Pipeline/SceneAPIExt/Rules/MotionMetaDataRule.h +++ b/Gems/EMotionFX/Code/EMotionFX/Pipeline/SceneAPIExt/Rules/MotionMetaDataRule.h @@ -37,7 +37,7 @@ namespace EMotionFX::Pipeline::Rule AZStd::unique_ptr m_motionEventTable; }; - class MotionMetaDataRule + class MotionMetaDataRule final : public ExternalToolRule> { public: @@ -46,7 +46,7 @@ namespace EMotionFX::Pipeline::Rule MotionMetaDataRule(); MotionMetaDataRule(const AZStd::shared_ptr& data); - ~MotionMetaDataRule() final = default; + ~MotionMetaDataRule() = default; const AZStd::shared_ptr& GetData() const override { return m_data; } void SetData(const AZStd::shared_ptr& data) override { m_data = data; } diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeLookAtNode.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeLookAtNode.cpp index 57fa502abd..76b788facd 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeLookAtNode.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeLookAtNode.cpp @@ -433,12 +433,12 @@ namespace EMotionFX ->Attribute(AZ::Edit::Attributes::ChangeNotify, AZ::Edit::PropertyRefreshLevels::EntireTree) ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeLookAtNode::m_limitMin, "Yaw/pitch min", "The minimum rotational yaw and pitch angle limits, in degrees.") ->Attribute(AZ::Edit::Attributes::Visibility, &BlendTreeLookAtNode::GetLimitWidgetsVisibility) - ->Attribute(AZ::Edit::Attributes::Min, AZ::Vector2(-90.0f, -90.0f)) - ->Attribute(AZ::Edit::Attributes::Max, AZ::Vector2(90.0f, 90.0f)) + ->Attribute(AZ::Edit::Attributes::Min, -90.0f) + ->Attribute(AZ::Edit::Attributes::Max, 90.0f) ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeLookAtNode::m_limitMax, "Yaw/pitch max", "The maximum rotational yaw and pitch angle limits, in degrees.") ->Attribute(AZ::Edit::Attributes::Visibility, &BlendTreeLookAtNode::GetLimitWidgetsVisibility) - ->Attribute(AZ::Edit::Attributes::Min, AZ::Vector2(-90.0f, -90.0f)) - ->Attribute(AZ::Edit::Attributes::Max, AZ::Vector2(90.0f, 90.0f)) + ->Attribute(AZ::Edit::Attributes::Min, -90.0f) + ->Attribute(AZ::Edit::Attributes::Max, 90.0f) ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeLookAtNode::m_constraintRotation, "Constraint rotation", "A rotation that rotates the constraint space.") ->Attribute(AZ::Edit::Attributes::Visibility, &BlendTreeLookAtNode::GetLimitWidgetsVisibility) ->DataElement(AZ::Edit::UIHandlers::ComboBox, &BlendTreeLookAtNode::m_twistAxis, "Roll axis", "The axis used for twist/roll.") diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeTransformNode.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeTransformNode.cpp index b8abf2cc90..f67bf831f9 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeTransformNode.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeTransformNode.cpp @@ -261,23 +261,15 @@ namespace EMotionFX ->Attribute(AZ::Edit::Attributes::ChangeNotify, &BlendTreeTransformNode::Reinit) ->Attribute(AZ::Edit::Attributes::ChangeNotify, AZ::Edit::PropertyRefreshLevels::EntireTree) ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeTransformNode::m_minTranslation, "Min Translation", "The minimum translation value, used when the input translation amount equals zero.") - ->Attribute(AZ::Edit::Attributes::Min, AZ::Vector3(-std::numeric_limits::max())) - ->Attribute(AZ::Edit::Attributes::Max, AZ::Vector3(std::numeric_limits::max())) ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeTransformNode::m_maxTranslation, "Max Translation", "The maximum translation value, used when the input translation amount equals one.") - ->Attribute(AZ::Edit::Attributes::Min, AZ::Vector3(-std::numeric_limits::max())) - ->Attribute(AZ::Edit::Attributes::Max, AZ::Vector3(std::numeric_limits::max())) ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeTransformNode::m_minRotation, "Min Rotation", "The minimum rotation value, in degrees, used when the input rotation amount equals zero.") - ->Attribute(AZ::Edit::Attributes::Min, AZ::Vector3(-360.0f, -360.0f, -360.0f)) - ->Attribute(AZ::Edit::Attributes::Max, AZ::Vector3(360.0f, 360.0f, 360.0f)) + ->Attribute(AZ::Edit::Attributes::Min, -360.0f) + ->Attribute(AZ::Edit::Attributes::Max, 360.0f) ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeTransformNode::m_maxRotation, "Max Rotation", "The maximum rotation value, in degrees, used when the input rotation amount equals one.") - ->Attribute(AZ::Edit::Attributes::Min, AZ::Vector3(-360.0f, -360.0f, -360.0f)) - ->Attribute(AZ::Edit::Attributes::Max, AZ::Vector3(360.0f, 360.0f, 360.0f)) + ->Attribute(AZ::Edit::Attributes::Min, -360.0f) + ->Attribute(AZ::Edit::Attributes::Max, 360.0f) ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeTransformNode::m_minScale, "Min Scale", "The minimum scale value, used when the input scale amount equals zero.") - ->Attribute(AZ::Edit::Attributes::Min, AZ::Vector3(-std::numeric_limits::max())) - ->Attribute(AZ::Edit::Attributes::Max, AZ::Vector3(std::numeric_limits::max())) ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeTransformNode::m_maxScale, "Max Scale", "The maximum scale value, used when the input scale amount equals one.") - ->Attribute(AZ::Edit::Attributes::Min, AZ::Vector3(-std::numeric_limits::max())) - ->Attribute(AZ::Edit::Attributes::Max, AZ::Vector3(std::numeric_limits::max())) ; } } // namespace EMotionFX diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeVector3Math2Node.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeVector3Math2Node.cpp index 2ee0d92dcc..356fa78b59 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeVector3Math2Node.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeVector3Math2Node.cpp @@ -254,8 +254,6 @@ namespace EMotionFX ->EnumAttribute(MATHFUNCTION_DIVIDE, "Divide") ->EnumAttribute(MATHFUNCTION_ANGLEDEGREES, "AngleDegrees") ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeVector3Math2Node::m_defaultValue, "Default Value", "The default value for x or y when one of them has no incomming connection.") - ->Attribute(AZ::Edit::Attributes::Min, AZ::Vector3(-std::numeric_limits::max())) - ->Attribute(AZ::Edit::Attributes::Max, AZ::Vector3(std::numeric_limits::max())) ; } } // namespace EMotionFX diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Editor/GraphModelBus.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Editor/GraphModelBus.h index b59a4162d1..e7a05c5ee9 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Editor/GraphModelBus.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Editor/GraphModelBus.h @@ -90,19 +90,6 @@ namespace GraphCanvas return result; } - //! This is sent to confirm whether or not a variable assignment can take place. - virtual bool IsValidVariableAssignment(const AZ::EntityId& variableId, const Endpoint& targetPoint) const = 0; - - //! This will return the structure needed to display why a variable could not be assigned to a specific reference inside of GraphCanvas. - virtual ConnectionValidationTooltip GetVariableAssignmentValidityTooltip(const AZ::EntityId& variableId, const Endpoint& targetPoint) const - { - ConnectionValidationTooltip result; - - result.m_isValid = IsValidVariableAssignment(variableId, targetPoint); - - return result; - } - //! Get the Display Type name for the given AZ type virtual AZStd::string GetDataTypeString(const AZ::Uuid& typeId) = 0; diff --git a/Gems/GraphModel/Code/Include/GraphModel/Integration/GraphController.h b/Gems/GraphModel/Code/Include/GraphModel/Integration/GraphController.h index 84e54ea6bf..817b709b70 100644 --- a/Gems/GraphModel/Code/Include/GraphModel/Integration/GraphController.h +++ b/Gems/GraphModel/Code/Include/GraphModel/Integration/GraphController.h @@ -147,8 +147,6 @@ namespace GraphModelIntegration bool CreateConnection(const AZ::EntityId& connectionUiId, const GraphCanvas::Endpoint& sourcePoint, const GraphCanvas::Endpoint& targetPoint) override; bool IsValidConnection(const GraphCanvas::Endpoint& sourcePoint, const GraphCanvas::Endpoint& targetPoint) const override; - bool IsValidVariableAssignment(const AZ::EntityId& variableId, const GraphCanvas::Endpoint& targetPoint) const override; - //////////////////////////////////////////////////////////////////////////////////// // GraphCanvas::GraphModelRequestBus, undo diff --git a/Gems/GraphModel/Code/Source/Integration/GraphController.cpp b/Gems/GraphModel/Code/Source/Integration/GraphController.cpp index dff224b03d..e61cd7671e 100644 --- a/Gems/GraphModel/Code/Source/Integration/GraphController.cpp +++ b/Gems/GraphModel/Code/Source/Integration/GraphController.cpp @@ -1187,14 +1187,6 @@ namespace GraphModelIntegration return dataTypesMatch && !CheckForLoopback(sourceSlot->GetParentNode(), targetSlot->GetParentNode()); } - - bool GraphController::IsValidVariableAssignment([[maybe_unused]] const AZ::EntityId& variableId, [[maybe_unused]] const GraphCanvas::Endpoint& targetPoint) const - { - AZ_Assert(false, "This Graph Canvas does not support graph variables"); - return false; - } - - //! Helper function to create a GraphCanvas::NodePropertyDisplay and a data interface for editing input pin values //! \typename DataInterfaceType One of the data interface types. Ex: BooleanDataInterface //! \typename CreateDisplayFunctionType Function pointer type should be filled automatically diff --git a/Gems/ImGui/Code/Include/ImGuiBus.h b/Gems/ImGui/Code/Include/ImGuiBus.h index cee9f3882d..06a3b472da 100644 --- a/Gems/ImGui/Code/Include/ImGuiBus.h +++ b/Gems/ImGui/Code/Include/ImGuiBus.h @@ -8,6 +8,7 @@ #pragma once #include +#include // Forward Declares struct ImVec2; @@ -86,7 +87,19 @@ namespace ImGui virtual void SetImGuiRenderResolution(const ImVec2& res) = 0; virtual void OverrideRenderWindowSize(uint32_t width, uint32_t height) = 0; virtual void RestoreRenderWindowSizeToDefault() = 0; + virtual void ToggleThroughImGuiVisibleState() = 0; + virtual void SetDpiScalingFactor(float dpiScalingFactor) = 0; + virtual float GetDpiScalingFactor() const = 0; virtual void Render() = 0; + + using ImGuiSetEnabledEvent = AZ::Event; + ImGuiSetEnabledEvent m_setEnabledEvent; + + // interface + void ConnectImGuiSetEnabledChangedHandler(ImGuiSetEnabledEvent::Handler& handler) + { + handler.Connect(m_setEnabledEvent); + } }; class IImGuiManagerRequests @@ -99,19 +112,30 @@ namespace ImGui }; using ImGuiManagerBus = AZ::EBus; - // Bus for getting notifications from the IMGUI Entity Outliner - class IImGuiEntityOutlinerNotifcations : public AZ::EBusTraits + class IImGuiManagerNotifications : public AZ::EBusTraits { public: - static const char* GetUniqueName() { return "IImGuiEntityOutlinerNotifcations"; } static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Multiple; static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single; - using Bus = AZ::EBus; + using Bus = AZ::EBus; + + virtual void ImGuiSetEnabled( [[maybe_unused]] bool enabled) {} + }; + using ImGuiManagerNotificationBus = AZ::EBus; + + // Bus for getting notifications from the IMGUI Entity Outliner + class IImGuiEntityOutlinerNotifications : public AZ::EBusTraits + { + public: + static const char* GetUniqueName() { return "IImGuiEntityOutlinerNotifications"; } + static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Multiple; + static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single; + using Bus = AZ::EBus; // Callback for game code to handle targetting an IMGUI entity virtual void OnImGuiEntityOutlinerTarget(AZ::EntityId target) { (void)target; } }; - typedef AZ::EBus ImGuiEntityOutlinerNotifcationBus; + typedef AZ::EBus ImGuiEntityOutlinerNotificationBus; // a pair of an entity id, and a typeid, used to represent component rtti type info typedef AZStd::pair ImGuiEntComponentId; diff --git a/Gems/ImGui/Code/Source/ImGuiManager.cpp b/Gems/ImGui/Code/Source/ImGuiManager.cpp index 7e936bb1f9..7b2506fbcb 100644 --- a/Gems/ImGui/Code/Source/ImGuiManager.cpp +++ b/Gems/ImGui/Code/Source/ImGuiManager.cpp @@ -277,6 +277,20 @@ void ImGui::ImGuiManager::RestoreRenderWindowSizeToDefault() InitWindowSize(); } +void ImGui::ImGuiManager::SetDpiScalingFactor(float dpiScalingFactor) +{ + ImGuiIO& io = ImGui::GetIO(); + // Set the global font scale to size our UI to the scaling factor + // Note: Currently we use the default, 13px fixed-size IMGUI font, so this can get somewhat blurry + io.FontGlobalScale = dpiScalingFactor; +} + +float ImGui::ImGuiManager::GetDpiScalingFactor() const +{ + ImGuiIO& io = ImGui::GetIO(); + return io.FontGlobalScale; +} + void ImGuiManager::Render() { if (m_clientMenuBarState == DisplayState::Hidden && m_editorWindowState == DisplayState::Hidden) @@ -724,8 +738,15 @@ void ImGuiManager::ToggleThroughImGuiVisibleState(int controllerIndex) } m_menuBarStatusChanged = true; + m_setEnabledEvent.Signal(m_clientMenuBarState == DisplayState::Hidden); } +void ImGuiManager::ToggleThroughImGuiVisibleState() +{ + ToggleThroughImGuiVisibleState(-1); +} + + void ImGuiManager::RenderImGuiBuffers(const ImVec2& scaleRects) { ImGui::ImGuiContextScope contextScope(m_imguiContext); diff --git a/Gems/ImGui/Code/Source/ImGuiManager.h b/Gems/ImGui/Code/Source/ImGuiManager.h index acd8d7cea4..02af3d0c09 100644 --- a/Gems/ImGui/Code/Source/ImGuiManager.h +++ b/Gems/ImGui/Code/Source/ImGuiManager.h @@ -57,7 +57,10 @@ namespace ImGui void SetImGuiRenderResolution(const ImVec2& res) override { m_renderResolution = res; } void OverrideRenderWindowSize(uint32_t width, uint32_t height) override; void RestoreRenderWindowSizeToDefault() override; + void SetDpiScalingFactor(float dpiScalingFactor) override; + float GetDpiScalingFactor() const override; void Render() override; + void ToggleThroughImGuiVisibleState() override; // -- ImGuiManagerBus Interface ------------------------------------------------------------------- // -- AzFramework::InputChannelEventListener and AzFramework::InputTextEventListener Interface ------------ @@ -82,7 +85,7 @@ namespace ImGui DisplayState m_editorWindowState = DisplayState::Hidden; // ImGui Resolution Settings - ImGuiResolutionMode m_resolutionMode = ImGuiResolutionMode::MatchToMaxRenderResolution; + ImGuiResolutionMode m_resolutionMode = ImGuiResolutionMode::MatchRenderResolution; ImVec2 m_renderResolution = ImVec2(1920.0f, 1080.0f); ImVec2 m_lastRenderResolution; AzFramework::WindowSize m_windowSize = AzFramework::WindowSize(1920, 1080); diff --git a/Gems/ImGui/Code/Source/LYCommonMenu/ImGuiLYAssetExplorer.cpp b/Gems/ImGui/Code/Source/LYCommonMenu/ImGuiLYAssetExplorer.cpp index 2f996f5768..d9d81c24f2 100644 --- a/Gems/ImGui/Code/Source/LYCommonMenu/ImGuiLYAssetExplorer.cpp +++ b/Gems/ImGui/Code/Source/LYCommonMenu/ImGuiLYAssetExplorer.cpp @@ -465,7 +465,7 @@ namespace ImGui ImGui::BeginGroup(); if (ImGui::SmallButton(AZStd::string::format("-View #%03d-##%s", ++instanceCount, meshInstance.first.ToString().c_str()).c_str())) { - ImGuiEntityOutlinerNotifcationBus::Broadcast(&IImGuiEntityOutlinerNotifcations::OnImGuiEntityOutlinerTarget, meshInstance.first); + ImGuiEntityOutlinerNotificationBus::Broadcast(&IImGuiEntityOutlinerNotifications::OnImGuiEntityOutlinerTarget, meshInstance.first); } // Build the Label String. ImGui::SameLine(); diff --git a/Gems/ImGui/Code/Source/LYCommonMenu/ImGuiLYCommonMenu.cpp b/Gems/ImGui/Code/Source/LYCommonMenu/ImGuiLYCommonMenu.cpp index 9994851faa..eb918041f7 100644 --- a/Gems/ImGui/Code/Source/LYCommonMenu/ImGuiLYCommonMenu.cpp +++ b/Gems/ImGui/Code/Source/LYCommonMenu/ImGuiLYCommonMenu.cpp @@ -571,7 +571,26 @@ namespace ImGui // End LY Common Tools menu ImGui::EndMenu(); } + const int labelSize{ 100 }; + const int buttonSize{ 40 }; ImGuiUpdateListenerBus::Broadcast(&IImGuiUpdateListener::OnImGuiMainMenuUpdate); + ImGui::SameLine(ImGui::GetWindowContentRegionMax().x - labelSize); + float backgroundHeight = ImGui::GetTextLineHeight() + 3; + ImVec2 cursorPos = ImGui::GetCursorScreenPos(); + ImGui::GetWindowDrawList()->AddRectFilled( + cursorPos, ImVec2(cursorPos.x + labelSize, cursorPos.y + backgroundHeight), IM_COL32(0, 115, 187, 255)); + ImGui::SameLine(ImGui::GetWindowContentRegionMax().x - labelSize); + ImGui::SetCursorPosY(ImGui::GetCursorPosY() - 1); + ImGui::Text("ImGui:ON"); + ImGui::SameLine(ImGui::GetWindowContentRegionMax().x - buttonSize); + ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 0, 0, 255)); + ImGui::PushStyleColor(ImGuiCol_Button, IM_COL32(255, 255, 255, 255)); + ImGui::PushStyleColor(ImGuiCol_ButtonHovered, IM_COL32(128, 128, 128, 255)); + if (ImGui::SmallButton("home")) + { + ImGuiManagerBus::Broadcast(&IImGuiManager::ToggleThroughImGuiVisibleState); + } + ImGui::PopStyleColor(3); ImGui::EndMainMenuBar(); } diff --git a/Gems/ImGui/Code/Source/LYCommonMenu/ImGuiLYEntityOutliner.cpp b/Gems/ImGui/Code/Source/LYCommonMenu/ImGuiLYEntityOutliner.cpp index aca52af238..57502296ae 100644 --- a/Gems/ImGui/Code/Source/LYCommonMenu/ImGuiLYEntityOutliner.cpp +++ b/Gems/ImGui/Code/Source/LYCommonMenu/ImGuiLYEntityOutliner.cpp @@ -590,7 +590,7 @@ namespace ImGui if (ImGui::SmallButton(targetLabel.c_str())) { // Send EBUS event out to Target an Entity. Up to game code to implement. - ImGuiEntityOutlinerNotifcationBus::Broadcast(&IImGuiEntityOutlinerNotifcations::OnImGuiEntityOutlinerTarget, node->m_entityId); + ImGuiEntityOutlinerNotificationBus::Broadcast(&IImGuiEntityOutlinerNotifications::OnImGuiEntityOutlinerTarget, node->m_entityId); } } diff --git a/Gems/LmbrCentral/Code/Platform/Mac/lrelease_mac.cmake b/Gems/LmbrCentral/Code/Platform/Mac/lrelease_mac.cmake index af355b0a51..34f67ccedd 100644 --- a/Gems/LmbrCentral/Code/Platform/Mac/lrelease_mac.cmake +++ b/Gems/LmbrCentral/Code/Platform/Mac/lrelease_mac.cmake @@ -5,6 +5,15 @@ # # +add_custom_command(TARGET LmbrCentral.Editor POST_BUILD + COMMAND "${CMAKE_COMMAND}" -P "${LY_ROOT_FOLDER}/cmake/Platform/Mac/RPathChange.cmake" + "$/lrelease" + @executable_path/../Frameworks + @executable_path + COMMENT "Patching lrelease..." + VERBATIM +) + set(lrelease_files ${QT_LRELEASE_EXECUTABLE} ) diff --git a/Gems/LmbrCentral/Code/Source/Shape/EditorTubeShapeComponentMode.cpp b/Gems/LmbrCentral/Code/Source/Shape/EditorTubeShapeComponentMode.cpp index a45967a16c..48a68a30a5 100644 --- a/Gems/LmbrCentral/Code/Source/Shape/EditorTubeShapeComponentMode.cpp +++ b/Gems/LmbrCentral/Code/Source/Shape/EditorTubeShapeComponentMode.cpp @@ -22,7 +22,7 @@ namespace LmbrCentral { AZ_CLASS_ALLOCATOR_IMPL(EditorTubeShapeComponentMode, AZ::SystemAllocator, 0) - static const AZ::Crc32 s_resetVariableRadii = AZ_CRC("com.amazon.action.tubeshape.reset_radii", 0x0f2ef8e2); + static const AZ::Crc32 s_resetVariableRadii = AZ_CRC("com.o3de.action.tubeshape.reset_radii", 0x0f2ef8e2); static const char* const s_resetRadiiTitle = "Reset Radii"; static const char* const s_resetRadiiDesc = "Reset all variable radius values to the default"; diff --git a/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorConnection.cpp b/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorConnection.cpp index 421d9875bc..bf4fd81ef1 100644 --- a/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorConnection.cpp +++ b/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorConnection.cpp @@ -178,6 +178,18 @@ namespace Multiplayer void MultiplayerEditorConnection::OnDisconnect([[maybe_unused]] AzNetworking::IConnection* connection, [[maybe_unused]] DisconnectReason reason, [[maybe_unused]] TerminationEndpoint endpoint) { - ; + bool editorLaunch = false; + if (auto console = AZ::Interface::Get(); console) + { + console->GetCvarValue("editorsv_launch", editorLaunch); + } + + if (editorsv_isDedicated && editorLaunch && m_networkEditorInterface->GetConnectionSet().GetConnectionCount() == 1) + { + if (m_networkEditorInterface->GetPort() != 0) + { + m_networkEditorInterface->StopListening(); + } + } } } diff --git a/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.h b/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.h index aae363f0d2..7977a39443 100644 --- a/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.h +++ b/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.h @@ -151,7 +151,7 @@ namespace Multiplayer AZStd::queue m_pendingConnectionTickets; AZ::TimeMs m_lastReplicatedHostTimeMs = AZ::TimeMs{ 0 }; - HostFrameId m_lastReplicatedHostFrameId = InvalidHostFrameId; + HostFrameId m_lastReplicatedHostFrameId = HostFrameId(0); double m_serverSendAccumulator = 0.0; float m_renderBlendFactor = 0.0f; diff --git a/Gems/Multiplayer/Code/Source/NetworkEntity/EntityReplication/PropertyPublisher.cpp b/Gems/Multiplayer/Code/Source/NetworkEntity/EntityReplication/PropertyPublisher.cpp index 2272f43a08..1b21dca50a 100644 --- a/Gems/Multiplayer/Code/Source/NetworkEntity/EntityReplication/PropertyPublisher.cpp +++ b/Gems/Multiplayer/Code/Source/NetworkEntity/EntityReplication/PropertyPublisher.cpp @@ -123,20 +123,23 @@ namespace Multiplayer bool PropertyPublisher::PrepareUpdateEntityRecord() { - // If we reach the maximum outstanding records, reset the replication state + bool didPrepare = true; if (m_sentRecords.size() >= net_EntityReplicatorRecordsMax) { - return PrepareAddEntityRecord(); + // If we reach the maximum outstanding records, reset the replication state + didPrepare = PrepareAddEntityRecord(); } - - // We need to clear out old records, and build up a list of everything that has changed since the last acked packet - m_sentRecords.push_front(m_pendingRecord); - auto iter = m_sentRecords.begin(); - ++iter; // Consider everything after the record we are going to send - for (; iter != m_sentRecords.end(); ++iter) + else { - // Sequence wasn't acked, so we need to send these bits again - m_pendingRecord.Append(*iter); + // We need to clear out old records, and build up a list of everything that has changed since the last acked packet + m_sentRecords.push_front(m_pendingRecord); + auto iter = m_sentRecords.begin(); + ++iter; // Consider everything after the record we are going to send + for (; iter != m_sentRecords.end(); ++iter) + { + // Sequence wasn't acked, so we need to send these bits again + m_pendingRecord.Append(*iter); + } } // Don't send predictable properties back to the Autonomous unless we correct them @@ -145,7 +148,7 @@ namespace Multiplayer m_pendingRecord.Subtract(m_netBindComponent->GetPredictableRecord()); } - return true; + return didPrepare; } bool PropertyPublisher::PrepareDeleteEntityRecord() diff --git a/Gems/Multiplayer/Code/Source/NetworkEntity/EntityReplication/ReplicationRecord.cpp b/Gems/Multiplayer/Code/Source/NetworkEntity/EntityReplication/ReplicationRecord.cpp index eecd4915e7..1c59c70867 100644 --- a/Gems/Multiplayer/Code/Source/NetworkEntity/EntityReplication/ReplicationRecord.cpp +++ b/Gems/Multiplayer/Code/Source/NetworkEntity/EntityReplication/ReplicationRecord.cpp @@ -191,6 +191,8 @@ namespace Multiplayer bool ReplicationRecord::ContainsAuthorityToClientBits() const { + // Check != Authority here since several modes require information about client updates + // (i.e. Autonomous when performing corrections) return (m_remoteNetEntityRole != NetEntityRole::Authority) || (m_remoteNetEntityRole == NetEntityRole::InvalidRole); } diff --git a/Gems/Multiplayer/Code/Source/ReplicationWindows/ServerToClientReplicationWindow.cpp b/Gems/Multiplayer/Code/Source/ReplicationWindows/ServerToClientReplicationWindow.cpp index 9892cdc7e4..082d556d85 100644 --- a/Gems/Multiplayer/Code/Source/ReplicationWindows/ServerToClientReplicationWindow.cpp +++ b/Gems/Multiplayer/Code/Source/ReplicationWindows/ServerToClientReplicationWindow.cpp @@ -201,10 +201,11 @@ namespace Multiplayer void ServerToClientReplicationWindow::OnEntityActivated(AZ::Entity* entity) { - ConstNetworkEntityHandle entityHandle(entity, GetNetworkEntityTracker()); - NetBindComponent* netBindComponent = entityHandle.GetNetBindComponent(); + NetBindComponent* netBindComponent = entity->FindComponent(); if (netBindComponent != nullptr) { + ConstNetworkEntityHandle entityHandle(netBindComponent, GetNetworkEntityTracker()); + if (netBindComponent->HasController()) { if (IFilterEntityManager* filter = GetMultiplayer()->GetFilterEntityManager()) @@ -233,10 +234,10 @@ namespace Multiplayer void ServerToClientReplicationWindow::OnEntityDeactivated(AZ::Entity* entity) { - ConstNetworkEntityHandle entityHandle(entity, GetNetworkEntityTracker()); - NetBindComponent* netBindComponent = entityHandle.GetNetBindComponent(); + NetBindComponent* netBindComponent = entity->FindComponent(); if (netBindComponent != nullptr) { + ConstNetworkEntityHandle entityHandle(netBindComponent, GetNetworkEntityTracker()); m_replicationSet.erase(entityHandle); } } diff --git a/Gems/NvCloth/Code/Platform/Android/PAL_android.cmake b/Gems/NvCloth/Code/Platform/Android/PAL_android.cmake index 77e8a42871..ffaa3f828f 100644 --- a/Gems/NvCloth/Code/Platform/Android/PAL_android.cmake +++ b/Gems/NvCloth/Code/Platform/Android/PAL_android.cmake @@ -5,6 +5,6 @@ # # -ly_associate_package(PACKAGE_NAME NvCloth-1.1.6-rev2-multiplatform TARGETS NvCloth PACKAGE_HASH 535d927782fa5d3086c5f813c46392ee3c294fc117dcd87b055d469c3f034356) +ly_associate_package(PACKAGE_NAME NvCloth-v1.1.6-4-gd243404-pr58-rev1-android TARGETS NvCloth PACKAGE_HASH 01eb0bc7fae91bb088a7d4c0f9555743a2c442f7b823a89072eacad361a20b42) set(PAL_TRAIT_NVCLOTH_USE_STUB FALSE) diff --git a/Gems/NvCloth/Code/Platform/Linux/PAL_linux.cmake b/Gems/NvCloth/Code/Platform/Linux/PAL_linux.cmake index 77e8a42871..eaf3d92b1c 100644 --- a/Gems/NvCloth/Code/Platform/Linux/PAL_linux.cmake +++ b/Gems/NvCloth/Code/Platform/Linux/PAL_linux.cmake @@ -5,6 +5,6 @@ # # -ly_associate_package(PACKAGE_NAME NvCloth-1.1.6-rev2-multiplatform TARGETS NvCloth PACKAGE_HASH 535d927782fa5d3086c5f813c46392ee3c294fc117dcd87b055d469c3f034356) +ly_associate_package(PACKAGE_NAME NvCloth-v1.1.6-4-gd243404-pr58-rev1-linux TARGETS NvCloth PACKAGE_HASH c2e469c909fb358105ffe854476e87d9c69626aa16bd0ca0bcd941522adadc6d) set(PAL_TRAIT_NVCLOTH_USE_STUB FALSE) diff --git a/Gems/NvCloth/Code/Platform/Mac/PAL_mac.cmake b/Gems/NvCloth/Code/Platform/Mac/PAL_mac.cmake index 77e8a42871..1e856fa1c2 100644 --- a/Gems/NvCloth/Code/Platform/Mac/PAL_mac.cmake +++ b/Gems/NvCloth/Code/Platform/Mac/PAL_mac.cmake @@ -5,6 +5,6 @@ # # -ly_associate_package(PACKAGE_NAME NvCloth-1.1.6-rev2-multiplatform TARGETS NvCloth PACKAGE_HASH 535d927782fa5d3086c5f813c46392ee3c294fc117dcd87b055d469c3f034356) +ly_associate_package(PACKAGE_NAME NvCloth-v1.1.6-4-gd243404-pr58-rev1-mac TARGETS NvCloth PACKAGE_HASH 9156548da6fc35f89b592306cc512257042159e3c9c2ce5f483d8d0701b63716) set(PAL_TRAIT_NVCLOTH_USE_STUB FALSE) diff --git a/Gems/NvCloth/Code/Platform/Windows/PAL_windows.cmake b/Gems/NvCloth/Code/Platform/Windows/PAL_windows.cmake index afedeb2df8..1e8ba72eb8 100644 --- a/Gems/NvCloth/Code/Platform/Windows/PAL_windows.cmake +++ b/Gems/NvCloth/Code/Platform/Windows/PAL_windows.cmake @@ -7,4 +7,4 @@ set(PAL_TRAIT_NVCLOTH_USE_STUB FALSE) -ly_associate_package(PACKAGE_NAME NvCloth-1.1.6-rev2-multiplatform TARGETS NvCloth PACKAGE_HASH 535d927782fa5d3086c5f813c46392ee3c294fc117dcd87b055d469c3f034356) +ly_associate_package(PACKAGE_NAME NvCloth-v1.1.6-4-gd243404-pr58-rev1-windows TARGETS NvCloth PACKAGE_HASH 8f7b3d151db93fcd511afcbcb3a34884eec47fb511c90c8f2c770ac602150010) diff --git a/Gems/NvCloth/Code/Platform/iOS/PAL_ios.cmake b/Gems/NvCloth/Code/Platform/iOS/PAL_ios.cmake index 77e8a42871..fa099bfd3e 100644 --- a/Gems/NvCloth/Code/Platform/iOS/PAL_ios.cmake +++ b/Gems/NvCloth/Code/Platform/iOS/PAL_ios.cmake @@ -5,6 +5,6 @@ # # -ly_associate_package(PACKAGE_NAME NvCloth-1.1.6-rev2-multiplatform TARGETS NvCloth PACKAGE_HASH 535d927782fa5d3086c5f813c46392ee3c294fc117dcd87b055d469c3f034356) +ly_associate_package(PACKAGE_NAME NvCloth-v1.1.6-4-gd243404-pr58-rev1-ios TARGETS NvCloth PACKAGE_HASH 62e17ed51da9a3452b7397a4e1f64aca79e8f4c70181a75aeb6ca596c6692971) set(PAL_TRAIT_NVCLOTH_USE_STUB FALSE) diff --git a/Gems/PhysX/Code/CMakeLists.txt b/Gems/PhysX/Code/CMakeLists.txt index d4fce72672..d3cc95d0a1 100644 --- a/Gems/PhysX/Code/CMakeLists.txt +++ b/Gems/PhysX/Code/CMakeLists.txt @@ -74,9 +74,6 @@ ly_create_alias(NAME PhysX.Servers NAMESPACE Gem TARGETS Gem::PhysX) if(PAL_TRAIT_BUILD_HOST_TOOLS) - ly_associate_package(PACKAGE_NAME poly2tri-0.3.3-rev2-multiplatform TARGETS poly2tri PACKAGE_HASH 04092d06716f59b936b61906eaf3647db23b685d81d8b66131eb53e0aeaa1a38) - ly_associate_package(PACKAGE_NAME v-hacd-2.0-rev1-multiplatform TARGETS v-hacd PACKAGE_HASH 5c71aef19cc9787d018d64eec076e9f51ea5a3e0dc6b6e22e57c898f6cc4afe3) - ly_add_target( NAME PhysX.Editor.Static STATIC NAMESPACE Gem diff --git a/Gems/PhysX/Code/Editor/ColliderComponentMode.cpp b/Gems/PhysX/Code/Editor/ColliderComponentMode.cpp index c084cfa6e0..9624338f5d 100644 --- a/Gems/PhysX/Code/Editor/ColliderComponentMode.cpp +++ b/Gems/PhysX/Code/Editor/ColliderComponentMode.cpp @@ -28,10 +28,10 @@ namespace PhysX namespace { //! Uri's for shortcut actions. - const AZ::Crc32 SetDimensionsSubModeActionUri = AZ_CRC("com.amazon.action.physx.setdimensionssubmode", 0x77b70dd6); - const AZ::Crc32 SetOffsetSubModeActionUri = AZ_CRC("com.amazon.action.physx.setoffsetsubmode", 0xc06132e5); - const AZ::Crc32 SetRotationSubModeActionUri = AZ_CRC("com.amazon.action.physx.setrotationsubmode", 0xc4225918); - const AZ::Crc32 ResetSubModeActionUri = AZ_CRC("com.amazon.action.physx.resetsubmode", 0xb70b120e); + const AZ::Crc32 SetDimensionsSubModeActionUri = AZ_CRC("com.o3de.action.physx.setdimensionssubmode", 0x77b70dd6); + 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); } AZ_CLASS_ALLOCATOR_IMPL(ColliderComponentMode, AZ::SystemAllocator, 0); diff --git a/Gems/PhysX/Code/Editor/EditorJointComponentMode.cpp b/Gems/PhysX/Code/Editor/EditorJointComponentMode.cpp index 4da6e8b892..27feae137c 100644 --- a/Gems/PhysX/Code/Editor/EditorJointComponentMode.cpp +++ b/Gems/PhysX/Code/Editor/EditorJointComponentMode.cpp @@ -23,8 +23,8 @@ namespace PhysX namespace { //! Uri's for shortcut actions. - const AZ::Crc32 GoToNextModeActionUri = AZ_CRC("com.amazon.action.physx.joint.nextmode", 0xe9cf4ed6); - const AZ::Crc32 GoToPrevModeActionUri = AZ_CRC("com.amazon.action.physx.joint.prevmode", 0xe70f8daa); + const AZ::Crc32 GoToNextModeActionUri = AZ_CRC("com.o3de.action.physx.joint.nextmode", 0xe9cf4ed6); + const AZ::Crc32 GoToPrevModeActionUri = AZ_CRC("com.o3de.action.physx.joint.prevmode", 0xe70f8daa); } const AZStd::string EditorJointComponentMode::s_parameterAngularPair = "Twist Limits"; diff --git a/Gems/PhysX/Code/Source/PhysXCharacters/Components/CharacterControllerComponent.cpp b/Gems/PhysX/Code/Source/PhysXCharacters/Components/CharacterControllerComponent.cpp index b2b09306f1..ff7ec66140 100644 --- a/Gems/PhysX/Code/Source/PhysXCharacters/Components/CharacterControllerComponent.cpp +++ b/Gems/PhysX/Code/Source/PhysXCharacters/Components/CharacterControllerComponent.cpp @@ -520,16 +520,19 @@ namespace PhysX CharacterControllerRequestBus::Handler::BusConnect(GetEntityId()); - m_preSimulateHandler = AzPhysics::SystemEvents::OnPresimulateEvent::Handler( - [this](float deltaTime) - { - OnPreSimulate(deltaTime); - } - ); - - if (auto* physXSystem = GetPhysXSystem()) + if (m_characterConfig->m_applyMoveOnPhysicsTick) { - physXSystem->RegisterPreSimulateEvent(m_preSimulateHandler); + m_preSimulateHandler = AzPhysics::SystemEvents::OnPresimulateEvent::Handler( + [this](float deltaTime) + { + OnPreSimulate(deltaTime); + } + ); + + if (auto* physXSystem = GetPhysXSystem()) + { + physXSystem->RegisterPreSimulateEvent(m_preSimulateHandler); + } } } diff --git a/Gems/PhysX/Code/Source/Platform/Linux/PAL_linux.cmake b/Gems/PhysX/Code/Source/Platform/Linux/PAL_linux.cmake index 3a1f8d6ad3..e4c668fc70 100644 --- a/Gems/PhysX/Code/Source/Platform/Linux/PAL_linux.cmake +++ b/Gems/PhysX/Code/Source/Platform/Linux/PAL_linux.cmake @@ -7,3 +7,8 @@ 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) + ly_associate_package(PACKAGE_NAME v-hacd-2.3-1a49edf-rev1-linux TARGETS v-hacd PACKAGE_HASH 777bed3c7805a63446ddfea51c505b35398744f9245fa7ddc58e6a25d034e682) +endif() diff --git a/Gems/PhysX/Code/Source/Platform/Mac/PAL_mac.cmake b/Gems/PhysX/Code/Source/Platform/Mac/PAL_mac.cmake index e2553c1834..db11d1bf2f 100644 --- a/Gems/PhysX/Code/Source/Platform/Mac/PAL_mac.cmake +++ b/Gems/PhysX/Code/Source/Platform/Mac/PAL_mac.cmake @@ -6,4 +6,9 @@ # set(PAL_TRAIT_PHYSX_SUPPORTED TRUE) -set(PAL_TRAIT_JOINTS_TYPED_TEST_CASE FALSE) \ No newline at end of file +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) + ly_associate_package(PACKAGE_NAME v-hacd-2.3-1a49edf-rev1-mac TARGETS v-hacd PACKAGE_HASH c1de9fadb2c0db42416a1bd5fe3423401c6f41b58409bc652064b5ad23667c09) +endif() diff --git a/Gems/PhysX/Code/Source/Platform/Windows/PAL_windows.cmake b/Gems/PhysX/Code/Source/Platform/Windows/PAL_windows.cmake index 9ea967e73b..791bfa49c8 100644 --- a/Gems/PhysX/Code/Source/Platform/Windows/PAL_windows.cmake +++ b/Gems/PhysX/Code/Source/Platform/Windows/PAL_windows.cmake @@ -6,4 +6,9 @@ # set(PAL_TRAIT_PHYSX_SUPPORTED TRUE) -set(PAL_TRAIT_JOINTS_TYPED_TEST_CASE TRUE) \ No newline at end of file +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) + ly_associate_package(PACKAGE_NAME v-hacd-2.3-1a49edf-rev1-windows TARGETS v-hacd PACKAGE_HASH c5826ec28aedc3b5931ddf655d055395872cd3e75cd829f5745a2e607deb7468) +endif() diff --git a/Gems/PhysX/Code/Source/Scene/PhysXScene.cpp b/Gems/PhysX/Code/Source/Scene/PhysXScene.cpp index 81010a6db6..7dfa9c5f78 100644 --- a/Gems/PhysX/Code/Source/Scene/PhysXScene.cpp +++ b/Gems/PhysX/Code/Source/Scene/PhysXScene.cpp @@ -491,6 +491,10 @@ namespace PhysX { m_physicsSystemConfigChanged.Disconnect(); + s_overlapBuffer.swap({}); + s_rayCastBuffer.swap({}); + s_sweepBuffer.swap({}); + for (auto& simulatedBody : m_simulatedBodies) { if (simulatedBody.second != nullptr) diff --git a/Gems/PhysX/Code/Tests/PhysXScriptTest.cpp b/Gems/PhysX/Code/Tests/PhysXScriptTest.cpp index 40213dedcf..d2d5b664d2 100644 --- a/Gems/PhysX/Code/Tests/PhysXScriptTest.cpp +++ b/Gems/PhysX/Code/Tests/PhysXScriptTest.cpp @@ -87,7 +87,7 @@ namespace PhysX AZStd::unique_ptr m_scriptContext; }; - TEST_F(PhysXScriptTest, ScriptedRaycast_RaycastNotIntersectingBox_ReturnsNoHits) + TEST_F(PhysXScriptTest, SimulatedBodyRaycast_RaycastNotIntersectingBox_ReturnsNoHits) { s_testEntities.insert( { @@ -109,7 +109,7 @@ namespace PhysX EXPECT_TRUE(GetScriptContext()->Execute(luaCode)); } - TEST_F(PhysXScriptTest, ScriptedRaycast_RaycastIntersectingBox_ReturnsHitOnBox) + TEST_F(PhysXScriptTest, SimulatedBodyRaycast_RaycastIntersectingBox_ReturnsHitOnBox) { s_testEntities.insert( { @@ -131,7 +131,7 @@ namespace PhysX EXPECT_TRUE(GetScriptContext()->Execute(luaCode)); } - TEST_F(PhysXScriptTest, ScriptedRaycast_RaycastNotInteractingCollisionFilters_ReturnsNoHit) + TEST_F(PhysXScriptTest, SimulatedBodyRaycast_RaycastNonInteractingCollisionFilters_ReturnsNoHits) { s_testEntities.insert( { @@ -153,4 +153,385 @@ namespace PhysX EXPECT_TRUE(GetScriptContext()->Execute(luaCode)); } + + TEST_F(PhysXScriptTest, SceneRayCast_RaycastNotIntersectingBox_ReturnsNoHits) + { + s_testEntities.insert( + { + "Box", + TestUtils::AddStaticUnitTestObject(GetDefaultSceneHandle(), AZ::Vector3::CreateZero(), "Box") + }); + + const char luaCode[] = + R"( + physicsSystem = GetPhysicsSystem() + sceneHandle = physicsSystem:GetSceneHandle(DefaultPhysicsSceneName) + scene = physicsSystem:GetScene(sceneHandle) + request = RayCastRequest() + request.Start = Vector3(5.0, 0.0, 5.0) + request.Direction = Vector3(0.0, 0.0, -1.0) + request.Distance = 10.0 + hits = scene:QueryScene(request) + ExpectTrue(hits.HitArray:Size() == 0) + )"; + + EXPECT_TRUE(GetScriptContext()->Execute(luaCode)); + } + + TEST_F(PhysXScriptTest, SceneRayCast_RaycastIntersectingBox_ReturnsHitOnBox) + { + s_testEntities.insert( + { + "Box", + TestUtils::AddStaticUnitTestObject(GetDefaultSceneHandle(), AZ::Vector3::CreateZero(), "Box") + }); + + const char luaCode[] = + R"( + boxId = GetTestEntityId("Box") + physicsSystem = GetPhysicsSystem() + sceneHandle = physicsSystem:GetSceneHandle(DefaultPhysicsSceneName) + scene = physicsSystem:GetScene(sceneHandle) + request = RayCastRequest() + request.Start = Vector3(0.0, 0.0, 5.0) + request.Direction = Vector3(0.0, 0.0, -1.0) + request.Distance = 10.0 + hits = scene:QueryScene(request) + ExpectTrue(hits.HitArray:Size() == 1) + hit = hits.HitArray[1] -- lua uses 1-indexing + ExpectTrue(hit.EntityId == boxId) + )"; + + EXPECT_TRUE(GetScriptContext()->Execute(luaCode)); + } + + TEST_F(PhysXScriptTest, SceneRayCast_MultipleHitRaycastIntersectingBoxes_ReturnsMultipleHits) + { + s_testEntities.insert( + { + "Box1", + TestUtils::AddStaticUnitTestObject(GetDefaultSceneHandle(), AZ::Vector3::CreateZero(), "Box1") + }); + s_testEntities.insert( + { + "Box2", + TestUtils::AddStaticUnitTestObject(GetDefaultSceneHandle(), AZ::Vector3::CreateAxisZ(-5.0f), "Box2") + }); + + const char luaCode[] = + R"( + box1Id = GetTestEntityId("Box1") + box2Id = GetTestEntityId("Box2") + physicsSystem = GetPhysicsSystem() + sceneHandle = physicsSystem:GetSceneHandle(DefaultPhysicsSceneName) + scene = physicsSystem:GetScene(sceneHandle) + request = RayCastRequest() + request.Start = Vector3(0.0, 0.0, 5.0) + request.Direction = Vector3(0.0, 0.0, -1.0) + request.Distance = 10.0 + request.ReportMultipleHits = true + hits = scene:QueryScene(request) + numHits = hits.HitArray:Size() + box1Hit = false + box2Hit = false + for hitIndex = 1, numHits do + box1Hit = box1Hit or hits.HitArray[hitIndex].EntityId == box1Id + box2Hit = box2Hit or hits.HitArray[hitIndex].EntityId == box2Id + end + ExpectTrue(box1Hit) + ExpectTrue(box2Hit) + )"; + + EXPECT_TRUE(GetScriptContext()->Execute(luaCode)); + } + + TEST_F(PhysXScriptTest, SceneRaycast_RaycastNonInteractingCollisionFilters_ReturnsNoHits) + { + s_testEntities.insert( + { + "Box", + TestUtils::AddStaticUnitTestObject(GetDefaultSceneHandle(), AZ::Vector3::CreateZero(), "Box") + }); + + const char luaCode[] = + R"( + physicsSystem = GetPhysicsSystem() + sceneHandle = physicsSystem:GetSceneHandle(DefaultPhysicsSceneName) + scene = physicsSystem:GetScene(sceneHandle) + request = RayCastRequest() + request.Start = Vector3(0.0, 0.0, 5.0) + request.Direction = Vector3(0.0, 0.0, -1.0) + request.Distance = 10.0 + request.Collision = CollisionGroup("None") + hits = scene:QueryScene(request) + ExpectTrue(hits.HitArray:Size() == 0) + )"; + + EXPECT_TRUE(GetScriptContext()->Execute(luaCode)); + } + + TEST_F(PhysXScriptTest, BoxCast_NotIntersectingBox_ReturnsNoHits) + { + s_testEntities.insert( + { + "Box", + TestUtils::AddStaticUnitTestObject(GetDefaultSceneHandle(), AZ::Vector3::CreateZero(), "Box") + }); + + const char luaCode[] = + R"( + physicsSystem = GetPhysicsSystem() + sceneHandle = physicsSystem:GetSceneHandle(DefaultPhysicsSceneName) + scene = physicsSystem:GetScene(sceneHandle) + + boxDimensions = Vector3(1.0, 1.0, 1.0) + startPose = Transform.CreateTranslation(Vector3(0.0, 0.0, 5.0)) + direction = Vector3(-1.0, 0.0, 0.0) + distance = 10.0 + queryType = 0 + collisionGroup = CollisionGroup("All") + request = CreateBoxCastRequest(boxDimensions, startPose, direction, distance, queryType, collisionGroup) + + hits = scene:QueryScene(request) + ExpectTrue(hits.HitArray:Size() == 0) + )"; + + EXPECT_TRUE(GetScriptContext()->Execute(luaCode)); + } + + TEST_F(PhysXScriptTest, BoxCast_IntersectingBox_ReturnsHitOnBox) + { + s_testEntities.insert( + { + "Box", + TestUtils::AddStaticUnitTestObject(GetDefaultSceneHandle(), AZ::Vector3::CreateZero(), "Box") + }); + + const char luaCode[] = + R"( + boxId = GetTestEntityId("Box") + physicsSystem = GetPhysicsSystem() + sceneHandle = physicsSystem:GetSceneHandle(DefaultPhysicsSceneName) + scene = physicsSystem:GetScene(sceneHandle) + + boxDimensions = Vector3(1.0, 1.0, 1.0) + startPose = Transform.CreateTranslation(Vector3(0.0, 0.0, 5.0)) + direction = Vector3(0.0, 0.0, -1.0) + distance = 10.0 + queryType = 0 + collisionGroup = CollisionGroup("All") + request = CreateBoxCastRequest(boxDimensions, startPose, direction, distance, queryType, collisionGroup) + + hits = scene:QueryScene(request) + ExpectTrue(hits.HitArray:Size() == 1) + hit = hits.HitArray[1] -- lua uses 1-indexing + ExpectTrue(hit.EntityId == boxId) + )"; + + EXPECT_TRUE(GetScriptContext()->Execute(luaCode)); + } + + TEST_F(PhysXScriptTest, BoxCast_NonInteractingCollisionFilters_ReturnsNoHits) + { + s_testEntities.insert( + { + "Box", + TestUtils::AddStaticUnitTestObject(GetDefaultSceneHandle(), AZ::Vector3::CreateZero(), "Box") + }); + + const char luaCode[] = + R"( + physicsSystem = GetPhysicsSystem() + sceneHandle = physicsSystem:GetSceneHandle(DefaultPhysicsSceneName) + scene = physicsSystem:GetScene(sceneHandle) + + boxDimensions = Vector3(1.0, 1.0, 1.0) + startPose = Transform.CreateTranslation(Vector3(0.0, 0.0, 5.0)) + direction = Vector3(0.0, 0.0, -1.0) + distance = 10.0 + queryType = 0 + collisionGroup = CollisionGroup("None") + request = CreateBoxCastRequest(boxDimensions, startPose, direction, distance, queryType, collisionGroup) + + hits = scene:QueryScene(request) + ExpectTrue(hits.HitArray:Size() == 0) + )"; + + EXPECT_TRUE(GetScriptContext()->Execute(luaCode)); + } + + TEST_F(PhysXScriptTest, SphereCast_IntersectingBox_ReturnsHitOnBox) + { + s_testEntities.insert( + { + "Box", + TestUtils::AddStaticUnitTestObject(GetDefaultSceneHandle(), AZ::Vector3::CreateZero(), "Box") + }); + + const char luaCode[] = + R"( + boxId = GetTestEntityId("Box") + physicsSystem = GetPhysicsSystem() + sceneHandle = physicsSystem:GetSceneHandle(DefaultPhysicsSceneName) + scene = physicsSystem:GetScene(sceneHandle) + + radius = 2.0 + startPose = Transform.CreateTranslation(Vector3(0.0, 0.0, 5.0)) + direction = Vector3(0.0, 0.0, -1.0) + distance = 10.0 + queryType = 0 + collisionGroup = CollisionGroup("All") + request = CreateSphereCastRequest(radius, startPose, direction, distance, queryType, collisionGroup) + + hits = scene:QueryScene(request) + ExpectTrue(hits.HitArray:Size() == 1) + hit = hits.HitArray[1] -- lua uses 1-indexing + ExpectTrue(hit.EntityId == boxId) + )"; + + EXPECT_TRUE(GetScriptContext()->Execute(luaCode)); + } + + TEST_F(PhysXScriptTest, CapsuleCast_IntersectingBox_ReturnsHitOnBox) + { + s_testEntities.insert( + { + "Box", + TestUtils::AddStaticUnitTestObject(GetDefaultSceneHandle(), AZ::Vector3::CreateZero(), "Box") + }); + + const char luaCode[] = + R"( + boxId = GetTestEntityId("Box") + physicsSystem = GetPhysicsSystem() + sceneHandle = physicsSystem:GetSceneHandle(DefaultPhysicsSceneName) + scene = physicsSystem:GetScene(sceneHandle) + + radius = 0.5 + height = 2.0 + startPose = Transform.CreateTranslation(Vector3(0.0, 0.0, 5.0)) + direction = Vector3(0.0, 0.0, -1.0) + distance = 10.0 + queryType = 0 + collisionGroup = CollisionGroup("All") + request = CreateCapsuleCastRequest(radius, height, startPose, direction, distance, queryType, collisionGroup) + + hits = scene:QueryScene(request) + ExpectTrue(hits.HitArray:Size() == 1) + hit = hits.HitArray[1] -- lua uses 1-indexing + ExpectTrue(hit.EntityId == boxId) + )"; + + EXPECT_TRUE(GetScriptContext()->Execute(luaCode)); + } + + TEST_F(PhysXScriptTest, BoxOverlap_NotIntersectingBox_ReturnsNoHits) + { + s_testEntities.insert( + { + "Box", + TestUtils::AddStaticUnitTestObject(GetDefaultSceneHandle(), AZ::Vector3::CreateZero(), "Box") + }); + + const char luaCode[] = + R"( + physicsSystem = GetPhysicsSystem() + sceneHandle = physicsSystem:GetSceneHandle(DefaultPhysicsSceneName) + scene = physicsSystem:GetScene(sceneHandle) + + boxDimensions = Vector3(1.0, 1.0, 1.0) + pose = Transform.CreateTranslation(Vector3(0.0, 0.0, 5.0)) + request = CreateBoxOverlapRequest(boxDimensions, pose) + + hits = scene:QueryScene(request) + ExpectTrue(hits.HitArray:Size() == 0) + )"; + + EXPECT_TRUE(GetScriptContext()->Execute(luaCode)); + } + + TEST_F(PhysXScriptTest, BoxOverlap_IntersectingBox_ReturnsHitOnBox) + { + s_testEntities.insert( + { + "Box", + TestUtils::AddStaticUnitTestObject(GetDefaultSceneHandle(), AZ::Vector3::CreateZero(), "Box") + }); + + const char luaCode[] = + R"( + boxId = GetTestEntityId("Box") + physicsSystem = GetPhysicsSystem() + sceneHandle = physicsSystem:GetSceneHandle(DefaultPhysicsSceneName) + scene = physicsSystem:GetScene(sceneHandle) + + boxDimensions = Vector3(1.0, 1.0, 1.0) + pose = Transform.CreateTranslation(Vector3(0.0, 0.0, 0.0)) + request = CreateBoxOverlapRequest(boxDimensions, pose) + + hits = scene:QueryScene(request) + ExpectTrue(hits.HitArray:Size() == 1) + hit = hits.HitArray[1] -- lua uses 1-indexing + ExpectTrue(hit.EntityId == boxId) + )"; + + EXPECT_TRUE(GetScriptContext()->Execute(luaCode)); + } + + TEST_F(PhysXScriptTest, SphereOverlap_IntersectingBox_ReturnsHitOnBox) + { + s_testEntities.insert( + { + "Box", + TestUtils::AddStaticUnitTestObject(GetDefaultSceneHandle(), AZ::Vector3::CreateZero(), "Box") + }); + + const char luaCode[] = + R"( + boxId = GetTestEntityId("Box") + physicsSystem = GetPhysicsSystem() + sceneHandle = physicsSystem:GetSceneHandle(DefaultPhysicsSceneName) + scene = physicsSystem:GetScene(sceneHandle) + + radius = 0.5 + pose = Transform.CreateTranslation(Vector3(0.0, 0.0, 0.0)) + request = CreateSphereOverlapRequest(radius, pose) + + hits = scene:QueryScene(request) + ExpectTrue(hits.HitArray:Size() == 1) + hit = hits.HitArray[1] -- lua uses 1-indexing + ExpectTrue(hit.EntityId == boxId) + )"; + + EXPECT_TRUE(GetScriptContext()->Execute(luaCode)); + } + + TEST_F(PhysXScriptTest, CapsuleOverlap_IntersectingBox_ReturnsHitOnBox) + { + s_testEntities.insert( + { + "Box", + TestUtils::AddStaticUnitTestObject(GetDefaultSceneHandle(), AZ::Vector3::CreateZero(), "Box") + }); + + const char luaCode[] = + R"( + boxId = GetTestEntityId("Box") + physicsSystem = GetPhysicsSystem() + sceneHandle = physicsSystem:GetSceneHandle(DefaultPhysicsSceneName) + scene = physicsSystem:GetScene(sceneHandle) + + height = 2.0 + radius = 0.5 + pose = Transform.CreateTranslation(Vector3(0.0, 0.0, 0.0)) + request = CreateCapsuleOverlapRequest(height, radius, pose) + + hits = scene:QueryScene(request) + ExpectTrue(hits.HitArray:Size() == 1) + hit = hits.HitArray[1] -- lua uses 1-indexing + ExpectTrue(hit.EntityId == boxId) + )"; + + EXPECT_TRUE(GetScriptContext()->Execute(luaCode)); + } } // namespace PhysX diff --git a/Gems/ScriptCanvas/Code/Asset/EditorAssetConversionBus.h b/Gems/ScriptCanvas/Code/Asset/EditorAssetConversionBus.h index 8e53db20b0..26badc528d 100644 --- a/Gems/ScriptCanvas/Code/Asset/EditorAssetConversionBus.h +++ b/Gems/ScriptCanvas/Code/Asset/EditorAssetConversionBus.h @@ -19,7 +19,6 @@ namespace AZ namespace ScriptCanvas { - class ScriptCanvasFunctionAsset; class RuntimeAsset; class SubgraphInterfaceAsset; } @@ -27,7 +26,6 @@ namespace ScriptCanvas namespace ScriptCanvasEditor { class ScriptCanvasAsset; - class ScriptCanvasFunctionAsset; class EditorAssetConversionBusTraits : public AZ::EBusTraits @@ -36,10 +34,8 @@ namespace ScriptCanvasEditor static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single; virtual AZ::Data::Asset LoadAsset(AZStd::string_view graphPath) = 0; - virtual AZ::Data::Asset LoadFunctionAsset(AZStd::string_view graphPath) = 0; virtual AZ::Outcome CreateLuaAsset(const AZ::Data::Asset& editAsset, AZStd::string_view graphPathForRawLuaFile) = 0; virtual AZ::Outcome, AZStd::string> CreateRuntimeAsset(const AZ::Data::Asset& editAsset) = 0; - virtual AZ::Outcome, AZStd::string> CreateFunctionRuntimeAsset(const AZ::Data::Asset& editAsset) = 0; }; using EditorAssetConversionBus = AZ::EBus; diff --git a/Gems/ScriptCanvas/Code/Asset/EditorAssetSystemComponent.cpp b/Gems/ScriptCanvas/Code/Asset/EditorAssetSystemComponent.cpp index 4b6b7227a4..2bc3a91a96 100644 --- a/Gems/ScriptCanvas/Code/Asset/EditorAssetSystemComponent.cpp +++ b/Gems/ScriptCanvas/Code/Asset/EditorAssetSystemComponent.cpp @@ -28,9 +28,7 @@ AZ_PUSH_DISABLE_WARNING(4251 4800 4244, "-Wunknown-warning-option") #include AZ_POP_DISABLE_WARNING -#include -#include -#include +#include namespace ScriptCanvasEditor { @@ -60,16 +58,6 @@ namespace ScriptCanvasEditor required.push_back(AZ_CRC("ScriptCanvasService", 0x41fd58f3)); } - ScriptCanvas::Grammar::Context* EditorAssetSystemComponent::GetGrammarContext() - { - return &m_grammarContext; - } - - ScriptCanvas::Translation::Context* EditorAssetSystemComponent::GetTranslationContext() - { - return &m_translationContext; - } - void EditorAssetSystemComponent::Init() { } @@ -77,21 +65,14 @@ namespace ScriptCanvasEditor void EditorAssetSystemComponent::Activate() { m_editorAssetRegistry.Register(); - m_editorAssetRegistry.Register(); m_editorAssetRegistry.Register(); AzToolsFramework::AssetBrowser::AssetBrowserInteractionNotificationBus::Handler::BusConnect(); EditorAssetConversionBus::Handler::BusConnect(); - - ScriptCanvas::Translation::RequestBus::Handler::BusConnect(); - ScriptCanvas::Grammar::RequestBus::Handler::BusConnect(); } void EditorAssetSystemComponent::Deactivate() { - ScriptCanvas::Translation::RequestBus::Handler::BusDisconnect(); - ScriptCanvas::Grammar::RequestBus::Handler::BusDisconnect(); - EditorAssetConversionBus::Handler::BusDisconnect(); AzToolsFramework::AssetBrowser::AssetBrowserInteractionNotificationBus::Handler::BusDisconnect(); m_editorAssetRegistry.Unregister(); @@ -131,30 +112,11 @@ namespace ScriptCanvasEditor } } - AZ::Data::Asset EditorAssetSystemComponent::LoadFunctionAsset(AZStd::string_view graphPath) - { - auto outcome = ScriptCanvasBuilder::LoadEditorFunctionAsset(graphPath); - - if (outcome.IsSuccess()) - { - return outcome.GetValue(); - } - else - { - return {}; - } - } - AZ::Outcome, AZStd::string> EditorAssetSystemComponent::CreateRuntimeAsset(const AZ::Data::Asset& editAsset) { return ScriptCanvasBuilder::CreateRuntimeAsset(editAsset); } - AZ::Outcome, AZStd::string> EditorAssetSystemComponent::CreateFunctionRuntimeAsset(const AZ::Data::Asset& editAsset) - { - return ScriptCanvasBuilder::CreateRuntimeFunctionAsset(editAsset); - } - AZ::Outcome EditorAssetSystemComponent::CreateLuaAsset(const AZ::Data::Asset& editAsset, AZStd::string_view graphPathForRawLuaFile) { return ScriptCanvasBuilder::CreateLuaAsset(editAsset->GetScriptCanvasEntity(), editAsset->GetId(), graphPathForRawLuaFile); diff --git a/Gems/ScriptCanvas/Code/Asset/EditorAssetSystemComponent.h b/Gems/ScriptCanvas/Code/Asset/EditorAssetSystemComponent.h index 0a8bf830af..84b10ff17c 100644 --- a/Gems/ScriptCanvas/Code/Asset/EditorAssetSystemComponent.h +++ b/Gems/ScriptCanvas/Code/Asset/EditorAssetSystemComponent.h @@ -12,23 +12,15 @@ #include "EditorAssetConversionBus.h" #include #include - -#include -#include -#include -#include #include namespace ScriptCanvasEditor { class ScriptCanvasAsset; - class ScriptCanvasFunctionAsset; class EditorAssetSystemComponent : public AZ::Component , public EditorAssetConversionBus::Handler - , public ScriptCanvas::Grammar::RequestBus::Handler - , public ScriptCanvas::Translation::RequestBus::Handler , private AzToolsFramework::AssetBrowser::AssetBrowserInteractionNotificationBus::Handler { public: @@ -57,26 +49,14 @@ namespace ScriptCanvasEditor ////////////////////////////////////////////////////////////////////////// // EditorAssetConversionBus::Handler... AZ::Data::Asset LoadAsset(AZStd::string_view graphPath) override; - AZ::Data::Asset LoadFunctionAsset(AZStd::string_view graphPath) override; AZ::Outcome, AZStd::string> CreateRuntimeAsset(const AZ::Data::Asset& editAsset) override; - AZ::Outcome, AZStd::string> CreateFunctionRuntimeAsset(const AZ::Data::Asset& editAsset) override; AZ::Outcome CreateLuaAsset(const AZ::Data::Asset& editAsset, AZStd::string_view graphPathForRawLuaFile) override; ////////////////////////////////////////////////////////////////////////// - // ScriptCanvas::Grammar::RequestBus::Handler... - ScriptCanvas::Grammar::Context* GetGrammarContext() override; - - // ScriptCanvas::Translation::RequestBus::Handler... - ScriptCanvas::Translation::Context* GetTranslationContext() override; - - ScriptCanvas::AssetRegistry& GetAssetRegistry(); private: - ScriptCanvas::AssetRegistry m_editorAssetRegistry; - ScriptCanvas::Translation::Context m_translationContext; - ScriptCanvas::Grammar::Context m_grammarContext; - + ScriptCanvas::AssetRegistry m_editorAssetRegistry; EditorAssetSystemComponent(const EditorAssetSystemComponent&) = delete; }; } diff --git a/Gems/ScriptCanvas/Code/Asset/RuntimeAssetSystemComponent.cpp b/Gems/ScriptCanvas/Code/Asset/RuntimeAssetSystemComponent.cpp index e993b21b26..d8fe9e91ca 100644 --- a/Gems/ScriptCanvas/Code/Asset/RuntimeAssetSystemComponent.cpp +++ b/Gems/ScriptCanvas/Code/Asset/RuntimeAssetSystemComponent.cpp @@ -1,6 +1,6 @@ /* * 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 * */ @@ -11,7 +11,7 @@ #include #include #include -#include +#include namespace ScriptCanvas { diff --git a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderComponent.cpp b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderComponent.cpp index c3e5b03041..b37d5c1da4 100644 --- a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderComponent.cpp +++ b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderComponent.cpp @@ -5,19 +5,16 @@ * */ -#include - #include #include #include #include #include #include -#include -#include #include -#include +#include #include +#include #include namespace ScriptCanvasBuilder @@ -50,7 +47,6 @@ namespace ScriptCanvasBuilder SharedHandlers HandleAssetTypes() { SharedHandlers handlers; - handlers.m_editorFunctionAssetHandler = RegisterHandler("scriptcanvas_fn", false); handlers.m_editorAssetHandler = RegisterHandler("scriptcanvas", false); handlers.m_subgraphInterfaceHandler = RegisterHandler("scriptcanvas_fn_compiled", true); handlers.m_runtimeAssetHandler = RegisterHandler("scriptcanvas_compiled", true); @@ -105,61 +101,18 @@ namespace ScriptCanvasBuilder AzToolsFramework::ToolsAssetSystemBus::Broadcast(&AzToolsFramework::ToolsAssetSystemRequests::RegisterSourceAssetType, azrtti_typeid(), ScriptCanvasEditor::ScriptCanvasAsset::Description::GetFileFilter()); } - { - AssetBuilderSDK::AssetBuilderDesc builderDescriptor; - builderDescriptor.m_name = "Script Canvas Function Builder"; - builderDescriptor.m_patterns.push_back(AssetBuilderSDK::AssetBuilderPattern("*.scriptcanvas_fn", AssetBuilderSDK::AssetBuilderPattern::PatternType::Wildcard)); - builderDescriptor.m_busId = ScriptCanvasBuilder::FunctionWorker::GetUUID(); - builderDescriptor.m_createJobFunction = AZStd::bind(&FunctionWorker::CreateJobs, &m_scriptCanvasFunctionBuilder, AZStd::placeholders::_1, AZStd::placeholders::_2); - builderDescriptor.m_processJobFunction = AZStd::bind(&FunctionWorker::ProcessJob, &m_scriptCanvasFunctionBuilder, AZStd::placeholders::_1, AZStd::placeholders::_2); - // changing the version number invalidates all assets and will rebuild everything. - builderDescriptor.m_version = m_scriptCanvasFunctionBuilder.GetVersionNumber(); - // changing the analysis fingerprint just invalidates analysis (ie, not the assets themselves) - // which will cause the "CreateJobs" function to be called, for each asset, even if the - // source file has not changed, but won't actually do the jobs unless the source file has changed - // or the fingerprint of the individual job is different. - builderDescriptor.m_analysisFingerprint = m_scriptCanvasFunctionBuilder.GetFingerprintString(); - builderDescriptor.AddFlags(AssetBuilderSDK::AssetBuilderDesc::BF_DeleteLastKnownGoodProductOnFailure, s_scriptCanvasProcessJobKey); - builderDescriptor.m_productsToKeepOnFailure[s_scriptCanvasProcessJobKey] = { AZ_CRC("SubgraphInterface", 0xdfe6dc72) }; - AssetBuilderSDK::AssetBuilderBus::Broadcast(&AssetBuilderSDK::AssetBuilderBus::Handler::RegisterBuilderInformation, builderDescriptor); - ScriptCanvas::Grammar::RequestBus::Handler::BusConnect(); - AzToolsFramework::ToolsAssetSystemBus::Broadcast(&AzToolsFramework::ToolsAssetSystemRequests::RegisterSourceAssetType, azrtti_typeid(), ScriptCanvasEditor::ScriptCanvasFunctionAsset::Description::GetFileFilter()); - } - m_sharedHandlers = HandleAssetTypes(); AssetHandlers workerHandlers(m_sharedHandlers); m_scriptCanvasBuilder.Activate(workerHandlers); - m_scriptCanvasFunctionBuilder.Activate(workerHandlers); - - ScriptCanvas::Translation::RequestBus::Handler::BusConnect(); - ScriptCanvas::Grammar::RequestBus::Handler::BusConnect(); } void PluginComponent::Deactivate() { // Finish all queued work AZ::Data::AssetBus::ExecuteQueuedEvents(); - AzToolsFramework::ToolsAssetSystemBus::Broadcast(&AzToolsFramework::ToolsAssetSystemRequests::UnregisterSourceAssetType, azrtti_typeid()); - AzToolsFramework::ToolsAssetSystemBus::Broadcast(&AzToolsFramework::ToolsAssetSystemRequests::UnregisterSourceAssetType, azrtti_typeid()); - m_scriptCanvasBuilder.BusDisconnect(); - m_scriptCanvasFunctionBuilder.BusDisconnect(); - m_sharedHandlers.DeleteOwnedHandlers(); - - ScriptCanvas::Translation::RequestBus::Handler::BusDisconnect(); - ScriptCanvas::Grammar::RequestBus::Handler::BusDisconnect(); - } - - ScriptCanvas::Grammar::Context* PluginComponent::GetGrammarContext() - { - return &m_grammarContext; - } - - ScriptCanvas::Translation::Context* PluginComponent::GetTranslationContext() - { - return &m_translationContext; } void PluginComponent::Reflect(AZ::ReflectContext* context) diff --git a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderComponent.h b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderComponent.h index bd6a09433a..ff904d195a 100644 --- a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderComponent.h +++ b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderComponent.h @@ -12,18 +12,11 @@ #include #include "ScriptCanvasBuilderWorker.h" -#include -#include -#include -#include - namespace ScriptCanvasBuilder { //! ScriptCanvasBuilder is responsible for turning editor ScriptCanvas Assets into runtime script canvas assets class PluginComponent : public AZ::Component - , public ScriptCanvas::Grammar::RequestBus::Handler - , public ScriptCanvas::Translation::RequestBus::Handler { public: AZ_COMPONENT(PluginComponent, "{F8286B21-E751-4745-8BC4-512F190215FF}") @@ -42,20 +35,9 @@ namespace ScriptCanvasBuilder void Deactivate() override; ////////////////////////////////////////////////////////////////////////// - // ScriptCanvas::Grammar::RequestBus::Handler - ScriptCanvas::Grammar::Context* GetGrammarContext() override; - - // ScriptCanvas::Translation::RequestBus::Handler - ScriptCanvas::Translation::Context* GetTranslationContext() override; - private: PluginComponent(const PluginComponent&) = delete; - SharedHandlers m_sharedHandlers; - Worker m_scriptCanvasBuilder; - FunctionWorker m_scriptCanvasFunctionBuilder; - ScriptCanvas::Translation::Context m_translationContext; - ScriptCanvas::Grammar::Context m_grammarContext; }; } diff --git a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.cpp b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.cpp index 6b163a5027..b9d1dd5a7c 100644 --- a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.cpp +++ b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.cpp @@ -8,7 +8,6 @@ #include "precompiled.h" #include -#include #include #include #include @@ -18,9 +17,8 @@ #include #include -#include +#include #include -#include #include #include #include diff --git a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.h b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.h index fa6ed17a3c..ae87a0bd20 100644 --- a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.h +++ b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.h @@ -36,8 +36,8 @@ namespace ScriptCanvasEditor { class Graph; class ScriptCanvasAsset; - class ScriptCanvasFunctionAsset; } + namespace ScriptCanvasBuilder { constexpr const char* s_scriptCanvasBuilder = "ScriptCanvasBuilder"; @@ -122,8 +122,6 @@ namespace ScriptCanvasBuilder AZ::Outcome, AZStd::string> CreateRuntimeAsset(const AZ::Data::Asset& asset); - AZ::Outcome, AZStd::string> CreateRuntimeFunctionAsset(const AZ::Data::Asset& asset); - AZ::Outcome CompileGraphData(AZ::Entity* scriptCanvasEntity); AZ::Outcome CompileVariableData(AZ::Entity* scriptCanvasEntity); @@ -134,8 +132,6 @@ namespace ScriptCanvasBuilder AZ::Outcome, AZStd::string> LoadEditorAsset(AZStd::string_view graphPath, AZ::Data::AssetId assetId, AZ::Data::AssetFilterCB assetFilterCB = {}); - AZ::Outcome, AZStd::string> LoadEditorFunctionAsset(AZStd::string_view graphPath); - AZ::Outcome ParseGraph(AZ::Entity& buildEntity, AZStd::string_view graphPath); AZ::Outcome ProcessTranslationJob(ProcessTranslationJobInput& input); @@ -179,37 +175,4 @@ namespace ScriptCanvasBuilder // cached on first time query mutable AZStd::string m_fingerprintString; }; - - class FunctionWorker - : public AssetBuilderSDK::AssetBuilderCommandBus::Handler - { - public: - static AZ::Uuid GetUUID(); - - FunctionWorker() = default; - FunctionWorker(const FunctionWorker&) = delete; - - void Activate(const AssetHandlers& handlers); - - //! Asset Builder Callback Functions - void CreateJobs(const AssetBuilderSDK::CreateJobsRequest& request, AssetBuilderSDK::CreateJobsResponse& response) const; - - const char* GetFingerprintString() const; - - int GetVersionNumber() const; - - void ProcessJob(const AssetBuilderSDK::ProcessJobRequest& request, AssetBuilderSDK::ProcessJobResponse& response) const; - - void ShutDown() override {}; - - private: - AZ::Data::AssetHandler* m_editorAssetHandler = nullptr; - AZ::Data::AssetHandler* m_runtimeAssetHandler = nullptr; - AZ::Data::AssetHandler* m_subgraphInterfaceHandler = nullptr; - - mutable AZStd::vector> m_sourceDependencies; - - // cached on first time query - mutable AZStd::string m_fingerprintString; - }; } diff --git a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorkerUtility.cpp b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorkerUtility.cpp index 94f09b4b9a..7f6269a698 100644 --- a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorkerUtility.cpp +++ b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorkerUtility.cpp @@ -8,7 +8,6 @@ #include "precompiled.h" #include -#include #include #include #include @@ -18,10 +17,9 @@ #include #include #include -#include +#include #include #include -#include #include #include #include @@ -160,18 +158,6 @@ namespace ScriptCanvasBuilder return AZ::Success(runtimeAsset); } - AZ::Outcome, AZStd::string> CreateRuntimeFunctionAsset(const AZ::Data::Asset& editAsset) - { - // Flush asset manager events to ensure no asset references are held by closures queued on Ebuses. - AZ::Data::AssetManager::Instance().DispatchEvents(); - - auto runtimeAssetId = editAsset.GetId(); - runtimeAssetId.m_subId = AZ_CRC("SubgraphInterface", 0xdfe6dc72); - AZ::Data::Asset runtimeAsset; - runtimeAsset.Create(runtimeAssetId); - return AZ::Success(runtimeAsset); - } - AZ::Outcome CompileGraphData(AZ::Entity* scriptCanvasEntity) { typedef AZStd::pair< ScriptCanvas::Node*, AZ::Entity* > NodeEntityPair; @@ -452,48 +438,6 @@ namespace ScriptCanvasBuilder return AZ::Success(asset); } - AZ::Outcome, AZStd::string> LoadEditorFunctionAsset(AZStd::string_view filePath) - { - AZStd::shared_ptr assetDataStream = AZStd::make_shared(); - - // Read the asset into a memory buffer, then hand ownership of the buffer to assetDataStream - { - AZ::IO::FileIOStream stream(filePath.data(), AZ::IO::OpenMode::ModeRead); - if (!AZ::IO::RetryOpenStream(stream)) - { - return AZ::Failure(AZStd::string::format("File failed to open: %s", filePath.data())); - } - AZStd::vector fileBuffer(stream.GetLength()); - size_t bytesRead = stream.Read(fileBuffer.size(), fileBuffer.data()); - if (bytesRead != stream.GetLength()) - { - return AZ::Failure(AZStd::string::format("File failed to open: %s", filePath.data())); - } - - assetDataStream->Open(AZStd::move(fileBuffer)); - } - - AZ::IO::FileIOStream ioStream; - if (!ioStream.Open(filePath.data(), AZ::IO::OpenMode::ModeRead)) - { - return AZ::Failure(AZStd::string::format("File failed to open: %s", filePath.data())); - } - - ScriptCanvasEditor::ScriptCanvasFunctionAssetHandler editorAssetHandler; - - AZ::SerializeContext* context{}; - AZ::ComponentApplicationBus::BroadcastResult(context, &AZ::ComponentApplicationBus::Events::GetSerializeContext); - AZ::Data::Asset asset; - asset.Create(AZ::Data::AssetId(AZ::Uuid::CreateRandom())); - - if (editorAssetHandler.LoadAssetData(asset, assetDataStream, AZ::Data::AssetFilterCB{}) != AZ::Data::AssetHandler::LoadResult::LoadComplete) - { - return AZ::Failure(AZStd::string::format("Failed to load ScriptCavas Function asset: %s", filePath.data())); - } - - return AZ::Success(asset); - } - ScriptCanvasEditor::Graph* PrepareSourceGraph(AZ::Entity* const buildEntity) { auto sourceGraph = AZ::EntityUtils::FindFirstDerivedComponent(buildEntity); diff --git a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasFunctionBuilderWorker.cpp b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasFunctionBuilderWorker.cpp deleted file mode 100644 index 5ff5069141..0000000000 --- a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasFunctionBuilderWorker.cpp +++ /dev/null @@ -1,338 +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 "precompiled.h" - -#include "platform.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace ScriptCanvasBuilder -{ - void FunctionWorker::Activate(const AssetHandlers& handlers) - { - m_editorAssetHandler = handlers.m_editorFunctionAssetHandler; - m_runtimeAssetHandler = handlers.m_runtimeAssetHandler; - m_subgraphInterfaceHandler = handlers.m_subgraphInterfaceHandler; - } - - void FunctionWorker::CreateJobs(const AssetBuilderSDK::CreateJobsRequest& request, AssetBuilderSDK::CreateJobsResponse& response) const - { - AZ_TracePrintf(s_scriptCanvasBuilder, "Start Creating Job"); - AZStd::string fullPath; - AzFramework::StringFunc::Path::ConstructFull(request.m_watchFolder.data(), request.m_sourceFile.data(), fullPath, false); - AzFramework::StringFunc::Path::Normalize(fullPath); - - if (!m_editorAssetHandler) - { - AZ_Error(s_scriptCanvasBuilder, false, R"(CreateJobs for %s failed because the ScriptCanvas Editor Asset handler is missing.)", fullPath.data()); - } - - AZStd::shared_ptr assetDataStream = AZStd::make_shared(); - - // Read the asset into a memory buffer, then hand ownership of the buffer to assetDataStream - { - AZ::IO::FileIOStream stream(fullPath.c_str(), AZ::IO::OpenMode::ModeRead); - if (!AZ::IO::RetryOpenStream(stream)) - { - AZ_Warning(s_scriptCanvasBuilder, false, "CreateJobs for \"%s\" failed because the source file could not be opened.", fullPath.data()); - return; - } - AZStd::vector fileBuffer(stream.GetLength()); - size_t bytesRead = stream.Read(fileBuffer.size(), fileBuffer.data()); - if (bytesRead != stream.GetLength()) - { - AZ_Warning(s_scriptCanvasBuilder, false, "CreateJobs for \"%s\" failed because the source file could not be read.", fullPath.data()); - return; - } - - assetDataStream->Open(AZStd::move(fileBuffer)); - } - - m_sourceDependencies.clear(); - - auto assetFilter = [&response, this](const AZ::Data::AssetFilterInfo& filterInfo) - { - if (filterInfo.m_assetType == azrtti_typeid() || - filterInfo.m_assetType == azrtti_typeid() || - filterInfo.m_assetType == azrtti_typeid() || - filterInfo.m_assetType == azrtti_typeid()) // this required, since nodes reference this, rather than the editor asset - { - AssetBuilderSDK::SourceFileDependency dependency; - dependency.m_sourceFileDependencyUUID = filterInfo.m_assetId.m_guid; - - response.m_sourceFileDependencyList.push_back(dependency); - } - - // Asset filter always returns false to prevent parsing dependencies, but makes note of the script canvas dependencies - return false; - }; - - AZ::Data::Asset asset; - asset.Create(AZ::Data::AssetId(AZ::Uuid::CreateRandom())); - ScriptCanvasEditor::ScriptCanvasFunctionAssetHandler* functionAssetHandler = azrtti_cast(m_editorAssetHandler); - if (functionAssetHandler->LoadAssetData(asset, assetDataStream, assetFilter) != AZ::Data::AssetHandler::LoadResult::LoadComplete) - { - AZ_Warning(s_scriptCanvasBuilder, false, "CreateJobs for \"%s\" failed because the asset data could not be loaded from the file", fullPath.data()); - return; - } - - // Flush asset database events to ensure no asset references are held by closures queued on Ebuses. - AZ::Data::AssetManager::Instance().DispatchEvents(); - - auto* scriptCanvasEntity = asset.Get()->GetScriptCanvasEntity(); - auto* sourceGraph = AZ::EntityUtils::FindFirstDerivedComponent(scriptCanvasEntity); - AZ_Assert(sourceGraph, "Graph component is missing from entity."); - size_t fingerprint = 0; - const AZStd::set sortedEntities(sourceGraph->GetGraphData()->m_nodes.begin(), sourceGraph->GetGraphData()->m_nodes.end()); - for (auto& nodeEntity : sortedEntities) - { - if (auto nodeComponent = AZ::EntityUtils::FindFirstDerivedComponent(nodeEntity)) - { - AZStd::hash_combine(fingerprint, nodeComponent->GenerateFingerprint()); - } - } - -#if defined(FUNCTION_LEGACY_SUPPORT_ENABLED) - for (const AssetBuilderSDK::PlatformInfo& info : request.m_enabledPlatforms) - { - if (info.HasTag("tools")) - { - AssetBuilderSDK::JobDescriptor copyDescriptor; - copyDescriptor.m_priority = 2; - copyDescriptor.m_critical = true; - copyDescriptor.m_jobKey = s_scriptCanvasCopyJobKey; - copyDescriptor.SetPlatformIdentifier(info.m_identifier.c_str()); - copyDescriptor.m_additionalFingerprintInfo = AZStd::string(GetFingerprintString()).append("|").append(AZStd::to_string(static_cast(fingerprint))); - response.m_createJobOutputs.push_back(copyDescriptor); - } - - AssetBuilderSDK::JobDescriptor jobDescriptor; - jobDescriptor.m_priority = 2; - jobDescriptor.m_critical = true; - jobDescriptor.m_jobKey = s_scriptCanvasProcessJobKey; - jobDescriptor.SetPlatformIdentifier(info.m_identifier.c_str()); - jobDescriptor.m_additionalFingerprintInfo = AZStd::string(GetFingerprintString()).append("|").append(AZStd::to_string(static_cast(fingerprint))); - // Function process job needs to wait until its dependency asset job finished - for (const auto& sourceDependency : response.m_sourceFileDependencyList) - { - AssetBuilderSDK::JobDependency jobDep(s_scriptCanvasBuilder, info.m_identifier.c_str(), AssetBuilderSDK::JobDependencyType::OrderOnce, sourceDependency); - jobDescriptor.m_jobDependencyList.emplace_back(jobDep); - } - response.m_createJobOutputs.push_back(jobDescriptor); - } -#endif - - response.m_result = AssetBuilderSDK::CreateJobsResultCode::Success; - AZ_TracePrintf(s_scriptCanvasBuilder, "Finish Creating Job"); - } - - - - const char* FunctionWorker::GetFingerprintString() const - { - if (m_fingerprintString.empty()) - { - // compute it the first time - const AZStd::string runtimeAssetTypeId = azrtti_typeid().ToString(); - m_fingerprintString = AZStd::string::format("%i%s", GetVersionNumber(), runtimeAssetTypeId.c_str()); - } - return m_fingerprintString.c_str(); - } - - int FunctionWorker::GetVersionNumber() const - { - return GetBuilderVersion(); - } - - AZ::Uuid FunctionWorker::GetUUID() - { - return AZ::Uuid::CreateString("{7227E0E1-4113-456A-877B-B2276ACB292B}"); - } - - - void FunctionWorker::ProcessJob(const AssetBuilderSDK::ProcessJobRequest& request, AssetBuilderSDK::ProcessJobResponse& response) const - { - AZ_TracePrintf(s_scriptCanvasBuilder, "Start Processing Job"); - // A runtime script canvas component is generated, which creates a .scriptcanvas_compiled file - AZStd::string fullPath; - AZStd::string fileNameOnly; - AzFramework::StringFunc::Path::GetFullFileName(request.m_sourceFile.c_str(), fileNameOnly); - fullPath = request.m_fullPath.c_str(); - AzFramework::StringFunc::Path::Normalize(fullPath); - - bool pathFound = false; - AZStd::string relativePath; - AzToolsFramework::AssetSystemRequestBus::BroadcastResult - ( pathFound - , &AzToolsFramework::AssetSystem::AssetSystemRequest::GetRelativeProductPathFromFullSourceOrProductPath - , request.m_fullPath.c_str(), relativePath); - - if (!pathFound) - { - AZ_Error(s_scriptCanvasBuilder, false, "Failed to get engine relative path from %s", request.m_fullPath.c_str()); - return; - } - - if (!m_editorAssetHandler) - { - AZ_Error(s_scriptCanvasBuilder, false, R"(Exporting of .scriptcanvas for "%s" file failed as no editor asset handler was registered for script canvas. The ScriptCanvas Gem might not be enabled.)", fullPath.data()); - return; - } - - if (!m_runtimeAssetHandler) - { - AZ_Error(s_scriptCanvasBuilder, false, R"(Exporting of .scriptcanvas for "%s" file failed as no runtime asset handler was registered for script canvas.)", fullPath.data()); - return; - } - - AZStd::shared_ptr assetDataStream = AZStd::make_shared(); - - // Read the asset into a memory buffer, then hand ownership of the buffer to assetDataStream - { - AZ::IO::FileIOStream stream(fullPath.data(), AZ::IO::OpenMode::ModeRead); - if (!AZ::IO::RetryOpenStream(stream)) - { - AZ_Warning(s_scriptCanvasBuilder, false, "Exporting of .scriptcanvas for \"%s\" failed because the source file could not be opened.", fullPath.c_str()); - return; - } - AZStd::vector fileBuffer(stream.GetLength()); - size_t bytesRead = stream.Read(fileBuffer.size(), fileBuffer.data()); - if (bytesRead != stream.GetLength()) - { - AZ_Warning(s_scriptCanvasBuilder, false, "Exporting of .scriptcanvas for \"%s\" failed because the source file could not be opened.", fullPath.c_str()); - return; - } - - assetDataStream->Open(AZStd::move(fileBuffer)); - } - - AZ::SerializeContext* context{}; - AZ::ComponentApplicationBus::BroadcastResult(context, &AZ::ComponentApplicationBus::Events::GetSerializeContext); - - AZ::Data::Asset asset; - asset.Create(request.m_sourceFileUUID); - ScriptCanvasEditor::ScriptCanvasFunctionAssetHandler* functionAssetHandler = azrtti_cast(m_editorAssetHandler); - if (functionAssetHandler->LoadAssetData(asset, assetDataStream, nullptr) != AZ::Data::AssetHandler::LoadResult::LoadComplete) - { - AZ_Error(s_scriptCanvasBuilder, false, R"(Loading of ScriptCanvas asset for source file "%s" has failed)", fullPath.data()); - return; - } - - // Flush asset manager events to ensure no asset references are held by closures queued on Ebuses. - AZ::Data::AssetManager::Instance().DispatchEvents(); - - AZStd::string runtimeScriptCanvasOutputPath; - AzFramework::StringFunc::Path::Join(request.m_tempDirPath.c_str(), fileNameOnly.c_str(), runtimeScriptCanvasOutputPath, true, true); - AzFramework::StringFunc::Path::ReplaceExtension(runtimeScriptCanvasOutputPath, ScriptCanvas::SubgraphInterfaceAsset::GetFileExtension()); - - if (request.m_jobDescription.m_jobKey == s_scriptCanvasCopyJobKey) - { - // ScriptCanvas Editor Asset Copy job - // The SubID is zero as this represents the main asset - AssetBuilderSDK::JobProduct jobProduct; - jobProduct.m_productFileName = fullPath; - jobProduct.m_productAssetType = azrtti_typeid(); - jobProduct.m_productSubID = 0; - jobProduct.m_dependenciesHandled = true; - response.m_outputProducts.push_back(AZStd::move(jobProduct)); - response.m_resultCode = AssetBuilderSDK::ProcessJobResult_Success; - } - else - { - // force load all dependencies into memory - for (auto& dependency : m_sourceDependencies) - { - AZ::Data::AssetManager::Instance().GetAsset(dependency.GetId(), dependency.GetType(), AZ::Data::AssetLoadBehavior::PreLoad); - } - - AZ::Entity* buildEntity = asset.Get()->GetScriptCanvasEntity(); - - ProcessTranslationJobInput input; - input.assetID = AZ::Data::AssetId(request.m_sourceFileUUID, AZ_CRC("RuntimeData", 0x163310ae)); - input.request = &request; - input.response = &response; - input.runtimeScriptCanvasOutputPath = runtimeScriptCanvasOutputPath; - input.assetHandler = m_runtimeAssetHandler; - input.buildEntity = buildEntity; - input.fullPath = fullPath; - input.fileNameOnly = fileNameOnly; - input.namespacePath = relativePath; - input.saveRawLua = true; - - auto translationOutcome = ProcessTranslationJob(input); - if (translationOutcome.IsSuccess()) - { - AzFramework::StringFunc::Path::ReplaceExtension(input.runtimeScriptCanvasOutputPath, ScriptCanvas::RuntimeAsset::GetFileExtension()); - auto saveRuntimAssetOutcome = SaveRuntimeAsset(input, input.runtimeDataOut); - if (saveRuntimAssetOutcome.IsSuccess()) - { - // \todo this file is only required on PC editor builds, cull it in packaging, here or wherever appropriate - AzFramework::StringFunc::Path::StripExtension(fileNameOnly); - - ScriptCanvas::SubgraphInterfaceData functionInterface; - functionInterface.m_name = fileNameOnly; - functionInterface.m_interface = AZStd::move(input.interfaceOut); - - // save function interface - input.assetHandler = m_subgraphInterfaceHandler; - - AzFramework::StringFunc::Path::ReplaceExtension(input.runtimeScriptCanvasOutputPath, ScriptCanvas::SubgraphInterfaceAsset::GetFileExtension()); - auto saveInterfaceOutcome = SaveSubgraphInterface(input, functionInterface); - if (saveInterfaceOutcome.IsSuccess()) - { - response.m_resultCode = AssetBuilderSDK::ProcessJobResult_Success; - } - else - { - AZ_Error(s_scriptCanvasBuilder, false, saveInterfaceOutcome.GetError().data()); - } - } - else - { - AZ_Error(s_scriptCanvasBuilder, false, saveRuntimAssetOutcome.GetError().data()); - } - } - else if (AzFramework::StringFunc::Find(translationOutcome.GetError().data(), ScriptCanvas::ParseErrors::SourceUpdateRequired) != AZStd::string::npos) - { - AZ_Warning(s_scriptCanvasBuilder, false, ScriptCanvas::ParseErrors::SourceUpdateRequired); - response.m_resultCode = AssetBuilderSDK::ProcessJobResult_Success; - } - else if (AzFramework::StringFunc::Find(fileNameOnly, s_unitTestParseErrorPrefix) != AZStd::string::npos) - { - response.m_resultCode = AssetBuilderSDK::ProcessJobResult_Success; - } - else - { - AZ_Warning(s_scriptCanvasBuilder, false, translationOutcome.GetError().data()); - } - } - - AZ_TracePrintf(s_scriptCanvasBuilder, "Finish Processing Job"); - } -} diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/Functions/ScriptCanvasFunctionAssetHandler.cpp b/Gems/ScriptCanvas/Code/Editor/Assets/Functions/ScriptCanvasFunctionAssetHandler.cpp deleted file mode 100644 index 9f50f32cf5..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Assets/Functions/ScriptCanvasFunctionAssetHandler.cpp +++ /dev/null @@ -1,157 +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 "precompiled.h" - -#include - -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -namespace ScriptCanvasEditor -{ - ScriptCanvasFunctionAssetHandler::ScriptCanvasFunctionAssetHandler(AZ::SerializeContext* context) - : ScriptCanvasAssetHandler(context) - { - AZ::AssetTypeInfoBus::MultiHandler::BusConnect(azrtti_typeid()); - } - - ScriptCanvasFunctionAssetHandler::~ScriptCanvasFunctionAssetHandler() - { - AZ::AssetTypeInfoBus::MultiHandler::BusDisconnect(); - } - - AZ::Data::AssetPtr ScriptCanvasFunctionAssetHandler::CreateAsset(const AZ::Data::AssetId& id, const AZ::Data::AssetType& type) - { - AZ_UNUSED(type); - - ScriptCanvasEditor::ScriptCanvasFunctionAsset* assetData = aznew ScriptCanvasEditor::ScriptCanvasFunctionAsset(id); - - AZ::Entity* scriptCanvasEntity = aznew AZ::Entity(ScriptCanvas::AssetDescription::GetEntityName()); - SystemRequestBus::Broadcast(&SystemRequests::CreateEditorComponentsOnEntity, scriptCanvasEntity, azrtti_typeid()); - assetData->m_cachedComponent = scriptCanvasEntity->CreateComponent(); - - assetData->SetScriptCanvasEntity(scriptCanvasEntity); - - return assetData; - } - - AZ::Data::AssetHandler::LoadResult ScriptCanvasFunctionAssetHandler::LoadAssetData( - const AZ::Data::Asset& asset, - AZStd::shared_ptr stream, - const AZ::Data::AssetFilterCB& assetLoadFilterCB) - { - ScriptCanvasEditor::ScriptCanvasFunctionAsset* scriptCanvasAsset = asset.GetAs(); - AZ_Assert(m_serializeContext, "ScriptCanvasFunctionAssetHandler needs to be initialized with a SerializeContext"); - - if (scriptCanvasAsset) - { - stream->Seek(0U, AZ::IO::GenericStream::ST_SEEK_BEGIN); - - bool loadSuccess = AZ::Utils::LoadObjectFromStreamInPlace(*stream, scriptCanvasAsset->GetScriptCanvasData(), m_serializeContext, AZ::ObjectStream::FilterDescriptor(assetLoadFilterCB, AZ::ObjectStream::FILTERFLAG_IGNORE_UNKNOWN_CLASSES)); - if (loadSuccess) - { - scriptCanvasAsset->m_cachedComponent = scriptCanvasAsset->GetScriptCanvasData().GetScriptCanvasEntity()->FindComponent(); - } - - return loadSuccess ? AZ::Data::AssetHandler::LoadResult::LoadComplete : AZ::Data::AssetHandler::LoadResult::Error; - } - return AZ::Data::AssetHandler::LoadResult::Error; - } - - bool ScriptCanvasFunctionAssetHandler::SaveAssetData(const AZ::Data::Asset& asset, AZ::IO::GenericStream* stream) - { - return SaveAssetData(asset.GetAs(), stream); - } - - bool ScriptCanvasFunctionAssetHandler::SaveAssetData(const ScriptCanvasEditor::ScriptCanvasFunctionAsset* assetData, AZ::IO::GenericStream* stream) - { - return SaveAssetData(assetData, stream, AZ::DataStream::ST_XML); - } - - bool ScriptCanvasFunctionAssetHandler::SaveAssetData(const ScriptCanvasEditor::ScriptCanvasFunctionAsset* assetData, AZ::IO::GenericStream* stream, AZ::DataStream::StreamType streamType) - { - if (assetData && m_serializeContext) - { - AZStd::vector byteBuffer; - AZ::IO::ByteContainerStream byteStream(&byteBuffer); - AZ::ObjectStream* objStream = AZ::ObjectStream::Create(&byteStream, *m_serializeContext, streamType); - - const ScriptCanvas::ScriptCanvasData& functionData = assetData->GetScriptCanvasData(); - bool assetSaved = objStream->WriteClass(&functionData); - objStream->Finalize(); - assetSaved = stream->Write(byteBuffer.size(), byteBuffer.data()) == byteBuffer.size() && assetSaved; - return assetSaved; - } - - return false; - } - - AZ::Data::AssetType ScriptCanvasFunctionAssetHandler::GetAssetType() const - { - return ScriptCanvasFunctionAssetHandler::GetAssetTypeStatic(); - } - - const char* ScriptCanvasFunctionAssetHandler::GetAssetTypeDisplayName() const - { - return ScriptCanvas::AssetDescription::GetAssetTypeDisplayName(); - } - - bool ScriptCanvasFunctionAssetHandler::CanCreateComponent([[maybe_unused]] const AZ::Data::AssetId& assetId) const - { - return false; - } - - void ScriptCanvasFunctionAssetHandler::GetAssetTypeExtensions(AZStd::vector& extensions) - { - const AZ::Uuid& assetType = *AZ::AssetTypeInfoBus::GetCurrentBusId(); - if (assetType == AZ::AzTypeInfo::Uuid()) - { - extensions.push_back(ScriptCanvas::AssetDescription::GetExtension()); - } - } - - void ScriptCanvasFunctionAssetHandler::GetHandledAssetTypes(AZStd::vector& assetTypes) - { - assetTypes.push_back(AZ::AzTypeInfo::Uuid()); - } - - - AZ::Data::AssetType ScriptCanvasFunctionAssetHandler::GetAssetTypeStatic() - { - return azrtti_typeid(); - } - - const char* ScriptCanvasFunctionAssetHandler::GetGroup() const - { - return ScriptCanvas::AssetDescription::GetGroup(); - } - - const char* ScriptCanvasFunctionAssetHandler::GetBrowserIcon() const - { - return ScriptCanvas::AssetDescription::GetIconPath(); - } - -} diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/Functions/ScriptCanvasFunctionAssetHolder.cpp b/Gems/ScriptCanvas/Code/Editor/Assets/Functions/ScriptCanvasFunctionAssetHolder.cpp deleted file mode 100644 index a3559f0123..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Assets/Functions/ScriptCanvasFunctionAssetHolder.cpp +++ /dev/null @@ -1,201 +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 "precompiled.h" - -#include - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -namespace ScriptCanvasEditor -{ - //========================================================================= - void ScriptCanvasFunctionAssetHolder::Reflect(AZ::ReflectContext* context) - { - if (auto serializeContext = azrtti_cast(context)) - { - serializeContext->Class() - ->Version(1) - ->Field("m_asset", &ScriptCanvasFunctionAssetHolder::m_scriptCanvasAssetId) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("Script Canvas", "Script Canvas Function Asset Holder") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->DataElement(AZ::Edit::UIHandlers::Default, &ScriptCanvasFunctionAssetHolder::m_scriptCanvasAssetId, "Script Canvas Function Asset", "Script Canvas asset associated with this component") - ->Attribute(AZ::Edit::Attributes::ChangeNotify, &ScriptCanvasFunctionAssetHolder::OnScriptChanged) - ->Attribute("EditButton", "Editor/Icons/PropertyEditor/open_in.png") - ->Attribute("EditDescription", "Open in Script Canvas Editor") - ->Attribute("EditCallback", &ScriptCanvasFunctionAssetHolder::LaunchScriptCanvasEditor) - ; - } - } - } - - ScriptCanvasFunctionAssetHolder::ScriptCanvasFunctionAssetHolder(AZ::Data::AssetId assetId, const ScriptChangedCB& scriptChangedCB) - : m_scriptCanvasAssetId(assetId) - , m_scriptNotifyCallback(scriptChangedCB) - { - } - - ScriptCanvasFunctionAssetHolder::~ScriptCanvasFunctionAssetHolder() - { - AZ::Data::AssetBus::Handler::BusDisconnect(); - } - - void ScriptCanvasFunctionAssetHolder::Init(AZ::EntityId ownerId) - { - m_ownerId = ownerId; - - if (m_scriptCanvasAssetId.IsValid()) - { - AZ::Data::AssetBus::Handler::BusDisconnect(); - AZ::Data::AssetBus::Handler::BusConnect(m_scriptCanvasAssetId); - } - } - - void ScriptCanvasFunctionAssetHolder::LaunchScriptCanvasEditor(const AZ::Data::AssetId&, const AZ::Data::AssetType&) const - { - OpenEditor(); - } - - void ScriptCanvasFunctionAssetHolder::OpenEditor() const - { - AzToolsFramework::OpenViewPane(LyViewPane::ScriptCanvas); - - AZ::Outcome openOutcome = AZ::Failure(AZStd::string()); - - if (m_scriptCanvasAssetId.IsValid()) - { - GeneralRequestBus::BroadcastResult(openOutcome, &GeneralRequests::OpenScriptCanvasAsset, m_scriptCanvasAssetId, -1); - - if (!openOutcome) - { - AZ_Warning("Script Canvas", openOutcome, "%s", openOutcome.GetError().data()); - } - } - else if (m_ownerId.IsValid()) - { - AzToolsFramework::EntityIdList selectedEntityIds; - AzToolsFramework::ToolsApplicationRequestBus::BroadcastResult(selectedEntityIds, &AzToolsFramework::ToolsApplicationRequests::GetSelectedEntities); - - // Going to bypass the multiple selected entities flow for right now. - if (selectedEntityIds.size() == 1) - { - GeneralRequestBus::Broadcast(&GeneralRequests::CreateScriptCanvasAssetFor, m_ownerId); - } - } - } - - AZ::EntityId ScriptCanvasFunctionAssetHolder::GetGraphId() const - { - AZ::EntityId graphId; - if (m_scriptCanvasAsset.IsReady()) - { - ScriptCanvas::SystemRequestBus::BroadcastResult(graphId, &ScriptCanvas::SystemRequests::FindGraphId, m_scriptCanvasAsset.Get()->GetScriptCanvasEntity()); - } - return graphId; - } - - void ScriptCanvasFunctionAssetHolder::SetScriptChangedCB(const ScriptChangedCB& scriptChangedCB) - { - m_scriptNotifyCallback = scriptChangedCB; - } - - void ScriptCanvasFunctionAssetHolder::Load(bool loadBlocking) - { - if (!m_scriptCanvasAsset.IsReady()) - { - AZ::Data::AssetInfo assetInfo; - AZ::Data::AssetCatalogRequestBus::BroadcastResult(assetInfo, &AZ::Data::AssetCatalogRequests::GetAssetInfoById, m_scriptCanvasAsset.GetId()); - if (assetInfo.m_assetId.IsValid()) - { - const AZ::Data::AssetType assetTypeId = azrtti_typeid(); - auto& assetManager = AZ::Data::AssetManager::Instance(); - m_scriptCanvasAsset = assetManager.GetAsset(m_scriptCanvasAsset.GetId(), azrtti_typeid(), true, nullptr, loadBlocking); - } - } - } - - AZ::u32 ScriptCanvasFunctionAssetHolder::OnScriptChanged() - { - SetAsset(m_scriptCanvasAsset.GetId()); - Load(false); - - if (m_scriptNotifyCallback) - { - m_scriptNotifyCallback(m_scriptCanvasAsset); - } - return AZ::Edit::PropertyRefreshLevels::EntireTree; - } - - void ScriptCanvasFunctionAssetHolder::OnAssetReady(AZ::Data::Asset asset) - { - SetAsset(asset.GetId()); - EditorScriptCanvasAssetNotificationBus::Event(m_scriptCanvasAsset.GetId(), &EditorScriptCanvasAssetNotifications::OnScriptCanvasAssetReady, m_scriptCanvasAsset); - } - - void ScriptCanvasFunctionAssetHolder::OnAssetReloaded(AZ::Data::Asset asset) - { - SetAsset(asset.GetId()); - EditorScriptCanvasAssetNotificationBus::Event(m_scriptCanvasAsset.GetId(), &EditorScriptCanvasAssetNotifications::OnScriptCanvasAssetReloaded, m_scriptCanvasAsset); - } - - void ScriptCanvasFunctionAssetHolder::OnAssetUnloaded(const AZ::Data::AssetId assetId, const AZ::Data::AssetType) - { - EditorScriptCanvasAssetNotificationBus::Event(assetId, &EditorScriptCanvasAssetNotifications::OnScriptCanvasAssetUnloaded, assetId); - } - - void ScriptCanvasFunctionAssetHolder::OnAssetSaved(AZ::Data::Asset asset, bool isSuccessful) - { - SetAsset(asset.GetId()); - auto currentBusId = AZ::Data::AssetBus::GetCurrentBusId(); - if (currentBusId) - { - EditorScriptCanvasAssetNotificationBus::Event(*currentBusId, &EditorScriptCanvasAssetNotifications::OnScriptCanvasAssetSaved, asset.GetId()); - } - } - - void ScriptCanvasFunctionAssetHolder::SetAsset(AZ::Data::AssetId assetId) - { - m_scriptCanvasAssetId = assetId; - - if (!AZ::Data::AssetBus::Handler::BusIsConnectedId(m_scriptCanvasAssetId)) - { - AZ::Data::AssetBus::Handler::BusDisconnect(); - if (m_scriptCanvasAssetId.IsValid()) - { - AZ::Data::AssetBus::Handler::BusConnect(m_scriptCanvasAssetId); - } - } - } - - //AZ::Data::Asset ScriptCanvasFunctionAssetHolder::GetAsset() const - //{ - // return m_scriptCanvasAsset; - //} - - AZ::Data::AssetId ScriptCanvasFunctionAssetHolder::GetAssetId() const - { - return m_scriptCanvasAssetId; - } -} diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/Functions/ScriptCanvasFunctionAssetHolder.h b/Gems/ScriptCanvas/Code/Editor/Assets/Functions/ScriptCanvasFunctionAssetHolder.h deleted file mode 100644 index 1cde981e0d..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Assets/Functions/ScriptCanvasFunctionAssetHolder.h +++ /dev/null @@ -1,75 +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 ScriptCanvas -{ - class ScriptCanvasFunctionAsset; -} - -namespace ScriptCanvasEditor -{ - class ScriptCanvasFunctionAsset; - - /*! ScriptCanvasAssetHolder - Wraps a ScriptCanvasAsset reference and registers for the individual AssetBus events - for saving, loading and unloading the asset. - The ScriptCanvasAsset Holder contains functionality for activating the ScriptCanvasEntity stored on the reference asset - as well as attempting to open the ScriptCanvasAsset within the ScriptCanvas Editor. - It also provides the EditContext reflection for opening the asset in the ScriptCanvas Editor via a button - */ - class ScriptCanvasFunctionAssetHolder - : private AZ::Data::AssetBus::Handler - { - public: - AZ_RTTI(ScriptCanvasFunctionAssetHolder, "{21693AFA-5664-4AAE-9213-8B944A398BA1}"); - AZ_CLASS_ALLOCATOR(ScriptCanvasFunctionAssetHolder, AZ::SystemAllocator, 0); - - using ScriptChangedCB = AZStd::function&)>; - - ScriptCanvasFunctionAssetHolder() = default; - ScriptCanvasFunctionAssetHolder(AZ::Data::AssetId assetId, const ScriptChangedCB& = {}); - ~ScriptCanvasFunctionAssetHolder() override; - - static void Reflect(AZ::ReflectContext* context); - void Init(AZ::EntityId ownerId = AZ::EntityId()); - - void SetAsset(AZ::Data::AssetId assetId); - AZ::Data::AssetId GetAssetId() const; - - AZ::EntityId GetGraphId() const; - - void LaunchScriptCanvasEditor(const AZ::Data::AssetId&, const AZ::Data::AssetType&) const; - void OpenEditor() const; - - void SetScriptChangedCB(const ScriptChangedCB&); - void Load(bool loadBlocking = false); - - protected: - - //===================================================================== - // AZ::Data::AssetBus - void OnAssetReady(AZ::Data::Asset asset) override; - void OnAssetReloaded(AZ::Data::Asset asset) override; - void OnAssetUnloaded(const AZ::Data::AssetId assetId, const AZ::Data::AssetType assetType) override; - void OnAssetSaved(AZ::Data::Asset asset, bool isSuccessful) override; - //===================================================================== - - //! Reloads the Script From the AssetData if it has changed - AZ::u32 OnScriptChanged(); - AZ::Data::AssetId m_scriptCanvasAssetId; - AZ::Data::Asset m_scriptCanvasAsset; - - AZ::EntityId m_ownerId; // Id of Entity which stores this AssetHolder object - ScriptChangedCB m_scriptNotifyCallback; - }; - -} diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHelpers.cpp b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHelpers.cpp index 247a38f58a..6eae2ff603 100644 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHelpers.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHelpers.cpp @@ -8,7 +8,6 @@ #include #include -#include #include namespace ScriptCanvasEditor @@ -149,37 +148,13 @@ namespace ScriptCanvasEditor } - bool IsValidSourceFile(const AZStd::string& filePath, ScriptCanvas::ScriptCanvasId scriptCanvasId) + bool IsValidSourceFile(const AZStd::string& filePath, [[maybe_unused]] ScriptCanvas::ScriptCanvasId scriptCanvasId) { - bool isValidSourceFile = true; - - if (scriptCanvasId.IsValid()) + ScriptCanvasAssetDescription assetDescription; + return AZ::StringFunc::EndsWith(filePath, assetDescription.GetExtensionImpl(), false); { - bool isRuntimeGraph = false; - EditorGraphRequestBus::EventResult(isRuntimeGraph, scriptCanvasId, &EditorGraphRequests::IsRuntimeGraph); - - if (isRuntimeGraph) - { - ScriptCanvasAssetDescription assetDescription; - - if (!AZ::StringFunc::EndsWith(filePath, assetDescription.GetExtensionImpl(), false)) - { - isValidSourceFile = false; - } - } - // Assume it's a function for now - else - { - ScriptCanvasEditor::ScriptCanvasFunctionDescription assetDescription; - - if (!AZ::StringFunc::EndsWith(filePath, assetDescription.GetExtensionImpl(), false)) - { - isValidSourceFile = false; - } - } + return true; } - - return isValidSourceFile; } } } diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetInstance.cpp b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetInstance.cpp deleted file mode 100644 index 30f2ecdb64..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetInstance.cpp +++ /dev/null @@ -1,154 +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 "precompiled.h" - -#include -#include -#include - -namespace ScriptCanvasEditor -{ - ScriptCanvasAssetInstance::~ScriptCanvasAssetInstance() - { - } - - void ScriptCanvasAssetInstance::Reflect(AZ::ReflectContext* context) - { - if (auto serializeContext = azrtti_cast(context)) - { - serializeContext->Class() - // TODO: This results in more data being saved per instance, but is needed to make Id remapping transparent. - // Allow a way to enumerate the elements for Id Remapping, while disallowing serialization - ->Field("m_data", &ScriptCanvasAssetInstance::m_scriptCanvasData) - ->Field("m_assetRef", &ScriptCanvasAssetInstance::m_assetRef) - ->Field("m_entityInstanceMap", &ScriptCanvasAssetInstance::m_baseToInstanceMap) - ->Field("m_dataFlags", &ScriptCanvasAssetInstance::m_entityToDataFlags) - ->Field("m_dataPatch", &ScriptCanvasAssetInstance::m_dataPatch) - ; - } - } - - ScriptCanvasAssetReference& ScriptCanvasAssetInstance::GetReference() - { - return m_assetRef; - } - - const ScriptCanvasAssetReference& ScriptCanvasAssetInstance::GetReference() const - { - return m_assetRef; - } - - ScriptCanvas::ScriptCanvasData& ScriptCanvasAssetInstance::GetScriptCanvasData() - { - return m_scriptCanvasData; - } - - const ScriptCanvas::ScriptCanvasData& ScriptCanvasAssetInstance::GetScriptCanvasData() const - { - return m_scriptCanvasData; - } - - void ScriptCanvasAssetInstance::ComputeDataPatch() - { - if (!m_assetRef.GetAsset().IsReady()) - { - return; - } - - ScriptCanvas::ScriptCanvasData& baseData = m_assetRef.GetAsset().Get()->GetScriptCanvasData(); - - AZ::SerializeContext* serializeContext{}; - AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); - - decltype(m_baseToInstanceMap) entityIdReverseLookUp; - for (const auto& baseToInstancePair : m_baseToInstanceMap) - { - entityIdReverseLookUp.emplace(baseToInstancePair.second, baseToInstancePair.first); - } - - // remap entity ids to the "original" - AZ::IdUtils::Remapper::ReplaceIdsAndIdRefs(&m_scriptCanvasData, [&entityIdReverseLookUp](AZ::EntityId sourceId, [[maybe_unused]] bool isEntityId, const AZ::IdUtils::Remapper::IdGenerator&) -> AZ::EntityId - { - auto findIt = entityIdReverseLookUp.find(sourceId); - return findIt != entityIdReverseLookUp.end() ? findIt->second : sourceId; - }, serializeContext); - - // compute the delta (what we changed from the base slice) - m_dataPatch.Create(&baseData, &m_scriptCanvasData, AZ::DataPatch::FlagsMap(), GetDataFlagsForPatching(), serializeContext); - - // remap entity ids back to the "instance onces" - AZ::IdUtils::Remapper::ReplaceIdsAndIdRefs(&m_scriptCanvasData, [this](AZ::EntityId sourceId, [[maybe_unused]] bool isEntityId, const AZ::IdUtils::Remapper::IdGenerator&) -> AZ::EntityId { - auto findIt = m_baseToInstanceMap.find(sourceId); - return findIt != m_baseToInstanceMap.end() ? findIt->second : sourceId; - }, serializeContext); - - } - - void ScriptCanvasAssetInstance::ApplyDataPatch() - { - if (!m_assetRef.GetAsset().IsReady()) - { - return; - } - - ScriptCanvas::ScriptCanvasData& baseData = m_assetRef.GetAsset().Get()->GetScriptCanvasData(); - - AZ::SerializeContext* serializeContext{}; - AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); - // An empty map indicates its a fresh instance (i.e. has never be instantiated and then serialized). - if (m_baseToInstanceMap.empty()) - { - // Generate new Ids and populate the map. - AZ_Assert(!m_dataPatch.IsValid(), "Data patch is valid for scene slice instance, but base scene to instantiated scene Id map is not!"); - serializeContext->CloneObjectInplace(m_scriptCanvasData, &baseData); - AZ::IdUtils::Remapper::GenerateNewIdsAndFixRefs(&m_scriptCanvasData, m_baseToInstanceMap); - } - else - { - // Clone entities while applying any data patches. - AZ_Assert(m_dataPatch.IsValid(), "Data patch is not valid for existing scene slice instance!"); - ScriptCanvas::ScriptCanvasData* patchedSceneData = m_dataPatch.Apply(&baseData, serializeContext); - - // Remap Ids & references. - AZ::IdUtils::Remapper::GenerateNewIdsAndFixRefs(patchedSceneData, m_baseToInstanceMap); - serializeContext->CloneObjectInplace(m_scriptCanvasData, patchedSceneData); - } - } - - AZ::DataPatch::FlagsMap ScriptCanvasAssetInstance::GetDataFlagsForPatching() const - { - // Collect all entities' data flags - AZ::DataPatch::FlagsMap dataFlags; - - for (auto& baseIdInstanceIdPair : m_baseToInstanceMap) - { - // Make the addressing relative to InstantiatedContainer (m_dataFlags stores flags relative to the individual entity) - AZ::DataPatch::AddressType addressPrefix; - addressPrefix.push_back(AZ_CRC("Entities", 0x50ec64e5)); - addressPrefix.push_back(static_cast(baseIdInstanceIdPair.first)); - - auto findIt = m_entityToDataFlags.find(baseIdInstanceIdPair.second); - if (findIt != m_entityToDataFlags.end()) - { - for (auto& addressDataFlagsPair : findIt->second) - { - const AZ::DataPatch::AddressType& originalAddress = addressDataFlagsPair.first; - - AZ::DataPatch::AddressType prefixedAddress; - prefixedAddress.reserve(addressPrefix.size() + originalAddress.size()); - prefixedAddress.insert(prefixedAddress.end(), addressPrefix.begin(), addressPrefix.end()); - prefixedAddress.insert(prefixedAddress.end(), originalAddress.begin(), originalAddress.end()); - - dataFlags.emplace(AZStd::move(prefixedAddress), addressDataFlagsPair.second); - } - } - } - - return dataFlags; - } -} diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetInstance.h b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetInstance.h deleted file mode 100644 index 5e86636d90..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetInstance.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once -#include -#include - -namespace ScriptCanvasEditor -{ - class ScriptCanvasAssetInstance - { - public: - AZ_TYPE_INFO(ScriptCanvasAssetInstance, "{96B16AAB-DB63-4D32-9FC9-7A5DE440B0B7}"); - AZ_CLASS_ALLOCATOR(ScriptCanvasAssetInstance, AZ::SystemAllocator, 0); - - ScriptCanvasAssetInstance() = default; - ~ScriptCanvasAssetInstance(); - static void Reflect(AZ::ReflectContext* context); - - const AZStd::unordered_map& GetBaseToInstanceMap() const { return m_baseToInstanceMap; } - ScriptCanvasAssetReference& GetReference(); - const ScriptCanvasAssetReference& GetReference() const; - - ScriptCanvas::ScriptCanvasData& GetScriptCanvasData(); - const ScriptCanvas::ScriptCanvasData& GetScriptCanvasData() const; - - void ComputeDataPatch(); - void ApplyDataPatch(); - - private: - ScriptCanvasAssetInstance(const ScriptCanvasAssetInstance&) = delete; - AZ::DataPatch::FlagsMap GetDataFlagsForPatching() const; - - ScriptCanvas::ScriptCanvasData m_scriptCanvasData; - ScriptCanvasAssetReference m_assetRef; - AZStd::unordered_map m_baseToInstanceMap; - AZStd::unordered_map m_entityToDataFlags; - - AZ::DataPatch m_dataPatch; - bool m_canApplyPatch; - }; -} diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetReference.cpp b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetReference.cpp deleted file mode 100644 index e4d620ba57..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetReference.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "precompiled.h" - -#include -#include -#include - -namespace ScriptCanvasEditor -{ - void ScriptCanvasAssetReference::Reflect(AZ::ReflectContext* context) - { - if (auto serializeContext = azrtti_cast(context)) - { - serializeContext->Class() - ->DataContainer() - ; - } - } - - ScriptCanvasAssetReference::ScriptCanvasAssetReference(AZ::Data::Asset sliceAsset, bool storeInObjectStream) - { - SetAsset(sliceAsset); - SetAssetDataStoredInternally(storeInObjectStream); - } - - void ScriptCanvasAssetReference::SetAsset(AZ::Data::Asset sliceAsset) - { - m_asset = sliceAsset; - } - - const AZ::Data::Asset& ScriptCanvasAssetReference::GetAsset() const - { - return m_asset; - } - - AZ::Data::Asset& ScriptCanvasAssetReference::GetAsset() - { - return m_asset; - } - - void ScriptCanvasAssetReference::SetAssetDataStoredInternally(bool storeInObjectStream) - { - m_storeInObjectStream = storeInObjectStream; - } - - bool ScriptCanvasAssetReference::GetAssetDataStoredInternally() const - { - return m_storeInObjectStream; - } - -} diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetReference.h b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetReference.h deleted file mode 100644 index 526296b1c1..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetReference.h +++ /dev/null @@ -1,70 +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 ScriptCanvas -{ - class ScriptCanvasData; -} - -namespace ScriptCanvasEditor -{ - class ScriptCanvasAsset; - - class ScriptCanvasAssetReference - { - public: - AZ_TYPE_INFO(ScriptCanvasAssetReference, "{C1B24507-887C-4E20-A259-BFEEDD7EDF9D}"); - AZ_CLASS_ALLOCATOR(ScriptCanvasAssetReference, AZ::SystemAllocator, 0); - - ScriptCanvasAssetReference() = default; - ScriptCanvasAssetReference(AZ::Data::Asset scriptCanvasAsset, bool storeInObjectStream = false); - static void Reflect(AZ::ReflectContext* context); - - /*! - \param scriptCanvasAsset asset reference to store - \param storeInObjectStream bool which determines if the asset data will serialized out as part of the ObjectStream when serializing - */ - void SetAsset(AZ::Data::Asset scriptCanvasAsset); - const AZ::Data::Asset& GetAsset() const; - AZ::Data::Asset& GetAsset(); - - /*! - \param storeInObjectStream bool which determines if the asset data will serialized out as part of the ObjectStream when serializing - */ - void SetAssetDataStoredInternally(bool storeInObjectStream); - - /*! - Indicates if this scriptCanvas reference contains an asset whose data is stored internally in this class. - \return true if the asset is asset data is serialize as part of this class object stream - */ - bool GetAssetDataStoredInternally() const; - - private: - bool m_storeInObjectStream = false; ///< If true the asset data is stored in the object stream with this class - AZ::Data::Asset m_asset; - friend class ScriptCanvasAssetReferenceContainer; - }; -} - -namespace AZStd -{ - template<> - struct hash - { - using argument_type = ScriptCanvasEditor::ScriptCanvasAssetReference; - using result_type = AZStd::size_t; - AZ_FORCE_INLINE size_t operator()(const argument_type& key) const - { - AZStd::hash hasher; - return hasher(key.GetAsset().GetId()); - } - }; -} diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetReferenceContainer.h b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetReferenceContainer.h deleted file mode 100644 index efff707234..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetReferenceContainer.h +++ /dev/null @@ -1,234 +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 ScriptCanvasEditor -{ - class ScriptCanvasAssetReferenceContainer - : public AZ::SerializeContext::IDataContainer - { - public: - ScriptCanvasAssetReferenceContainer() - { - m_storeInObjectStreamElement.m_name = "m_storeInObjectStream"; - m_storeInObjectStreamElement.m_nameCrc = AZ_CRC("m_storeInObjectStream", 0xf5a45371); - m_storeInObjectStreamElement.m_typeId = azrtti_typeid(); - m_storeInObjectStreamElement.m_offset = 0; - m_storeInObjectStreamElement.m_dataSize = sizeof(bool); - m_storeInObjectStreamElement.m_azRtti = nullptr; - m_storeInObjectStreamElement.m_genericClassInfo = AZ::SerializeGenericTypeInfo::GetGenericInfo(); - m_storeInObjectStreamElement.m_editData = nullptr; - m_storeInObjectStreamElement.m_flags = 0; - - m_assetElement.m_name = "m_asset"; - m_assetElement.m_nameCrc = AZ_CRC("m_asset", 0x4e58e538); - m_assetElement.m_typeId = AZ::SerializeGenericTypeInfo>::GetClassTypeId(); - m_assetElement.m_offset = m_storeInObjectStreamElement.m_dataSize; - m_assetElement.m_dataSize = sizeof(AZ::Data::Asset); - m_assetElement.m_azRtti = AZ::GetRttiHelper>(); - m_assetElement.m_genericClassInfo = AZ::SerializeGenericTypeInfo>::GetGenericInfo(); - m_assetElement.m_editData = nullptr; - m_assetElement.m_flags = 0; - - m_baseDataElement.m_name = "m_scriptCanvasData"; - m_baseDataElement.m_nameCrc = AZ_CRC("m_scriptCanvasData", 0x78a93f93); - m_baseDataElement.m_typeId = AZ::SerializeGenericTypeInfo::GetClassTypeId(); - m_baseDataElement.m_offset = m_assetElement.m_offset + m_assetElement.m_dataSize; - m_baseDataElement.m_dataSize = sizeof(ScriptCanvas::ScriptCanvasData); - m_baseDataElement.m_azRtti = AZ::GetRttiHelper(); - m_baseDataElement.m_genericClassInfo = AZ::SerializeGenericTypeInfo::GetGenericInfo(); - m_baseDataElement.m_editData = nullptr; - m_baseDataElement.m_flags = 0; - } - /// Null if element with this name can't be found. - const AZ::SerializeContext::ClassElement* GetElement(AZ::u32 elementNameCrc) const override - { - if (m_storeInObjectStreamElement.m_nameCrc == elementNameCrc) - { - return &m_storeInObjectStreamElement; - } - if (m_assetElement.m_nameCrc == elementNameCrc) - { - return &m_assetElement; - } - if (m_baseDataElement.m_nameCrc == elementNameCrc) - { - return &m_baseDataElement; - } - - return nullptr; - } - - bool GetElement(AZ::SerializeContext::ClassElement& classElement, const AZ::SerializeContext::DataElement& dataElement) const override - { - if (m_storeInObjectStreamElement.m_nameCrc == dataElement.m_nameCrc) - { - classElement = m_storeInObjectStreamElement; - return true; - } - if (m_assetElement.m_nameCrc == dataElement.m_nameCrc) - { - classElement = m_assetElement; - return true; - } - if (m_baseDataElement.m_nameCrc == dataElement.m_nameCrc) - { - classElement = m_baseDataElement; - return true; - } - return false; - } - - /// Enumerate elements in the array. - void EnumElements(void* instance, const ElementCB& cb) override - { - auto assetRef = reinterpret_cast(instance); - - if (!cb(&assetRef->m_storeInObjectStream, m_storeInObjectStreamElement.m_typeId, m_storeInObjectStreamElement.m_genericClassInfo ? m_storeInObjectStreamElement.m_genericClassInfo->GetClassData() : nullptr, &m_storeInObjectStreamElement)) - { - return; - } - - if (!cb(&assetRef->m_asset, m_assetElement.m_typeId, m_assetElement.m_genericClassInfo ? m_assetElement.m_genericClassInfo->GetClassData() : nullptr, &m_assetElement)) - { - return; - } - - if (assetRef->m_storeInObjectStream && assetRef->m_asset.Get()) - { - cb(&assetRef->m_asset.Get()->GetScriptCanvasData(), m_baseDataElement.m_typeId, m_baseDataElement.m_genericClassInfo ? m_baseDataElement.m_genericClassInfo->GetClassData() : nullptr, &m_baseDataElement); - } - } - - void EnumTypes(const ElementTypeCB& cb) override - { - cb(m_storeInObjectStreamElement.m_typeId, &m_storeInObjectStreamElement); - cb(m_assetElement.m_typeId, &m_assetElement); - cb(m_baseDataElement.m_typeId, &m_baseDataElement); - } - - /// Return number of elements in the container. - size_t Size(void* instance) const override - { - auto assetRef = reinterpret_cast(instance); - return assetRef->m_storeInObjectStream && assetRef->m_asset.Get() ? m_numClassElements : m_numClassElements - 1; - } - - /// Returns the capacity of the container. Returns 0 for objects without fixed capacity. - size_t Capacity(void*) const override - { - return m_numClassElements; - } - - /// Returns true if elements pointers don't change on add/remove. If false you MUST enumerate all elements. - bool IsStableElements() const override { return true; } - - /// Returns true if the container is fixed size, otherwise false. - bool IsFixedSize() const override { return false; } - - /// Returns if the container is fixed capacity, otherwise false - bool IsFixedCapacity() const override { return true; } - - /// Returns true if the container is a smart pointer. - bool IsSmartPointer() const override { return false; } - - /// Returns true if elements can be retrieved by index. - bool CanAccessElementsByIndex() const override { return false; } - - /// Reserve element - void* ReserveElement(void* instance, const AZ::SerializeContext::ClassElement* classElement) override - { - auto assetRef = reinterpret_cast(instance); - if (classElement->m_nameCrc == m_storeInObjectStreamElement.m_nameCrc) - { - return &assetRef->m_storeInObjectStream; - } - if (classElement->m_nameCrc == m_assetElement.m_nameCrc) - { - if (assetRef->m_storeInObjectStream) - { - assetRef->m_asset.SetFlags(static_cast(AZ::Data::AssetLoadBehavior::NoLoad)); - } - return &assetRef->m_asset; - } - if (assetRef->m_storeInObjectStream && classElement->m_nameCrc == m_baseDataElement.m_nameCrc) - { - auto* scriptCanvasAsset = aznew ScriptCanvasAsset(assetRef->m_asset.GetId(), AZ::Data::AssetData::AssetStatus::Ready); - assetRef->m_asset = { scriptCanvasAsset, AZ::Data::AssetLoadBehavior::Default }; - return &assetRef->m_asset.Get()->GetScriptCanvasData(); - } - - return instance; - } - - /// Get an element's address by its index (called before the element is loaded). - void* GetElementByIndex(void*, const AZ::SerializeContext::ClassElement*, size_t) override - { - return nullptr; - } - - /// Store element - void StoreElement(void* instance, void* element) override - { - auto assetRef = reinterpret_cast(instance); - if (assetRef->m_storeInObjectStream && assetRef->m_asset.Get() && element == &assetRef->m_asset.Get()->GetScriptCanvasData()) - { - auto existingAsset = AZ::Data::AssetManager::Instance().FindAsset(assetRef->m_asset.GetId(), assetRef->m_asset.GetAutoLoadBehavior()); - if (existingAsset.IsReady()) - { - assetRef->m_asset = existingAsset; - } - } - } - - /// Remove element in the container. - bool RemoveElement(void* instance, const void* element, AZ::SerializeContext* deletePointerDataContext) override - { - if (deletePointerDataContext) - { - auto assetRef = reinterpret_cast(instance); - if (&assetRef->m_storeInObjectStream == element) - { - DeletePointerData(deletePointerDataContext, &m_storeInObjectStreamElement, &assetRef->m_storeInObjectStream); - } - else if (&assetRef->m_asset == element) - { - DeletePointerData(deletePointerDataContext, &m_assetElement, &assetRef->m_asset); - } - } - return false; - } - - /// Remove elements (removed array of elements) regardless if the container is Stable or not (IsStableElements) - size_t RemoveElements(void* instance, const void** elements, size_t numElements, AZ::SerializeContext* deletePointerDataContext) override - { - if (deletePointerDataContext) - { - for (size_t i = 0; i < numElements; ++i) - { - RemoveElement(instance, elements[i], deletePointerDataContext); - } - } - return 0; - } - - /// Clear elements in the instance. - void ClearElements(void*, AZ::SerializeContext*) override - { - } - - AZ::SerializeContext::ClassElement m_storeInObjectStreamElement; - AZ::SerializeContext::ClassElement m_assetElement; - AZ::SerializeContext::ClassElement m_baseDataElement; - const size_t m_numClassElements = 3; - }; -} diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTracker.cpp b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTracker.cpp index 4979f5e0e8..24d9aa5ba7 100644 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTracker.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTracker.cpp @@ -22,7 +22,6 @@ #include #include -#include #include #include diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.cpp b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.cpp index 3304ad7987..c973034fa1 100644 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.cpp @@ -80,11 +80,6 @@ namespace ScriptCanvasEditor AZ::Data::Asset newAsset = Clone(); memoryAsset.m_inMemoryAsset = newAsset; } - else if (m_assetType == azrtti_typeid()) - { - AZ::Data::Asset newAsset = Clone(); - memoryAsset.m_inMemoryAsset = newAsset; - } else { AZ_Assert(false, "Unsupported Script Canvas Asset Type"); @@ -107,10 +102,6 @@ namespace ScriptCanvasEditor { asset = assetHandler->CreateAsset(assetId, azrtti_typeid()); } - else if (assetType == azrtti_typeid()) - { - asset = assetHandler->CreateAsset(assetId, azrtti_typeid()); - } m_inMemoryAsset = AZ::Data::Asset(asset, AZ::Data::AssetLoadBehavior::PreLoad); @@ -155,8 +146,6 @@ namespace ScriptCanvasEditor streamInfo.m_streamFlags = AZ::IO::OpenMode::ModeWrite; streamInfo.m_streamName = m_saveAsPath; - ScriptCanvasEditor::ScriptCanvasDataRequestBus::Event(GetScriptCanvasId(), &ScriptCanvasEditor::ScriptCanvasDataRequests::SetPrettyName, GetTabName().c_str()); - if (!streamInfo.IsValid()) { return; @@ -223,10 +212,6 @@ namespace ScriptCanvasEditor { m_inMemoryAsset = AZ::Data::AssetManager::Instance().GetAsset(assetId, AZ::Data::AssetLoadBehavior::Default); } - else if (assetInfo.m_assetType == azrtti_typeid()) - { - m_inMemoryAsset = AZ::Data::AssetManager::Instance().GetAsset(assetId, AZ::Data::AssetLoadBehavior::Default); - } if (m_inMemoryAsset) { @@ -290,15 +275,8 @@ namespace ScriptCanvasEditor return; } - if (m_assetType == azrtti_typeid()) - { - editorGraph->MarkFunctionGraph(); - } - m_scriptCanvasId = editorGraph->GetScriptCanvasId(); - ScriptCanvasEditor::ScriptCanvasDataRequestBus::Event(m_scriptCanvasId, &ScriptCanvasEditor::ScriptCanvasDataRequests::SetPrettyName, GetTabName().c_str()); - EditorGraphNotificationBus::Handler::BusDisconnect(); EditorGraphNotificationBus::Handler::BusConnect(m_scriptCanvasId); @@ -538,10 +516,6 @@ namespace ScriptCanvasEditor { return CloneAssetData(newAssetId); } - else if (m_assetType == azrtti_typeid()) - { - return CloneAssetData(newAssetId); - } AZ_Assert(false, "The provides asset type is not supported as a valid Script Canvas memory asset"); return AZ::Data::Asset(); diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.h b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.h index 8f44a7f4b8..4449bcb62a 100644 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.h +++ b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.h @@ -21,7 +21,6 @@ #include #include -#include #include #include diff --git a/Gems/ScriptCanvas/Code/Editor/Components/EditorGraph.cpp b/Gems/ScriptCanvas/Code/Editor/Components/EditorGraph.cpp index f1b4af88d8..8078ef7a78 100644 --- a/Gems/ScriptCanvas/Code/Editor/Components/EditorGraph.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Components/EditorGraph.cpp @@ -38,9 +38,6 @@ AZ_POP_DISABLE_WARNING #include #include #include - -#include - #include #include #include @@ -63,7 +60,6 @@ AZ_POP_DISABLE_WARNING #include #include -#include #include #include #include @@ -1087,66 +1083,6 @@ namespace ScriptCanvasEditor return CanCreateConnectionBetween(scSourceEndpoint, scTargetEndpoint).IsSuccess(); } - GraphCanvas::ConnectionValidationTooltip Graph::GetConnectionValidityTooltip(const GraphCanvas::Endpoint& sourcePoint, const GraphCanvas::Endpoint& targetPoint) const - { - ScriptCanvas::Endpoint scSourceEndpoint = ConvertToScriptCanvasEndpoint(sourcePoint); - ScriptCanvas::Endpoint scTargetEndpoint = ConvertToScriptCanvasEndpoint(targetPoint); - - AZ::Outcome connectionResult = CanCreateConnectionBetween(scSourceEndpoint, scTargetEndpoint); - - GraphCanvas::ConnectionValidationTooltip validationTooltip; - - validationTooltip.m_isValid = connectionResult.IsSuccess(); - - if (!connectionResult) - { - validationTooltip.m_failureReason = connectionResult.GetError(); - } - - return validationTooltip; - } - - bool Graph::IsValidVariableAssignment(const AZ::EntityId& variableId, const GraphCanvas::Endpoint& targetPoint) const - { - AZStd::any* userData = nullptr; - GraphCanvas::NodeRequestBus::EventResult(userData, variableId, &GraphCanvas::NodeRequests::GetUserData); - AZ::EntityId variableNodeId = (userData && userData->is()) ? *AZStd::any_cast(userData) : AZ::EntityId(); - - ScriptCanvas::SlotId variableSlotId; - ScriptCanvas::NodeRequestBus::EventResult(variableSlotId, variableNodeId, &ScriptCanvas::NodeRequests::GetSlotId, ScriptCanvas::PureData::k_getThis); - - ScriptCanvas::Endpoint variableSourceEndpoint(variableNodeId, variableSlotId); - ScriptCanvas::Endpoint targetEndpoint = ConvertToScriptCanvasEndpoint(targetPoint); - - return CanCreateConnectionBetween(variableSourceEndpoint, targetEndpoint).IsSuccess(); - } - - GraphCanvas::ConnectionValidationTooltip Graph::GetVariableAssignmentValidityTooltip(const AZ::EntityId& variableId, const GraphCanvas::Endpoint& targetPoint) const - { - AZStd::any* userData = nullptr; - GraphCanvas::NodeRequestBus::EventResult(userData, variableId, &GraphCanvas::NodeRequests::GetUserData); - AZ::EntityId variableNodeId = (userData && userData->is()) ? *AZStd::any_cast(userData) : AZ::EntityId(); - - ScriptCanvas::SlotId variableSlotId; - ScriptCanvas::NodeRequestBus::EventResult(variableSlotId, variableNodeId, &ScriptCanvas::NodeRequests::GetSlotId, ScriptCanvas::PureData::k_getThis); - - ScriptCanvas::Endpoint variableSourceEndpoint(variableNodeId, variableSlotId); - ScriptCanvas::Endpoint targetEndpoint = ConvertToScriptCanvasEndpoint(targetPoint); - - AZ::Outcome connectionResult = CanCreateConnectionBetween(variableSourceEndpoint, targetEndpoint); - - GraphCanvas::ConnectionValidationTooltip validationTooltip; - - validationTooltip.m_isValid = connectionResult.IsSuccess(); - - if (!connectionResult) - { - validationTooltip.m_failureReason = connectionResult.GetError(); - } - - return validationTooltip; - } - AZStd::string Graph::GetDataTypeString(const AZ::Uuid& typeId) { return TranslationHelper::GetSafeTypeName(ScriptCanvas::Data::FromAZType(typeId)); @@ -3190,16 +3126,6 @@ namespace ScriptCanvasEditor } } - bool Graph::IsRuntimeGraph() const - { - return GetAssetType() == azrtti_typeid(); - } - - bool Graph::IsFunctionGraph() const - { - return GetAssetType() == azrtti_typeid(); - } - bool Graph::CanExposeEndpoint(const GraphCanvas::Endpoint& endpoint) { bool isEnabled = false; diff --git a/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasGraphUtilities.inl b/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasGraphUtilities.inl index 0eb3c3a719..96febf8553 100644 --- a/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasGraphUtilities.inl +++ b/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasGraphUtilities.inl @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include diff --git a/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasTraceUtilities.h b/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasTraceUtilities.h index 381e7c78ea..2ca5c0857f 100644 --- a/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasTraceUtilities.h +++ b/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasTraceUtilities.h @@ -20,10 +20,8 @@ #include #include #include -#include #include #include -#include #include #include #include @@ -44,17 +42,6 @@ namespace ScriptCanvasEditor { class ScriptCanvasAsset; - struct LoadTestFunctionResult - { - AZStd::string_view m_graphPath; - AZStd::unique_ptr m_entity; - ScriptCanvas::RuntimeComponent* m_runtimeComponent = nullptr; - bool m_nativeFunctionFound = false; - AZ::Data::Asset m_editorAsset; - AZ::Data::Asset m_runtimeAsset; - AZ::Data::Asset m_scriptAsset; - }; - struct LoadTestGraphResult { AZStd::string_view m_graphPath; diff --git a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/EntityRefNodeDescriptorComponent.cpp b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/EntityRefNodeDescriptorComponent.cpp deleted file mode 100644 index d49b776963..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/EntityRefNodeDescriptorComponent.cpp +++ /dev/null @@ -1,126 +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 "precompiled.h" - -#include - -#include "EntityRefNodeDescriptorComponent.h" - -#include "ScriptCanvas/Core/Datum.h" -#include "ScriptCanvas/Core/PureData.h" -#include "ScriptCanvas/Core/Slot.h" - -namespace ScriptCanvasEditor -{ - ///////////////////////////////////// - // EntityRefNodeDescriptorComponent - ///////////////////////////////////// - - void EntityRefNodeDescriptorComponent::Reflect(AZ::ReflectContext* reflectContext) - { - AZ::SerializeContext* serializeContext = azrtti_cast(reflectContext); - if (serializeContext) - { - serializeContext->Class() - ->Version(1) - ; - } - } - - EntityRefNodeDescriptorComponent::EntityRefNodeDescriptorComponent() - : NodeDescriptorComponent(NodeDescriptorType::EntityRef) - { - } - - void EntityRefNodeDescriptorComponent::OnEntityNameChanged([[maybe_unused]] const AZStd::string& name) - { - UpdateNodeTitle(); - } - - void EntityRefNodeDescriptorComponent::OnSlotInputChanged(const ScriptCanvas::SlotId& slotId) - { - if (slotId == m_endpoint.GetSlotId()) - { - AZ::EntityBus::Handler::BusDisconnect(); - - AZ::EntityId referencedId = GetReferencedEntityId(); - - if (referencedId.IsValid()) - { - AZ::EntityBus::Handler::BusConnect(referencedId); - } - - UpdateNodeTitle(); - } - } - - void EntityRefNodeDescriptorComponent::OnAddedToGraphCanvasGraph([[maybe_unused]] const GraphCanvas::GraphId& sceneId, const AZ::EntityId& scriptCanvasNodeId) - { - ScriptCanvas::SlotId scriptCanvasSlotId; - ScriptCanvas::NodeRequestBus::EventResult(scriptCanvasSlotId, scriptCanvasNodeId, &ScriptCanvas::NodeRequests::GetSlotId, ScriptCanvas::PureData::k_setThis); - - m_endpoint = ScriptCanvas::Endpoint(scriptCanvasNodeId, scriptCanvasSlotId); - - if (m_endpoint.IsValid()) - { - AZ::EntityId referencedId = GetReferencedEntityId(); - - if (referencedId.IsValid()) - { - AZ::EntityBus::Handler::BusConnect(referencedId); - } - } - - UpdateNodeTitle(); - } - - AZ::EntityId EntityRefNodeDescriptorComponent::GetReferencedEntityId() const - { - AZ::EntityId retVal; - - const ScriptCanvas::Datum* object = nullptr; - ScriptCanvas::NodeRequestBus::EventResult(object, m_endpoint.GetNodeId(), &ScriptCanvas::NodeRequests::FindDatum, m_endpoint.GetSlotId()); - - if (object && object->IS_A()) - { - retVal = (*object->GetAs()); - } - - return retVal; - } - - void EntityRefNodeDescriptorComponent::UpdateNodeTitle() - { - bool needsTitle = true; - - if (m_endpoint.IsValid()) - { - AZ::EntityId referencedId = GetReferencedEntityId(); - - AZStd::string entityName; - AZ::ComponentApplicationBus::BroadcastResult(entityName, &AZ::ComponentApplicationRequests::GetEntityName, referencedId); - - if (!entityName.empty()) - { - needsTitle = false; - GraphCanvas::NodeTitleRequestBus::Event(GetEntityId(), &GraphCanvas::NodeTitleRequests::SetTitle, entityName.c_str()); - } - else if (referencedId.IsValid()) - { - needsTitle = false; - GraphCanvas::NodeTitleRequestBus::Event(GetEntityId(), &GraphCanvas::NodeTitleRequests::SetTitle, referencedId.ToString().c_str()); - } - } - - if (needsTitle) - { - GraphCanvas::NodeTitleRequestBus::Event(GetEntityId(), &GraphCanvas::NodeTitleRequests::SetTitle, ""); - } - - GraphCanvas::NodeTitleRequestBus::Event(GetEntityId(), &GraphCanvas::NodeTitleRequests::SetSubTitle, "EntityRef"); - } -} diff --git a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/EntityRefNodeDescriptorComponent.h b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/EntityRefNodeDescriptorComponent.h deleted file mode 100644 index af8b55a69d..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/EntityRefNodeDescriptorComponent.h +++ /dev/null @@ -1,48 +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 "Editor/GraphCanvas/Components/NodeDescriptors/NodeDescriptorComponent.h" - -#include "ScriptCanvas/Core/NodeBus.h" -#include "ScriptCanvas/Core/Endpoint.h" - -namespace ScriptCanvasEditor -{ - class EntityRefNodeDescriptorComponent - : public NodeDescriptorComponent - , public AZ::EntityBus::Handler - { - public: - AZ_COMPONENT(EntityRefNodeDescriptorComponent, "{887AE9AC-C793-4FE5-BAE2-AF6A7F70A374}", NodeDescriptorComponent); - static void Reflect(AZ::ReflectContext* reflectContext); - - EntityRefNodeDescriptorComponent(); - ~EntityRefNodeDescriptorComponent() = default; - - // AZ::EntityBus - void OnEntityNameChanged(const AZStd::string& name) override; - //// - - // ScriptCanvas::NodeNotificationsBus - void OnSlotInputChanged(const ScriptCanvas::SlotId& slotId) override; - //// - - private: - - void OnAddedToGraphCanvasGraph(const GraphCanvas::GraphId& graphId, const AZ::EntityId& scriptCanvasNodeId) override; - - AZ::EntityId GetReferencedEntityId() const; - void UpdateNodeTitle(); - - ScriptCanvas::Endpoint m_endpoint; - }; -} diff --git a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/FunctionNodeDescriptorComponent.h b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/FunctionNodeDescriptorComponent.h index d121762c93..68782be5cd 100644 --- a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/FunctionNodeDescriptorComponent.h +++ b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/FunctionNodeDescriptorComponent.h @@ -10,8 +10,6 @@ #include #include - -#include #include #include diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/Functions/ScriptCanvasFunctionAssetHandler.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/Functions/ScriptCanvasFunctionAssetHandler.h deleted file mode 100644 index f9953aba99..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/Functions/ScriptCanvasFunctionAssetHandler.h +++ /dev/null @@ -1,68 +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 -#include -#include -#include - -namespace AZ -{ - class SerializeContext; -} - -namespace ScriptCanvasEditor -{ - class ScriptCanvasFunctionAsset; - - /** - * Manages editor Script Canvas graph assets. - */ - class ScriptCanvasFunctionAssetHandler - : public ScriptCanvasAssetHandler - { - public: - AZ_CLASS_ALLOCATOR(ScriptCanvasFunctionAssetHandler, AZ::SystemAllocator, 0); - AZ_RTTI(ScriptCanvasFunctionAssetHandler, "{CE1EB0B7-D8DA-4B9B-858B-A34DF5092BC2}", ScriptCanvasAssetHandler); - - ScriptCanvasFunctionAssetHandler(AZ::SerializeContext* context = nullptr); - ~ScriptCanvasFunctionAssetHandler(); - - AZ::Data::AssetPtr CreateAsset(const AZ::Data::AssetId& id, const AZ::Data::AssetType& type) override; - AZ::Data::AssetHandler::LoadResult LoadAssetData( - const AZ::Data::Asset& asset, - AZStd::shared_ptr stream, - const AZ::Data::AssetFilterCB& assetLoadFilterCB) override; - bool SaveAssetData(const AZ::Data::Asset& asset, AZ::IO::GenericStream* stream) override; - - bool SaveAssetData(const ScriptCanvasEditor::ScriptCanvasFunctionAsset* assetData, AZ::IO::GenericStream* stream); - - bool SaveAssetData(const ScriptCanvasEditor::ScriptCanvasFunctionAsset* assetData, AZ::IO::GenericStream* stream, AZ::DataStream::StreamType streamType); - - // Called by asset database on registration. - void GetAssetTypeExtensions(AZStd::vector& extensions) override; - void GetHandledAssetTypes(AZStd::vector& assetTypes) override; - - // Provides editor with information about script canvas graph assets. - AZ::Data::AssetType GetAssetType() const override; - const char* GetAssetTypeDisplayName() const override; - - bool CanCreateComponent(const AZ::Data::AssetId& assetId) const override; - - const char* GetGroup() const override; - const char* GetBrowserIcon() const override; - - static AZ::Data::AssetType GetAssetTypeStatic(); - - ScriptCanvasEditor::ScriptCanvasFunctionAsset* m_scriptCanvasAsset; - - }; -} diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Bus/EditorScriptCanvasBus.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Bus/EditorScriptCanvasBus.h index d9b2be8035..27477b4127 100644 --- a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Bus/EditorScriptCanvasBus.h +++ b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Bus/EditorScriptCanvasBus.h @@ -154,10 +154,6 @@ namespace ScriptCanvasEditor virtual bool ConvertReferenceToVariableNode(const GraphCanvas::Endpoint& endpoint) = 0; virtual void QueueVersionUpdate(const AZ::EntityId& graphCanvasNodeId) = 0; - - virtual bool IsRuntimeGraph() const = 0; - virtual bool IsFunctionGraph() const = 0; - virtual bool CanExposeEndpoint(const GraphCanvas::Endpoint& endpoint) = 0; virtual ScriptCanvas::Endpoint ConvertToScriptCanvasEndpoint(const GraphCanvas::Endpoint& endpoinnt) const = 0; diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorGraph.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorGraph.h index a32333e5ce..60e1649620 100644 --- a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorGraph.h +++ b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorGraph.h @@ -110,12 +110,12 @@ namespace ScriptCanvasEditor , m_graphCanvasSaveVersion(GraphCanvas::EntitySaveDataContainer::CurrentVersion) , m_upgradeSM(this) {} - + ~Graph() override; void Activate() override; void Deactivate() override; - + static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) { ScriptCanvas::Graph::GetProvidedServices(provided); @@ -160,10 +160,6 @@ namespace ScriptCanvasEditor bool CreateConnection(const GraphCanvas::ConnectionId& connectionId, const GraphCanvas::Endpoint& sourcePoint, const GraphCanvas::Endpoint& targetPoint) override; bool IsValidConnection(const GraphCanvas::Endpoint& sourcePoint, const GraphCanvas::Endpoint& targetPoint) const override; - GraphCanvas::ConnectionValidationTooltip GetConnectionValidityTooltip(const GraphCanvas::Endpoint& sourcePoint, const GraphCanvas::Endpoint& targetPoint) const override; - - bool IsValidVariableAssignment(const AZ::EntityId& variableId, const GraphCanvas::Endpoint& targetPoint) const override; - GraphCanvas::ConnectionValidationTooltip GetVariableAssignmentValidityTooltip(const AZ::EntityId& variableId, const GraphCanvas::Endpoint& targetPoint) const override; AZStd::string GetDataTypeString(const AZ::Uuid& typeId) override; @@ -192,7 +188,7 @@ namespace ScriptCanvasEditor GraphCanvas::CanHandleMimeEventOutcome CanHandleValueMimeEvent(const GraphCanvas::Endpoint& endpoint, const QMimeData* mimeData) override; bool HandleValueMimeEvent(const GraphCanvas::Endpoint& endpoint, const QMimeData* mimeData) override; - GraphCanvas::SlotId RequestExtension(const GraphCanvas::NodeId& nodeId, const GraphCanvas::ExtenderId& extenderId, GraphModelRequests::ExtensionRequestReason ) override; + GraphCanvas::SlotId RequestExtension(const GraphCanvas::NodeId& nodeId, const GraphCanvas::ExtenderId& extenderId, GraphModelRequests::ExtensionRequestReason) override; void ExtensionCancelled(const GraphCanvas::NodeId& nodeId, const GraphCanvas::ExtenderId& extenderId) override; void FinalizeExtension(const GraphCanvas::NodeId& nodeId, const GraphCanvas::ExtenderId& extenderId) override; @@ -216,7 +212,7 @@ namespace ScriptCanvasEditor void PostCreationEvent() override; void OnPasteBegin() override; void OnPasteEnd() override; - + void OnViewRegistered() override; ///////////////////////////////////////////////////////////////////////////////////////////// @@ -262,7 +258,7 @@ namespace ScriptCanvasEditor AZStd::vector GetNodesOfType(const ScriptCanvas::NodeTypeIdentifier&) override; AZStd::vector GetVariableNodes(const ScriptCanvas::VariableId&) override; - + void RemoveUnusedVariables() override; bool CanConvertVariableNodeToReference(const GraphCanvas::NodeId& nodeId) override; @@ -270,12 +266,9 @@ namespace ScriptCanvasEditor bool ConvertReferenceToVariableNode(const GraphCanvas::Endpoint& endpoint) override; void QueueVersionUpdate(const AZ::EntityId& graphCanvasNodeId) override; - - bool IsRuntimeGraph() const override; - bool IsFunctionGraph() const override; bool CanExposeEndpoint(const GraphCanvas::Endpoint& endpoint) override; - + ScriptCanvas::Endpoint ConvertToScriptCanvasEndpoint(const GraphCanvas::Endpoint& endpoint) const override; GraphCanvas::Endpoint ConvertToGraphCanvasEndpoint(const ScriptCanvas::Endpoint& endpoint) const override; //// @@ -333,8 +326,8 @@ namespace ScriptCanvasEditor Graph(const Graph&) = delete; void DisplayUpdateToast(); - - AZ::EntityId ConvertToScriptCanvasNodeId(const GraphCanvas::NodeId& nodeId) const; + + AZ::EntityId ConvertToScriptCanvasNodeId(const GraphCanvas::NodeId& nodeId) const; GraphCanvas::NodePropertyDisplay* CreateDisplayPropertyForSlot(const AZ::EntityId& scriptCanvasNodeId, const ScriptCanvas::SlotId& scriptCanvasSlotId) const; @@ -370,10 +363,10 @@ namespace ScriptCanvasEditor AZ::EntityId m_wrapperNodeDropTarget; VariableComboBoxDataModel m_variableDataModel; - + WrappedNodeGroupingMap m_wrappedNodeGroupings; AZStd::vector< AZ::EntityId > m_lastGraphCanvasCreationGroup; - + AZ::Entity* m_graphCanvasSceneEntity; GraphCanvas::EntitySaveDataContainer::VersionInformation m_graphCanvasSaveVersion; diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/GraphCanvas/NodeDescriptorBus.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/GraphCanvas/NodeDescriptorBus.h index 6822576482..a0b0cea549 100644 --- a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/GraphCanvas/NodeDescriptorBus.h +++ b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/GraphCanvas/NodeDescriptorBus.h @@ -37,7 +37,7 @@ namespace ScriptCanvasEditor EBusHandler, EBusHandlerEvent, EBusSender, - EntityRef, + _deprecated_, VariableNode, SetVariable, GetVariable, diff --git a/Gems/ScriptCanvas/Code/Editor/Nodes/EditorLibrary.cpp b/Gems/ScriptCanvas/Code/Editor/Nodes/EditorLibrary.cpp deleted file mode 100644 index fcdc7b2780..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Nodes/EditorLibrary.cpp +++ /dev/null @@ -1,56 +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 "precompiled.h" - -#include - -#include -#include - - -namespace ScriptCanvasEditor -{ - namespace Library - { - void Editor::Reflect(AZ::ReflectContext* reflection) - { - AZ::SerializeContext* serializeContext = azrtti_cast(reflection); - if (serializeContext) - { - serializeContext->Class() - ->Version(1) - ; - - AZ::EditContext* editContext = serializeContext->GetEditContext(); - if (editContext) - { - editContext->Class("Editor", "") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/Components/All.png") - ; - } - } - } - - void Editor::InitNodeRegistry(ScriptCanvas::NodeRegistry& nodeRegistry) - { - ScriptCanvas::Library::AddNodeToRegistry(nodeRegistry); - } - - AZStd::vector Editor::GetComponentDescriptors() - { - return AZStd::vector({ - ScriptCanvasAssetNode::CreateDescriptor(), - }); - } - } - - AZStd::vector GetLibraryDescriptors() - { - return Library::Editor::GetComponentDescriptors(); - } -} diff --git a/Gems/ScriptCanvas/Code/Editor/Nodes/EditorLibrary.h b/Gems/ScriptCanvas/Code/Editor/Nodes/EditorLibrary.h deleted file mode 100644 index 4ea81a869a..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Nodes/EditorLibrary.h +++ /dev/null @@ -1,32 +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 AZ -{ - class ReflectContext; - class ComponentDescriptor; -} - -namespace ScriptCanvasEditor -{ - namespace Library - { - struct Editor : public ScriptCanvas::Library::LibraryDefinition - { - AZ_RTTI(Editor, "{59697735-4B64-4DC5-8380-02B2999FFCFE}", ScriptCanvas::Library::LibraryDefinition); - - static void Reflect(AZ::ReflectContext*); - static void InitNodeRegistry(ScriptCanvas::NodeRegistry& nodeRegistry); - static AZStd::vector GetComponentDescriptors(); - }; - } - - AZStd::vector GetLibraryDescriptors(); -} diff --git a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeCreateUtils.cpp b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeCreateUtils.cpp index a7282f85b0..0b2d0de958 100644 --- a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeCreateUtils.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeCreateUtils.cpp @@ -26,7 +26,6 @@ #include #include #include -#include namespace ScriptCanvasEditor::Nodes { @@ -132,36 +131,6 @@ namespace ScriptCanvasEditor::Nodes return AZStd::make_pair(node, nodeIdPair); } - NodeIdPair CreateEntityNode(const AZ::EntityId& sourceId, const ScriptCanvas::ScriptCanvasId& scriptCanvasId) - { - AZ_PROFILE_TIMER("ScriptCanvas", __FUNCTION__); - NodeIdPair nodeIdPair; - - ScriptCanvas::Node* node = nullptr; - AZ::Entity* scriptCanvasEntity{ aznew AZ::Entity }; - scriptCanvasEntity->Init(); - nodeIdPair.m_scriptCanvasId = scriptCanvasEntity->GetId(); - ScriptCanvas::SystemRequestBus::BroadcastResult(node, &ScriptCanvas::SystemRequests::CreateNodeOnEntity, scriptCanvasEntity->GetId(), scriptCanvasId, ScriptCanvas::Nodes::Entity::EntityRef::RTTI_Type()); - - auto* entityNode = azrtti_cast(node); - entityNode->SetEntityRef(sourceId); - - // Set the name - AZ::Entity* sourceEntity = nullptr; - AZ::ComponentApplicationBus::BroadcastResult(sourceEntity, &AZ::ComponentApplicationRequests::FindEntity, sourceId); - if (sourceEntity) - { - scriptCanvasEntity->SetName(AZStd::string::format("SC-EntityRef(%s)", sourceEntity->GetName().data())); - } - - AZ::EntityId graphCanvasGraphId; - EditorGraphRequestBus::EventResult(graphCanvasGraphId, scriptCanvasId, &EditorGraphRequests::GetGraphCanvasGraphId); - - nodeIdPair.m_graphCanvasId = DisplayEntityNode(graphCanvasGraphId, entityNode); - - return nodeIdPair; - } - NodeIdPair CreateObjectMethodNode(AZStd::string_view className, AZStd::string_view methodName, const ScriptCanvas::ScriptCanvasId& scriptCanvasId, ScriptCanvas::PropertyStatus propertyStatus) { AZ_PROFILE_TIMER("ScriptCanvas", __FUNCTION__); diff --git a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeCreateUtils.h b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeCreateUtils.h index c24b48a289..a3a9a4cc1e 100644 --- a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeCreateUtils.h +++ b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeCreateUtils.h @@ -28,7 +28,6 @@ namespace ScriptCanvasEditor::Nodes // Specific create methods which will also handle displaying the node. AZStd::pair CreateAndGetNode(const AZ::Uuid& classData, const ScriptCanvas::ScriptCanvasId& scriptCanvasId, const StyleConfiguration& styleConfiguration, AZStd::function = nullptr); NodeIdPair CreateNode(const AZ::Uuid& classData, const ScriptCanvas::ScriptCanvasId& scriptCanvasId, const StyleConfiguration& styleConfiguration); - NodeIdPair CreateEntityNode(const AZ::EntityId& sourceId, const ScriptCanvas::ScriptCanvasId& scriptCanvasId); NodeIdPair CreateObjectMethodNode(AZStd::string_view className, AZStd::string_view methodName, const ScriptCanvas::ScriptCanvasId& scriptCanvasId, ScriptCanvas::PropertyStatus propertyStatus); NodeIdPair CreateObjectMethodOverloadNode(AZStd::string_view className, AZStd::string_view methodName, const ScriptCanvas::ScriptCanvasId& scriptCanvasGraphId); NodeIdPair CreateGlobalMethodNode(AZStd::string_view methodName, const ScriptCanvas::ScriptCanvasId& scriptCanvasId); diff --git a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.cpp b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.cpp index ba87796161..691cfe3698 100644 --- a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.cpp @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -44,8 +43,6 @@ #include #include #include -#include - namespace ScriptCanvasEditor::Nodes::SlotDisplayHelper { @@ -231,57 +228,6 @@ namespace ScriptCanvasEditor::Nodes return DisplayGeneralScriptCanvasNode(graphCanvasGraphId, node, nodeConfiguration); } - AZ::EntityId DisplayEntityNode(AZ::EntityId, const ScriptCanvas::Nodes::Entity::EntityRef* entityNode) - { - AZ::EntityId graphCanvasNodeId; - - AZ::Entity* graphCanvasEntity = nullptr; - GraphCanvas::GraphCanvasRequestBus::BroadcastResult(graphCanvasEntity, &GraphCanvas::GraphCanvasRequests::CreateGeneralNode, ".entity"); - AZ_Assert(graphCanvasEntity, "Unable to create GraphCanvas Bus Node"); - - graphCanvasNodeId = graphCanvasEntity->GetId(); - - // Add the icon component - graphCanvasEntity->CreateComponent(ScriptCanvas::Nodes::Entity::EntityRef::RTTI_Type()); - graphCanvasEntity->CreateComponent(); - graphCanvasEntity->CreateComponent(entityNode->GetEntityId()); - graphCanvasEntity->CreateComponent(entityNode->GetEntityId()); - - graphCanvasEntity->Init(); - graphCanvasEntity->Activate(); - - // Set the user data on the GraphCanvas node to be the EntityId of the ScriptCanvas node - AZStd::any* graphCanvasUserData = nullptr; - GraphCanvas::NodeRequestBus::EventResult(graphCanvasUserData, graphCanvasNodeId, &GraphCanvas::NodeRequests::GetUserData); - if (graphCanvasUserData) - { - *graphCanvasUserData = entityNode->GetEntityId(); - } - - // Create the GraphCanvas slots - for (const auto& slot : entityNode->GetSlots()) - { - if (slot.GetDescriptor() == ScriptCanvas::SlotDescriptors::DataOut() && slot.IsVisible()) - { - DisplayScriptCanvasSlot(graphCanvasNodeId, slot); - } - } - - AZ::Entity* sourceEntity = nullptr; - AZ::ComponentApplicationBus::BroadcastResult(sourceEntity, &AZ::ComponentApplicationRequests::FindEntity, entityNode->GetEntityRef()); - - if (sourceEntity) - { - graphCanvasEntity->SetName(AZStd::string::format("GC-EntityRef(%s)", sourceEntity->GetName().data())); - } - else - { - graphCanvasEntity->SetName(AZStd::string::format("GC-EntityRef(%s)", entityNode->GetEntityRef().ToString().c_str())); - } - - return graphCanvasNodeId; - } - static void ConfigureGeneralScriptCanvasEntity(const ScriptCanvas::Node* node, AZ::Entity* graphCanvasEntity, const GraphCanvas::SlotGroup& slotGroup = GraphCanvas::SlotGroups::Invalid) { if (node->RequiresDynamicSlotOrdering()) @@ -1145,10 +1091,6 @@ namespace ScriptCanvasEditor::Nodes { graphCanvasNodeId = DisplayAzEventHandlerNode(graphCanvasGraphId, azEventHandlerNode); } - else if (azrtti_istypeof(node)) - { - graphCanvasNodeId = DisplayEntityNode(graphCanvasGraphId, static_cast(node)); - } else if (azrtti_istypeof(node)) { graphCanvasNodeId = DisplayScriptEventWrapperNode(graphCanvasGraphId, static_cast(node)); diff --git a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.h b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.h index 2ac38d86ed..3befb20846 100644 --- a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.h +++ b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.h @@ -30,10 +30,6 @@ namespace ScriptCanvas::Nodes::Core class SetVariableNode; class SendScriptEvent; } -namespace ScriptCanvas::Nodes::Entity -{ - class EntityRef; -} namespace ScriptEvents { class Method; @@ -45,7 +41,6 @@ namespace ScriptCanvasEditor::Nodes AZ::EntityId DisplayScriptCanvasNode(AZ::EntityId graphCanvasGraphId, const ScriptCanvas::Node* node); // Core Node - AZ::EntityId DisplayEntityNode(AZ::EntityId graphCanvasGraphId, const ScriptCanvas::Nodes::Entity::EntityRef* entityNode); AZ::EntityId DisplayEbusEventNode(AZ::EntityId graphCanvasGraphId, const AZStd::string& busName, const AZStd::string& eventName, const ScriptCanvas::EBusEventId& eventId); AZ::EntityId DisplayEbusWrapperNode(AZ::EntityId graphCanvasGraphId, const ScriptCanvas::Nodes::Core::EBusEventHandler* busNode); AZ::EntityId DisplayGetVariableNode(AZ::EntityId graphCanvasGraphId, const ScriptCanvas::Nodes::Core::GetVariableNode* variableNode); diff --git a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeUtils.cpp b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeUtils.cpp index a0d79f28a3..b3feb37671 100644 --- a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeUtils.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeUtils.cpp @@ -11,26 +11,10 @@ #include #include -#include #include namespace { - void CopyTranslationKeyedNameToDatumLabel(ScriptCanvas::PureData* node, - const GraphCanvas::TranslationKeyedString& name) - { - ScriptCanvas::SlotId slotId = node->GetSlotId(ScriptCanvas::PureData::k_setThis); - if (!slotId.IsValid()) - { - return; - } - - ScriptCanvas::ModifiableDatumView datumView; - node->FindModifiableDatumView(slotId, datumView); - - datumView.RelabelDatum(name.GetDisplayString()); - } - ScriptCanvas::ConnectionType ToScriptCanvasConnectionType(GraphCanvas::ConnectionType connectionType) { ScriptCanvas::ConnectionType scriptCanvasConnectionType = ScriptCanvas::ConnectionType::Unknown; diff --git a/Gems/ScriptCanvas/Code/Editor/Nodes/ScriptCanvasAssetNode.cpp b/Gems/ScriptCanvas/Code/Editor/Nodes/ScriptCanvasAssetNode.cpp deleted file mode 100644 index 3bc1f1b033..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Nodes/ScriptCanvasAssetNode.cpp +++ /dev/null @@ -1,205 +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 "precompiled.h" -#include - -#include -#include - -namespace ScriptCanvasEditor -{ - /** - * \note when we reflecting we can check if the class is inheriting from IEventHandler - * and use the this->events. - */ - class ScriptCanvasAssetNodeEventHandler - : public AZ::SerializeContext::IEventHandler - { - void OnReadBegin(void* classPtr) - { - auto* scriptCanvasAssetNode = reinterpret_cast(classPtr); - scriptCanvasAssetNode->ComputeDataPatch(); - } - }; - - void ScriptCanvasAssetNode::Reflect(AZ::ReflectContext* context) - { - AZ::SerializeContext* serializeContext = azrtti_cast(context); - if (!serializeContext) - { - return; - } - - serializeContext->Class() - ->Version(0) - ->EventHandler() - ->Field("m_assetInstance", &ScriptCanvasAssetNode::m_scriptCanvasAssetInstance) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("ScriptCanvas Asset", "Script Canvas Asset Node which contains a reference to another ScriptCanvas graph") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/Placeholder.png") - ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::List) - ; - } - } - - ScriptCanvasAssetNode::ScriptCanvasAssetNode(const AZ::Data::Asset& scriptCanvasAsset, bool storeAssetDataInternally) - { - SetAssetDataStoredInternally(storeAssetDataInternally); - SetAsset(scriptCanvasAsset); - } - - ScriptCanvasAssetNode::~ScriptCanvasAssetNode() - { - } - - void ScriptCanvasAssetNode::OnInputSignal(const ScriptCanvas::SlotId&) - { - - } - - void ScriptCanvasAssetNode::OnInit() - { - if (GetAsset().GetId().IsValid()) - { - AZ::Data::AssetBus::Handler::BusConnect(GetAsset().GetId()); - AZ::Entity* scriptCanvasEntity = GetScriptCanvasEntity(); - if (scriptCanvasEntity) - { - if (scriptCanvasEntity->GetState() == AZ::Entity::State::Constructed) - { - scriptCanvasEntity->Init(); - } - if (scriptCanvasEntity->GetState() == AZ::Entity::State::Init) - { - scriptCanvasEntity->Activate(); - } - } - } - } - - bool ScriptCanvasAssetNode::GetAssetDataStoredInternally() const - { - return m_scriptCanvasAssetInstance.GetReference().GetAssetDataStoredInternally(); - } - - void ScriptCanvasAssetNode::SetAssetDataStoredInternally(bool storeInObjectStream) - { - m_scriptCanvasAssetInstance.GetReference().SetAssetDataStoredInternally(storeInObjectStream); - } - - ScriptCanvas::ScriptCanvasData& ScriptCanvasAssetNode::GetScriptCanvasData() - { - return m_scriptCanvasAssetInstance.GetScriptCanvasData(); - } - - const ScriptCanvas::ScriptCanvasData& ScriptCanvasAssetNode::GetScriptCanvasData() const - { - return m_scriptCanvasAssetInstance.GetScriptCanvasData(); - } - - AZ::Entity* ScriptCanvasAssetNode::GetScriptCanvasEntity() const - { - return GetScriptCanvasData().GetScriptCanvasEntity(); - } - - AZ::Data::Asset& ScriptCanvasAssetNode::GetAsset() - { - return m_scriptCanvasAssetInstance.GetReference().GetAsset(); - } - - const AZ::Data::Asset& ScriptCanvasAssetNode::GetAsset() const - { - return m_scriptCanvasAssetInstance.GetReference().GetAsset(); - } - - void ScriptCanvasAssetNode::SetAsset(const AZ::Data::Asset& scriptCanvasAsset) - { - m_scriptCanvasAssetInstance.GetReference().SetAsset(scriptCanvasAsset); - if (scriptCanvasAsset.GetId().IsValid()) - { - auto onAssetReady = [](ScriptCanvasMemoryAsset&) {}; - AssetTrackerRequestBus::Broadcast(&AssetTrackerRequests::Load, scriptCanvasAsset.GetId(), azrtti_typeid(), onAssetReady); - - AZ::Data::AssetBus::Handler::BusConnect(scriptCanvasAsset.GetId()); - ApplyDataPatch(); - } - } - - void ScriptCanvasAssetNode::OnAssetReloaded(AZ::Data::Asset asset) - { - SetAsset(asset); - if (!GetAsset().IsReady()) - { - AZ_Error("Script Canvas", false, "Reloaded graph with id %s is not valid", asset.GetId().ToString().data()); - return; - } - - // Update data patches against the old version of the asset. - ApplyDataPatch(); - } - - void ScriptCanvasAssetNode::OnAssetUnloaded(const AZ::Data::AssetId assetId, const AZ::Data::AssetType) - { - AZ::Data::AssetBus::Handler::BusDisconnect(assetId); - } - - void ScriptCanvasAssetNode::ComputeDataPatch() - { - m_scriptCanvasAssetInstance.ComputeDataPatch(); - } - - void ScriptCanvasAssetNode::ApplyDataPatch() - { - m_scriptCanvasAssetInstance.ApplyDataPatch(); - } - - bool ScriptCanvasAssetNode::Visit(const VisitCB& preVisitCB, const VisitCB & postVisitCB) - { - AZStd::unordered_set visitedGraphs; - return Visit(preVisitCB, postVisitCB, visitedGraphs); - } - - bool ScriptCanvasAssetNode::Visit(const VisitCB& preVisitCB, const VisitCB & postVisitCB, AZStd::unordered_set& visitedGraphs) - { - const AZ::Data::AssetId& visitedAssetId = GetAsset().GetId(); - if (visitedGraphs.count(visitedAssetId) > 0) - { - AZ_Error("Script Canvas", false, "The Script Canvas Asset %s has already been visited, processing will stop", visitedAssetId.ToString().data()); - return false; - } - - if (!preVisitCB || preVisitCB(*this)) - { - auto graph = GetScriptCanvasEntity() ? AZ::EntityUtils::FindFirstDerivedComponent(GetScriptCanvasEntity()) : nullptr; - if (graph) - { - for (AZ::Entity* nodeEntity : graph->GetNodeEntities()) - { - if (auto childAssetNode = AZ::EntityUtils::FindFirstDerivedComponent(nodeEntity)) - { - // Visit ScriptCanvasAssetNodes that are in the asset referenced by @assetNode - if (!childAssetNode->Visit(preVisitCB, postVisitCB, visitedGraphs)) - { - break; - } - - } - } - } - } - - // Visit siblings ScriptCanvasAssetNodes - bool visitSiblings = !postVisitCB || postVisitCB(*this); - visitedGraphs.insert(visitedAssetId); - return visitSiblings; - } -} diff --git a/Gems/ScriptCanvas/Code/Editor/Nodes/ScriptCanvasAssetNode.h b/Gems/ScriptCanvas/Code/Editor/Nodes/ScriptCanvasAssetNode.h deleted file mode 100644 index 8d3a5bf3d8..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Nodes/ScriptCanvasAssetNode.h +++ /dev/null @@ -1,92 +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 -#include -#include - -namespace ScriptCanvasEditor -{ - //! A group of entities in a scene - class ScriptCanvasAssetNode - : public ScriptCanvas::Node - , protected AZ::Data::AssetBus::Handler - { - public: - AZ_COMPONENT(ScriptCanvasAssetNode, "{65A34956-B6ED-4EB2-966C-5BC844F7B05E}", ScriptCanvas::Node); - - static void Reflect(AZ::ReflectContext* context); - - ScriptCanvasAssetNode() = default; - ScriptCanvasAssetNode(const AZ::Data::Asset& scriptCanvasAsset, bool storeAssetDataInternally); - ~ScriptCanvasAssetNode() override; - - // AZ::Component - static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) - { - provided.push_back(AZ_CRC("ScriptCanvas_AssetService", 0x17a357ae)); - } - - static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible) - { - incompatible.push_back(AZ_CRC("ScriptCanvas_AssetService", 0x17a357ae)); - } - - static void GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent) - { - (void)dependent; - } - - static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required) - { - (void)required; - } - //// - - void OnInit() override; - - // Retrieves the asset associated with this node - AZ::Data::Asset& GetAsset(); - const AZ::Data::Asset& GetAsset() const; - // Sets the asset associated with this node - void SetAsset(const AZ::Data::Asset& scriptCanvasAsset); - - bool GetAssetDataStoredInternally() const; - void SetAssetDataStoredInternally(bool storeInObjectStream); - - ScriptCanvas::ScriptCanvasData& GetScriptCanvasData(); - const ScriptCanvas::ScriptCanvasData& GetScriptCanvasData() const; - - AZ::Entity* GetScriptCanvasEntity() const; - - using VisitCB = AZStd::function; - bool Visit(const VisitCB& preVisitCB, const VisitCB & postVisitCB); - bool Visit(const VisitCB& preVisitCB, const VisitCB & postVisitCB, AZStd::unordered_set& visitedGraphs); - //// - - protected: - void OnInputSignal(const ScriptCanvas::SlotId&) override; - // AssetBus::Handler - void OnAssetReloaded(AZ::Data::Asset asset) override; - void OnAssetUnloaded(const AZ::Data::AssetId assetId, const AZ::Data::AssetType) override; - //// - - friend class ScriptCanvasAssetNodeEventHandler; - void ComputeDataPatch(); - void ApplyDataPatch(); - - private: - ScriptCanvasAssetNode(const ScriptCanvasAssetNode&) = delete; - //! References to the Script Canvas asset used by this component - ScriptCanvasAssetInstance m_scriptCanvasAssetInstance; - }; -} diff --git a/Gems/ScriptCanvas/Code/Editor/ReflectComponent.cpp b/Gems/ScriptCanvas/Code/Editor/ReflectComponent.cpp index a90e3a9fd5..435aa27331 100644 --- a/Gems/ScriptCanvas/Code/Editor/ReflectComponent.cpp +++ b/Gems/ScriptCanvas/Code/Editor/ReflectComponent.cpp @@ -13,10 +13,6 @@ #include #include -#include -#include - -#include #include #include @@ -36,12 +32,9 @@ namespace ScriptCanvasEditor void ReflectComponent::Reflect(AZ::ReflectContext* context) { ScriptCanvas::ScriptCanvasData::Reflect(context); - ScriptCanvasAssetReference::Reflect(context); - ScriptCanvasAssetInstance::Reflect(context); ScriptCanvasAssetHolder::Reflect(context); EditorSettings::EditorWorkspace::Reflect(context); EditorSettings::ScriptCanvasEditorSettings::Reflect(context); - Library::Editor::Reflect(context); LiveLoggingUserSettings::Reflect(context); UndoData::Reflect(context); @@ -59,7 +52,6 @@ namespace ScriptCanvasEditor CreateEBusHandlerMimeEvent::Reflect(context); CreateEBusHandlerEventMimeEvent::Reflect(context); CreateEBusSenderMimeEvent::Reflect(context); - CreateEntityRefNodeMimeEvent::Reflect(context); CreateGetVariableNodeMimeEvent::Reflect(context); CreateSetVariableNodeMimeEvent::Reflect(context); CreateVariableChangedNodeMimeEvent::Reflect(context); diff --git a/Gems/ScriptCanvas/Code/Editor/ScriptCanvasEditorGem.cpp b/Gems/ScriptCanvas/Code/Editor/ScriptCanvasEditorGem.cpp index 7a9d917c52..588e1cf1d0 100644 --- a/Gems/ScriptCanvas/Code/Editor/ScriptCanvasEditorGem.cpp +++ b/Gems/ScriptCanvas/Code/Editor/ScriptCanvasEditorGem.cpp @@ -35,7 +35,6 @@ #include #include -#include #include #include @@ -53,7 +52,6 @@ #include #include #include -#include #include #include #include @@ -108,7 +106,6 @@ namespace ScriptCanvas ScriptCanvasEditor::ScriptEventReceiverNodeDescriptorComponent::CreateDescriptor(), ScriptCanvasEditor::ScriptEventSenderNodeDescriptorComponent::CreateDescriptor(), ScriptCanvasEditor::EBusSenderNodeDescriptorComponent::CreateDescriptor(), - ScriptCanvasEditor::EntityRefNodeDescriptorComponent::CreateDescriptor(), ScriptCanvasEditor::VariableNodeDescriptorComponent::CreateDescriptor(), ScriptCanvasEditor::GetVariableNodeDescriptorComponent::CreateDescriptor(), ScriptCanvasEditor::SetVariableNodeDescriptorComponent::CreateDescriptor(), @@ -117,10 +114,6 @@ namespace ScriptCanvas ScriptCanvasEditor::FunctionDefinitionNodeDescriptorComponent::CreateDescriptor(), ScriptCanvasEditor::NodelingDescriptorComponent::CreateDescriptor() }); - - auto libraryDescriptors = ScriptCanvasEditor::GetLibraryDescriptors(); - m_descriptors.insert(m_descriptors.end(), libraryDescriptors.begin(), libraryDescriptors.end()); - ScriptCanvasEditor::Library::Editor::InitNodeRegistry(GetNodeRegistry().Get()); } AZ::ComponentTypeList ScriptCanvasModule::GetRequiredSystemComponents() const diff --git a/Gems/ScriptCanvas/Code/Editor/SystemComponent.cpp b/Gems/ScriptCanvas/Code/Editor/SystemComponent.cpp index 6ab9c9b640..a451787ede 100644 --- a/Gems/ScriptCanvas/Code/Editor/SystemComponent.cpp +++ b/Gems/ScriptCanvas/Code/Editor/SystemComponent.cpp @@ -47,8 +47,6 @@ #include #include -#include - namespace ScriptCanvasEditor { static const size_t cs_jobThreads = 1; @@ -332,12 +330,6 @@ namespace ScriptCanvasEditor isScriptCanvasAsset = true; } - ScriptCanvasFunctionDescription scriptCanvasFunctionAssetDescription; - if (!isScriptCanvasAsset && AZStd::wildcard_match(AZStd::string::format("*%s", scriptCanvasFunctionAssetDescription.GetExtensionImpl()).c_str(), fullSourceFileName)) - { - isScriptCanvasAsset = true; - } - if (isScriptCanvasAsset) { auto scriptCanvasEditorCallback = [this]([[maybe_unused]] const char* fullSourceFileNameInCall, const AZ::Uuid& sourceUUIDInCall) @@ -412,7 +404,7 @@ namespace ScriptCanvasEditor nullptr, [this](const AZ::Data::AssetId, const AZ::Data::AssetInfo& assetInfo) { - if (assetInfo.m_assetType == azrtti_typeid() || assetInfo.m_assetType == azrtti_typeid()) + if (assetInfo.m_assetType == azrtti_typeid()) { AddAssetToUpgrade(assetInfo); } @@ -456,11 +448,7 @@ namespace ScriptCanvasEditor if (query == m_assetsToConvert.end()) { - if (assetInfo.m_assetType == azrtti_typeid()) - { - m_assetsToConvert.push_front(assetInfo); - } - else if (assetInfo.m_assetType == azrtti_typeid()) + if (assetInfo.m_assetType == azrtti_typeid()) { m_assetsToConvert.push_back(assetInfo); } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/FunctionNodePaletteTreeItemTypes.h b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/FunctionNodePaletteTreeItemTypes.h index 26b2eb27d6..8ae511934c 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/FunctionNodePaletteTreeItemTypes.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/FunctionNodePaletteTreeItemTypes.h @@ -15,9 +15,6 @@ #include #include - -#include - #include #include diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp index 787d881318..0dada0f7aa 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp @@ -23,7 +23,6 @@ #include #include -#include #include #include #include @@ -342,12 +341,6 @@ namespace continue; } - // Detect primitive types os we avoid making nodes out of them. - // Or anything that is 'pure data' and should be populated through a different mechanism. - if (nodeClassData->m_azRtti && nodeClassData->m_azRtti->IsTypeOf()) - { - continue; - } // Skip over some of our more dynamic nodes that we want to populate using different means else if (nodeClassData->m_azRtti && nodeClassData->m_azRtti->IsTypeOf()) { @@ -1323,56 +1316,6 @@ namespace ScriptCanvasEditor return identifiers; } - AZStd::vector NodePaletteModel::RegisterFunctionInformation(ScriptCanvasFunctionAsset* functionAsset) - { - const AZ::Data::AssetId& assetId = functionAsset->GetId(); - - FunctionNodeModelInformation* modelInformation = aznew FunctionNodeModelInformation(); - - modelInformation->m_functionAssetId = assetId; - modelInformation->m_titlePaletteOverride = "FunctionNodeTitlePalette"; - modelInformation->m_nodeIdentifier = ScriptCanvas::NodeUtils::ConstructFunctionNodeIdentifier(assetId); - - // Temporary until I drive data from the function asset itself - AZStd::string rootPath; - AZ::Data::AssetInfo assetInfo = AssetHelpers::GetAssetInfo(assetId, rootPath); - AZStd::string absolutePath; - - AzFramework::StringFunc::Path::Join(rootPath.c_str(), assetInfo.m_relativePath.c_str(), absolutePath); - - AZStd::string category = "User Functions"; - AZStd::string relativePath; - - if (AzFramework::StringFunc::Path::GetFolderPath(assetInfo.m_relativePath.c_str(), relativePath)) - { - AZStd::to_lower(relativePath.begin(), relativePath.end()); - - const AZStd::string root = "scriptcanvas/functions/"; - if (relativePath.starts_with(root)) - { - relativePath = relativePath.substr(root.size(), relativePath.size() - root.size()); - } - - category.append("/"); - category.append(relativePath); - } - - modelInformation->m_categoryPath = category; - - AzFramework::StringFunc::Path::Normalize(absolutePath); - - AzFramework::StringFunc::Path::GetFileName(absolutePath.c_str(), modelInformation->m_displayName); - //// - - m_registeredNodes.emplace(AZStd::make_pair(modelInformation->m_nodeIdentifier, modelInformation)); - m_assetMapping.insert(AZStd::make_pair(assetId, modelInformation->m_nodeIdentifier)); - - AZStd::vector nodeTypeIdentifiers; - nodeTypeIdentifiers.push_back(modelInformation->m_nodeIdentifier); - - return nodeTypeIdentifiers; - } - void NodePaletteModel::RegisterCategoryInformation(const AZStd::string& category, const CategoryInformation& categoryInformation) { auto categoryIter = m_categoryInformation.find(category); @@ -1559,24 +1502,6 @@ namespace ScriptCanvasEditor AZ_TracePrintf("NodePaletteModel", "Could not refresh node palette properly, the asset failed to load correctly."); } } - else if (productEntry->GetAssetType() == azrtti_typeid()) - { - const AZ::Data::AssetId& assetId = productEntry->GetAssetId(); - - auto functionAsset = AZ::Data::AssetManager::Instance().GetAsset(assetId, azrtti_typeid(), AZ::Data::AssetLoadBehavior::PreLoad); - functionAsset.BlockUntilLoadComplete(); - - if (functionAsset.IsReady()) - { - ScriptCanvasFunctionAsset* data = functionAsset.GetAs(); - - return RegisterFunctionInformation(data); - } - else - { - AZ_TracePrintf("NodePaletteModel", "Could not refresh node palette properly, the asset failed to load correctly."); - } - } } } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.h b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.h index 2286e8e453..03da4cea27 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.h @@ -22,7 +22,6 @@ #include -#include #include #include @@ -87,7 +86,6 @@ namespace ScriptCanvasEditor // Asset Based Registrations AZStd::vector RegisterScriptEvent(ScriptEvents::ScriptEventsAsset* scriptEventAsset); - AZStd::vector RegisterFunctionInformation(ScriptCanvasFunctionAsset* functionAsset); void RegisterCategoryInformation(const AZStd::string& category, const CategoryInformation& categoryInformation); const CategoryInformation* FindCategoryInformation(const AZStd::string& categoryStyle) const; diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/SpecializedNodePaletteTreeItemTypes.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/SpecializedNodePaletteTreeItemTypes.cpp index f0290eef10..0f97741060 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/SpecializedNodePaletteTreeItemTypes.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/SpecializedNodePaletteTreeItemTypes.cpp @@ -24,51 +24,9 @@ #include "Editor/GraphCanvas/GraphCanvasEditorNotificationBusId.h" #include -#include namespace ScriptCanvasEditor { - ///////////////////////////////// - // CreateEntityRefNodeMimeEvent - ///////////////////////////////// - - void CreateEntityRefNodeMimeEvent::Reflect(AZ::ReflectContext* reflectContext) - { - AZ::SerializeContext* serializeContext = azrtti_cast(reflectContext); - - if (serializeContext) - { - serializeContext->Class() - ->Version(0) - ->Field("EntityId", &CreateEntityRefNodeMimeEvent::m_entityId) - ; - } - } - - CreateEntityRefNodeMimeEvent::CreateEntityRefNodeMimeEvent(const AZ::EntityId& entityId) - : m_entityId(entityId) - { - } - - ScriptCanvasEditor::NodeIdPair CreateEntityRefNodeMimeEvent::CreateNode(const ScriptCanvas::ScriptCanvasId& scriptCanvasId) const - { - return Nodes::CreateEntityNode(m_entityId, scriptCanvasId); - } - - ///////////////////////////////// - // EntityRefNodePaletteTreeItem - ///////////////////////////////// - - EntityRefNodePaletteTreeItem::EntityRefNodePaletteTreeItem(AZStd::string_view nodeName, [[maybe_unused]] const QString& iconPath) - : DraggableNodePaletteTreeItem(nodeName, ScriptCanvasEditor::AssetEditorId) - { - } - - GraphCanvas::GraphCanvasMimeEvent* EntityRefNodePaletteTreeItem::CreateMimeEvent() const - { - return aznew CreateEntityRefNodeMimeEvent(); - } - /////////////////////////////// // CreateCommentNodeMimeEvent /////////////////////////////// diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/SpecializedNodePaletteTreeItemTypes.h b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/SpecializedNodePaletteTreeItemTypes.h index 5f623e4c56..bf02a3455d 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/SpecializedNodePaletteTreeItemTypes.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/SpecializedNodePaletteTreeItemTypes.h @@ -11,39 +11,6 @@ namespace ScriptCanvasEditor { - // - class CreateEntityRefNodeMimeEvent - : public CreateNodeMimeEvent - { - public: - AZ_RTTI(CreateEntityRefNodeMimeEvent, "{20CD5AF5-216E-4A41-9630-191C2803899B}", CreateNodeMimeEvent); - AZ_CLASS_ALLOCATOR(CreateEntityRefNodeMimeEvent, AZ::SystemAllocator, 0); - - static void Reflect(AZ::ReflectContext* reflectContext); - - CreateEntityRefNodeMimeEvent() = default; - CreateEntityRefNodeMimeEvent(const AZ::EntityId& entityId); - ~CreateEntityRefNodeMimeEvent() = default; - - protected: - ScriptCanvasEditor::NodeIdPair CreateNode(const ScriptCanvas::ScriptCanvasId& scriptCanvasId) const override; - - private: - AZ::EntityId m_entityId; - }; - - class EntityRefNodePaletteTreeItem - : public GraphCanvas::DraggableNodePaletteTreeItem - { - public: - AZ_CLASS_ALLOCATOR(EntityRefNodePaletteTreeItem, AZ::SystemAllocator, 0); - EntityRefNodePaletteTreeItem(AZStd::string_view nodeName, const QString& iconPath); - ~EntityRefNodePaletteTreeItem() = default; - - GraphCanvas::GraphCanvasMimeEvent* CreateMimeEvent() const override; - }; - // - // class CreateCommentNodeMimeEvent : public SpecializedCreateNodeMimeEvent diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/VariableNodePaletteTreeItemTypes.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/VariableNodePaletteTreeItemTypes.cpp index 3c37de8386..054158bcde 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/VariableNodePaletteTreeItemTypes.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/VariableNodePaletteTreeItemTypes.cpp @@ -30,8 +30,6 @@ #include "Editor/Include/ScriptCanvas/GraphCanvas/NodeDescriptorBus.h" #include -#include -#include #include #include diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/ScriptCanvasNodePaletteDockWidget.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/ScriptCanvasNodePaletteDockWidget.cpp index cfe719114f..3afa9100d0 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/ScriptCanvasNodePaletteDockWidget.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/ScriptCanvasNodePaletteDockWidget.cpp @@ -60,7 +60,6 @@ #include #include #include -#include #include #include #include @@ -224,7 +223,7 @@ namespace ScriptCanvasEditor void ScriptCanvasRootPaletteTreeItem::SetActiveScriptCanvasId(const ScriptCanvas::ScriptCanvasId& scriptCanvasId) { - ScriptCanvas::RuntimeRequestBus::EventResult(m_previousAssetId, scriptCanvasId, &ScriptCanvas::RuntimeRequests::GetAssetId); + ScriptCanvas::GraphRequestBus::EventResult(m_previousAssetId, scriptCanvasId, &ScriptCanvas::GraphRequests::GetAssetId); for (auto functionTreePair : m_globalFunctionTreeItems) { diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/StatisticsDialog/ScriptCanvasStatisticsDialog.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/StatisticsDialog/ScriptCanvasStatisticsDialog.cpp index caa39d4ca4..7aa03224e4 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/StatisticsDialog/ScriptCanvasStatisticsDialog.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/StatisticsDialog/ScriptCanvasStatisticsDialog.cpp @@ -16,7 +16,6 @@ #include #include -#include #include namespace @@ -181,8 +180,7 @@ namespace ScriptCanvasEditor { AZ::Data::AssetInfo assetInfo; AZ::Data::AssetCatalogRequestBus::BroadcastResult(assetInfo, &AZ::Data::AssetCatalogRequestBus::Events::GetAssetInfoById, assetId); - if (assetInfo.m_assetType == azrtti_typeid() - || assetInfo.m_assetType == azrtti_typeid()) + if (assetInfo.m_assetType == azrtti_typeid()) { m_scriptCanvasAssetTreeRoot->RegisterAsset(assetId, assetInfo.m_assetType); } @@ -197,8 +195,7 @@ namespace ScriptCanvasEditor { AZ::Data::AssetInfo assetInfo; AZ::Data::AssetCatalogRequestBus::BroadcastResult(assetInfo, &AZ::Data::AssetCatalogRequestBus::Events::GetAssetInfoById, assetId); - if (assetInfo.m_assetType == azrtti_typeid() - || assetInfo.m_assetType == azrtti_typeid()) + if (assetInfo.m_assetType == azrtti_typeid()) { m_scriptCanvasAssetTreeRoot->RemoveAsset(assetId); } @@ -440,8 +437,7 @@ namespace ScriptCanvasEditor { const AzToolsFramework::AssetBrowser::ProductAssetBrowserEntry* productEntry = static_cast(entry); - if (productEntry->GetAssetType() == azrtti_typeid() - || productEntry->GetAssetType() == azrtti_typeid()) + if (productEntry->GetAssetType() == azrtti_typeid()) { const AZ::Data::AssetId& assetId = productEntry->GetAssetId(); diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/GraphVariablesTableView.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/GraphVariablesTableView.cpp index b6062423ee..95e782c137 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/GraphVariablesTableView.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/GraphVariablesTableView.cpp @@ -31,7 +31,6 @@ #include #include #include -#include #include #include @@ -722,7 +721,7 @@ namespace ScriptCanvasEditor ScriptCanvas::GraphVariableManagerNotificationBus::Handler::BusDisconnect(); m_assetType = AZ::Data::AssetType::CreateNull(); - ScriptCanvas::RuntimeRequestBus::EventResult(m_assetType, scriptCanvasId, &ScriptCanvas::RuntimeRequests::GetAssetType); + ScriptCanvas::GraphRequestBus::EventResult(m_assetType, scriptCanvasId, &ScriptCanvas::GraphRequests::GetAssetType); m_scriptCanvasId = scriptCanvasId; @@ -1054,9 +1053,6 @@ namespace ScriptCanvasEditor AZ::SerializeContext* serializeContext = AZ::EntityUtils::GetApplicationSerializeContext(); AZ::Utils::LoadObjectFromBufferInPlace(byteArray.constData(), static_cast(byteArray.size()), copiedVariableData, serializeContext); - bool isRuntimeGraph = false; - EditorGraphRequestBus::EventResult(isRuntimeGraph, scriptCanvasId, &EditorGraphRequests::IsRuntimeGraph); - ScriptCanvas::GraphVariableManagerRequests* requests = ScriptCanvas::GraphVariableManagerRequestBus::FindFirstHandler(scriptCanvasId); if (requests == nullptr) diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/SlotTypeSelectorWidget.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/SlotTypeSelectorWidget.cpp index 2d23b942df..f98c896f69 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/SlotTypeSelectorWidget.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/SlotTypeSelectorWidget.cpp @@ -50,7 +50,6 @@ #include #include -#include #include #include diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/VariableDockWidget.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/VariableDockWidget.cpp index d88c16ba24..a6ae834f3e 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/VariableDockWidget.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/VariableDockWidget.cpp @@ -50,7 +50,6 @@ #include #include -#include #include #include @@ -757,9 +756,9 @@ namespace ScriptCanvasEditor AZStd::vector selection; - ScriptCanvas::RuntimeRequests* runtimeRequests = ScriptCanvas::RuntimeRequestBus::FindFirstHandler(m_scriptCanvasId); + auto owningGraph = ScriptCanvas::GraphRequestBus::FindFirstHandler(m_scriptCanvasId); - if (runtimeRequests == nullptr) + if (owningGraph == nullptr) { return; } @@ -770,7 +769,7 @@ namespace ScriptCanvasEditor if (propertiesComponent) { - ScriptCanvas::GraphVariable* graphVariable = runtimeRequests->FindVariableById(varId);; + ScriptCanvas::GraphVariable* graphVariable = owningGraph->FindVariableById(varId);; propertiesComponent->SetVariable(graphVariable); selection.push_back(propertiesComponent->GetEntityId()); diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.cpp b/Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.cpp index fcbd1a1680..7c6c161246 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.cpp @@ -150,8 +150,6 @@ #include #include -#include -#include #include #include @@ -264,14 +262,7 @@ namespace ScriptCanvasEditor if (editorRequests) { - if (editorRequests->IsFunctionGraph()) - { - assetSaveData.m_assetType = azrtti_typeid(); - } - else - { - assetSaveData.m_assetType = azrtti_typeid(); - } + assetSaveData.m_assetType = azrtti_typeid(); } activeAssets.push_back(assetSaveData); @@ -1303,8 +1294,7 @@ namespace ScriptCanvasEditor return AZ::Failure(AZStd::string("Unknown AssetId")); } - if (assetInfo.m_assetType != azrtti_typeid() && - assetInfo.m_assetType != azrtti_typeid()) + if (assetInfo.m_assetType != azrtti_typeid()) { return AZ::Failure(AZStd::string("Invalid AssetId provided, it's not a Script Canvas supported type")); } @@ -3680,10 +3670,6 @@ namespace ScriptCanvasEditor { buttonEnabled = false; } - else - { - EditorGraphRequestBus::EventResult(buttonEnabled, GetActiveScriptCanvasId(), &EditorGraphRequests::IsRuntimeGraph); - } m_assignToSelectedEntity->setEnabled(buttonEnabled); } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/ScriptCanvasContextMenus.cpp b/Gems/ScriptCanvas/Code/Editor/View/Windows/ScriptCanvasContextMenus.cpp index 95386c7e55..716c498b56 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/ScriptCanvasContextMenus.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/ScriptCanvasContextMenus.cpp @@ -55,59 +55,6 @@ namespace ScriptCanvasEditor { - ////////////////////////////// - // AddSelectedEntitiesAction - ////////////////////////////// - - AddSelectedEntitiesAction::AddSelectedEntitiesAction(QObject* parent) - : GraphCanvas::ContextMenuAction("", parent) - { - } - - GraphCanvas::ActionGroupId AddSelectedEntitiesAction::GetActionGroupId() const - { - return AZ_CRC("EntityActionGroup", 0x17e16dfe); - } - - void AddSelectedEntitiesAction::RefreshAction(const GraphCanvas::GraphId&, const AZ::EntityId&) - { - AzToolsFramework::EntityIdList selectedEntities; - AzToolsFramework::ToolsApplicationRequests::Bus::BroadcastResult(selectedEntities, &AzToolsFramework::ToolsApplicationRequests::GetSelectedEntities); - - setEnabled(!selectedEntities.empty()); - - if (selectedEntities.size() <= 1) - { - setText("Reference selected entity"); - } - else - { - setText("Reference selected entities"); - } - } - - GraphCanvas::ContextMenuAction::SceneReaction AddSelectedEntitiesAction::TriggerAction(const AZ::EntityId& graphCanvasGraphId, const AZ::Vector2& scenePos) - { - AzToolsFramework::EntityIdList selectedEntities; - AzToolsFramework::ToolsApplicationRequests::Bus::BroadcastResult(selectedEntities, &AzToolsFramework::ToolsApplicationRequests::GetSelectedEntities); - - ScriptCanvas::ScriptCanvasId scriptCanvasId; - GeneralRequestBus::BroadcastResult(scriptCanvasId, &GeneralRequests::GetScriptCanvasId, graphCanvasGraphId); - - GraphCanvas::SceneRequestBus::Event(graphCanvasGraphId, &GraphCanvas::SceneRequests::ClearSelection); - - AZ::Vector2 addPosition = scenePos; - - for (const AZ::EntityId& id : selectedEntities) - { - NodeIdPair nodePair = Nodes::CreateEntityNode(id, scriptCanvasId); - GraphCanvas::SceneRequestBus::Event(graphCanvasGraphId, &GraphCanvas::SceneRequests::AddNode, nodePair.m_graphCanvasId, addPosition, false); - addPosition += AZ::Vector2(20, 20); - } - - return GraphCanvas::ContextMenuAction::SceneReaction::PostUndo; - } - //////////////////////////// // EndpointSelectionAction //////////////////////////// @@ -860,12 +807,6 @@ namespace ScriptCanvasEditor { const bool inContextMenu = true; Widget::ScriptCanvasNodePaletteConfig paletteConfig(paletteModel, assetModel, inContextMenu); - - m_addSelectedEntitiesAction = aznew AddSelectedEntitiesAction(this); - - AddActionGroup(m_addSelectedEntitiesAction->GetActionGroupId()); - AddMenuAction(m_addSelectedEntitiesAction); - AddNodePaletteMenuAction(paletteConfig); } @@ -905,8 +846,6 @@ namespace ScriptCanvasEditor m_graphCanvasConstructGroups.SetCommentsEnabled(false); m_nodeGroupPresets.SetEnabled(false); m_alignmentActionsGroups.SetEnabled(false); - - m_addSelectedEntitiesAction->setEnabled(false); } ////////////////////////// diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/ScriptCanvasContextMenus.h b/Gems/ScriptCanvas/Code/Editor/View/Windows/ScriptCanvasContextMenus.h index 01029e0be1..116f9f4ced 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/ScriptCanvasContextMenus.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/ScriptCanvasContextMenus.h @@ -32,22 +32,6 @@ namespace ScriptCanvasEditor // CustomActions ////////////////// - class AddSelectedEntitiesAction - : public GraphCanvas::ContextMenuAction - { - Q_OBJECT - public: - AZ_CLASS_ALLOCATOR(AddSelectedEntitiesAction, AZ::SystemAllocator, 0); - - AddSelectedEntitiesAction(QObject* parent); - virtual ~AddSelectedEntitiesAction() = default; - - GraphCanvas::ActionGroupId GetActionGroupId() const override; - - void RefreshAction(const GraphCanvas::GraphId& graphCanvasGraphId, const AZ::EntityId& targetId) override; - SceneReaction TriggerAction(const GraphCanvas::GraphId& graphCanvasGraphId, const AZ::Vector2& scenePos) override; - }; - class EndpointSelectionAction : public QAction { @@ -217,8 +201,6 @@ namespace ScriptCanvasEditor protected: AZ::EntityId m_sourceSlotId; - - AddSelectedEntitiesAction* m_addSelectedEntitiesAction; }; class ConnectionContextMenu diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/UpgradeHelper.cpp b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/UpgradeHelper.cpp index e35435f5dd..382f2a6784 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/UpgradeHelper.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/UpgradeHelper.cpp @@ -16,8 +16,6 @@ #include "UpgradeHelper.h" -#include - #include #include #include diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/UpgradeTool.cpp b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/UpgradeTool.cpp index 02fb5b567d..c3ccd3105c 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/UpgradeTool.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/UpgradeTool.cpp @@ -12,8 +12,6 @@ #include "UpgradeTool.h" -#include - #include #include #include @@ -284,10 +282,6 @@ namespace ScriptCanvasEditor { tmpFilesaved = AZ::Utils::SaveObjectToStream(fileStream, AZ::DataStream::ST_XML, &asset.GetAs()->GetScriptCanvasData()); } - else if (asset.GetType() == azrtti_typeid()) - { - tmpFilesaved = AZ::Utils::SaveObjectToStream(fileStream, AZ::DataStream::ST_XML, &asset.GetAs()->GetScriptCanvasData()); - } fileStream.Close(); } @@ -708,10 +702,6 @@ namespace ScriptCanvasEditor { scriptCanvasEntity = UpgradeGraph(asset, this); } - else if (asset.GetType() == azrtti_typeid()) - { - scriptCanvasEntity = UpgradeGraph(asset, this); - } if (!scriptCanvasEntity) { diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/VersionExplorer.cpp b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/VersionExplorer.cpp index 9ec399f616..4bee3ab351 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/VersionExplorer.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/VersionExplorer.cpp @@ -16,8 +16,6 @@ #include "VersionExplorer.h" -#include - #include #include #include @@ -323,10 +321,6 @@ namespace ScriptCanvasEditor { m_scriptCanvasEntity = UpgradeGraphProcess(asset, this); } - else if (asset.GetType() == azrtti_typeid()) - { - m_scriptCanvasEntity = UpgradeGraphProcess(asset, this); - } if (!m_scriptCanvasEntity) { @@ -358,10 +352,6 @@ namespace ScriptCanvasEditor { tmpFilesaved = AZ::Utils::SaveObjectToStream(fileStream, AZ::DataStream::ST_XML, &asset.GetAs()->GetScriptCanvasData()); } - else if (asset.GetType() == azrtti_typeid()) - { - tmpFilesaved = AZ::Utils::SaveObjectToStream(fileStream, AZ::DataStream::ST_XML, &asset.GetAs()->GetScriptCanvasData()); - } fileStream.Close(); } @@ -647,17 +637,6 @@ namespace ScriptCanvasEditor scriptCanvasEntity = scriptCanvasAsset->GetScriptCanvasEntity(); AZ_Assert(scriptCanvasEntity, "The Script Canvas asset must have a valid entity"); } - else if (asset.GetType() == azrtti_typeid()) - { - ScriptCanvasFunctionAsset* scriptCanvasAsset = asset.GetAs(); - if (!scriptCanvasAsset) - { - return; - } - - scriptCanvasEntity = scriptCanvasAsset->GetScriptCanvasEntity(); - AZ_Assert(scriptCanvasEntity, "The Script Canvas asset must have a valid entity"); - } auto graphComponent = scriptCanvasEntity->FindComponent(); AZ_Assert(graphComponent, "The Script Canvas entity must have a Graph component"); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/Functions/ScriptCanvasFunctionAsset.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/Functions/ScriptCanvasFunctionAsset.h deleted file mode 100644 index 58c99e719e..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/Functions/ScriptCanvasFunctionAsset.h +++ /dev/null @@ -1,145 +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 - -#include - -namespace AZ -{ - class Entity; -} - -namespace ScriptCanvasEditor -{ - class ScriptCanvasFunctionAsset; - class Graph; - - class ScriptCanvasFunctionDescription : public ScriptCanvas::AssetDescription - { - public: - - AZ_TYPE_INFO(ScriptCanvasFunctionDescription, "{B53569F6-8408-40FC-9A72-ED873BEF162E}"); - - ScriptCanvasFunctionDescription() - : AssetDescription( - azrtti_typeid(), - "Script Canvas Function", - "Script Canvas Function Graph Asset", - "@devassets@/scriptcanvas/functions", - ".scriptcanvas_fn", - "Script Canvas Function", - "Untitled-Function-%i", - "Script Canvas Function Files (*.scriptcanvas_fn)", - "Script Canvas Function", - "Script Canvas Function", - "Icons/ScriptCanvas/Viewport/ScriptCanvas_Function.png", - AZ::Color(0.192f, 0.149f, 0.392f, 1.0f), - true - ) - {} - }; - - // TODO-LS: move these to their own file - class ScriptCanvasDataRequests : public AZ::ComponentBus - { - public: - - virtual void SetPrettyName(const char* name) = 0; - virtual AZStd::string GetPrettyName() = 0; - }; - - using ScriptCanvasDataRequestBus = AZ::EBus; - - - class ScriptCanvasFunctionDataComponent - : public AZ::Component - , ScriptCanvasDataRequestBus::MultiHandler - { - public: - AZ_COMPONENT(ScriptCanvasFunctionDataComponent, "{440BB6DC-4E70-4304-A926-252925F77433}"); - - void Activate() override - { - AZ::EntityId entityId = GetEntityId(); - ScriptCanvasDataRequestBus::MultiHandler::BusConnect(entityId); - } - - void Deactivate() override - { - ScriptCanvasDataRequestBus::MultiHandler::BusDisconnect(); - - AZ::EntityId entityId = GetEntityId(); - } - - void SetPrettyName(const char* name) override - { - m_assetPrettyName = name; - } - - AZStd::string GetPrettyName() override - { - return m_assetPrettyName; - } - - static void Reflect(AZ::ReflectContext* reflectContext) - { - if (auto serializeContext = azrtti_cast(reflectContext)) - { - serializeContext->Class() - ->Version(2) - ->Field("m_assetPrettyName", &ScriptCanvasFunctionDataComponent::m_assetPrettyName) - ->Field("m_version", &ScriptCanvasFunctionDataComponent::m_functionDataComponentVersion) - ; - } - } - - size_t m_functionDataComponentVersion = 0; - AZStd::string m_assetPrettyName; - }; - - class ScriptCanvasFunctionAsset - : public ScriptCanvas::ScriptCanvasAssetBase - { - public: - AZ_RTTI(ScriptCanvasFunctionAsset, "{ED078D3C-938D-41F8-A5F6-CC04311ECF4F}", ScriptCanvasAssetBase); - AZ_CLASS_ALLOCATOR(ScriptCanvasFunctionAsset, AZ::SystemAllocator, 0); - - ScriptCanvasFunctionAsset(const AZ::Data::AssetId& assetId = AZ::Data::AssetId(AZ::Uuid::CreateRandom()), AZ::Data::AssetData::AssetStatus status = AZ::Data::AssetData::AssetStatus::NotLoaded) - : ScriptCanvasAssetBase(assetId, status) - { - m_data = aznew ScriptCanvas::ScriptCanvasData(); - } - - ~ScriptCanvasFunctionAsset() override - {} - - ScriptCanvas::AssetDescription GetAssetDescription() const override - { - return ScriptCanvasFunctionDescription(); - } - - using Description = ScriptCanvasFunctionDescription; - - ScriptCanvasFunctionDataComponent* m_cachedComponent = nullptr; - - ScriptCanvasFunctionDataComponent* GetFunctionData() - { - if (m_cachedComponent == nullptr) - { - m_cachedComponent = GetScriptCanvasEntity()->FindComponent(); - } - - return m_cachedComponent; - } - }; - -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/Functions/RuntimeFunctionAssetHandler.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/SubgraphInterfaceAssetHandler.cpp similarity index 98% rename from Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/Functions/RuntimeFunctionAssetHandler.cpp rename to Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/SubgraphInterfaceAssetHandler.cpp index 2f20fbbabb..66d01691a8 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/Functions/RuntimeFunctionAssetHandler.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/SubgraphInterfaceAssetHandler.cpp @@ -7,7 +7,6 @@ #include #include -#include #include #include @@ -19,6 +18,7 @@ #include #include +#include namespace ScriptCanvas { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/Functions/RuntimeFunctionAssetHandler.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/SubgraphInterfaceAssetHandler.h similarity index 100% rename from Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/Functions/RuntimeFunctionAssetHandler.h rename to Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/SubgraphInterfaceAssetHandler.h diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Connection.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Connection.cpp index 2a2c055416..d97a208064 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Connection.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Connection.cpp @@ -168,7 +168,12 @@ namespace ScriptCanvas { if (nodeId == m_sourceEndpoint.GetNodeId() || nodeId == m_targetEndpoint.GetNodeId()) { - GraphRequestBus::Event(*GraphNotificationBus::GetCurrentBusId(), &GraphRequests::DisconnectById, GetEntityId()); + Slot* sourceSlot{}; + NodeRequestBus::EventResult(sourceSlot, m_sourceEndpoint.GetNodeId(), &NodeRequests::GetSlot, m_sourceEndpoint.GetSlotId()); + if (sourceSlot) + { + GraphRequestBus::Event(sourceSlot->GetNode()->GetOwningScriptCanvasId(), &GraphRequests::DisconnectById, GetEntityId()); + } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Connection.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Connection.h index 1a1c47794b..79a73b6f19 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Connection.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Connection.h @@ -60,8 +60,6 @@ namespace ScriptCanvas // GraphNotificationBus void OnNodeRemoved(const ID& nodeId) override; - void UpdateConnectionStatus(NodeUpdateSlotReport& report); - protected: //------------------------------------------------------------------------- static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Contracts.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Contracts.h index 8e2a748f0f..77ec030fec 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Contracts.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Contracts.h @@ -11,7 +11,6 @@ #include "Contracts/DisallowReentrantExecutionContract.h" #include "Contracts/DisplayGroupConnectedSlotLimitContract.h" #include "Contracts/DynamicTypeContract.h" -#include "Contracts/ExclusivePureDataContract.h" #include "Contracts/IsReferenceTypeContract.h" #include "Contracts/MathOperatorContract.h" #include "Contracts/MethodOverloadContract.h" diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Contracts/ExclusivePureDataContract.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Contracts/ExclusivePureDataContract.cpp deleted file mode 100644 index b546a4364d..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Contracts/ExclusivePureDataContract.cpp +++ /dev/null @@ -1,56 +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 "ExclusivePureDataContract.h" -#include -#include -#include -#include -#include - -namespace ScriptCanvas -{ - AZ::Outcome ExclusivePureDataContract::HasNoPureDataConnection(const Slot& dataInputSlot) const - { - bool isOnPureDataThread(true); - NodeRequestBus::EventResult(isOnPureDataThread, dataInputSlot.GetNodeId(), &NodeRequests::IsOnPureDataThread, dataInputSlot.GetId()); - - if (!isOnPureDataThread) - { - return AZ::Success(); - } - - return AZ::Failure(AZStd::string("There is already a pure data input into this slot")); - } - - AZ::Outcome ExclusivePureDataContract::OnEvaluate(const Slot& sourceSlot, const Slot& targetSlot) const - { - if (sourceSlot.GetDescriptor().CanConnectTo(targetSlot.GetDescriptor())) - { - if (sourceSlot.GetDescriptor().IsInput()) - { - return HasNoPureDataConnection(sourceSlot); - } - else if (targetSlot.GetDescriptor().IsInput()) - { - return HasNoPureDataConnection(targetSlot); - } - } - - return AZ::Failure(AZStd::string("invalid data connection attempted")); - } - - void ExclusivePureDataContract::Reflect(AZ::ReflectContext* reflection) - { - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) - { - serializeContext->Class() - ->Version(0) - ; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Contracts/ExclusivePureDataContract.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Contracts/ExclusivePureDataContract.h deleted file mode 100644 index 5e5865fb06..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Contracts/ExclusivePureDataContract.h +++ /dev/null @@ -1,30 +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 ScriptCanvas -{ - class ExclusivePureDataContract - : public Contract - { - public: - AZ_CLASS_ALLOCATOR(ExclusivePureDataContract, AZ::SystemAllocator, 0); - AZ_RTTI(ExclusivePureDataContract, "{E48A0B26-B6B7-4AF3-9341-9E5C5C1F0DE8}", Contract); - - // no multiple literals, variables, defaults, gets, or any other new form of data that can be routed without getting pushed by execution - ~ExclusivePureDataContract() override = default; - - static void Reflect(AZ::ReflectContext* reflection); - - protected: - AZ::Outcome OnEvaluate(const Slot& sourceSlot, const Slot& targetSlot) const override; - - AZ::Outcome HasNoPureDataConnection(const Slot& dataInputSlot) const; - }; -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.cpp index c2245e92ee..d4eb1cd515 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.cpp @@ -12,40 +12,32 @@ #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 -#include #include #include - +#include +#include +#include #include #include -#include #include #include @@ -58,6 +50,7 @@ namespace GraphCpp MergeScriptAssetDescriptions, VariablePanelSymantics, AddVersionData, + RemoveFunctionGraphMarker, // label your version above Current }; @@ -77,6 +70,11 @@ namespace ScriptCanvas componentElementNode.AddElementWithData(context, "m_assetType", azrtti_typeid()); } + if (componentElementNode.GetVersion() < GraphCpp::GraphVersion::RemoveFunctionGraphMarker) + { + componentElementNode.RemoveElementByName(AZ_CRC_CE("isFunctionGraph")); + } + return true; } @@ -107,18 +105,15 @@ namespace ScriptCanvas Nodes::ComparisonExpression::Reflect(context); Datum::Reflect(context); BehaviorContextObjectPtrReflect(context); - GraphData::Reflect(context); - AZ::SerializeContext* serializeContext = azrtti_cast(context); - if (serializeContext) + if (AZ::SerializeContext* serializeContext = azrtti_cast(context)) { serializeContext->Class() ->Version(GraphCpp::GraphVersion::Current, &GraphComponentVersionConverter) ->Field("m_graphData", &Graph::m_graphData) ->Field("executionMode", &Graph::m_executionMode) ->Field("m_assetType", &Graph::m_assetType) - ->Field("isFunctionGraph", &Graph::m_isFunctionGraph) ->Field("versionData", &Graph::m_versionData) ; } @@ -128,8 +123,6 @@ namespace ScriptCanvas { const auto& scriptCanvasId = GetScriptCanvasId(); GraphRequestBus::Handler::BusConnect(scriptCanvasId); - RuntimeRequestBus::Handler::BusConnect(scriptCanvasId); - ValidationRequestBus::Handler::BusConnect(scriptCanvasId); for (auto& nodeEntity : m_graphData.m_nodes) @@ -148,6 +141,7 @@ namespace ScriptCanvas } m_graphData.BuildEndpointMap(); + for (auto& connectionEntity : m_graphData.m_connections) { if (connectionEntity) @@ -159,21 +153,6 @@ namespace ScriptCanvas StatusRequestBus::Handler::BusConnect(scriptCanvasId); } - bool Graph::IsFunctionGraph() const - { - if (m_isFunctionGraph) - { - return true; - } - - return false; - } - - void Graph::MarkFunctionGraph() - { - m_isFunctionGraph = true; - } - void Graph::MarkVersion() { m_versionData.MarkLatest(); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.h index e54704e95e..bdd71a73f8 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.h @@ -19,7 +19,6 @@ #include #include #include -#include #include #include @@ -35,7 +34,6 @@ namespace ScriptCanvas class Graph : public AZ::Component , protected GraphRequestBus::Handler - , protected RuntimeRequestBus::Handler , protected StatusRequestBus::Handler , private AZ::EntityBus::Handler , private ValidationRequestBus::Handler @@ -112,9 +110,6 @@ namespace ScriptCanvas Graph* GetGraph() { return this; } - bool IsFunctionGraph() const; - void MarkFunctionGraph(); - GraphData* GetGraphData() override { return &m_graphData; } const GraphData* GetGraphDataConst() const override { return &m_graphData; } const VariableData* GetVariableDataConst() const { return const_cast(this)->GetVariableData(); } @@ -174,14 +169,12 @@ namespace ScriptCanvas void RefreshConnectionValidity(bool warnOnRemoval = false); - //// RuntimeRequestBus::Handler AZ::Data::AssetId GetAssetId() const override { return AZ::Data::AssetId(); } GraphIdentifier GetGraphIdentifier() const override { return GraphIdentifier(GetAssetId(), 0); } AZStd::string GetAssetName() const override { return ""; } AZ::EntityId GetRuntimeEntityId() const override { return GetEntity() ? GetEntityId() : AZ::EntityId(); } VariableId FindAssetVariableIdByRuntimeVariableId(VariableId runtimeId) const override { return runtimeId; } - VariableId FindRuntimeVariableIdByAssetVariableId(VariableId assetId) const override { return assetId; } AZ::EntityId FindAssetNodeIdByRuntimeNodeId(AZ::EntityId editorNode) const override { return editorNode; } AZ::EntityId FindRuntimeNodeIdByAssetNodeId(AZ::EntityId runtimeNode) const override { return runtimeNode; } @@ -190,8 +183,8 @@ namespace ScriptCanvas const GraphVariableMapping* GetVariables() const override; GraphVariable* FindVariable(AZStd::string_view propName) override; GraphVariable* FindVariableById(const VariableId& variableId) override; - Data::Type GetVariableType(const VariableId& variableId) const override; - AZStd::string_view GetVariableName(const VariableId& variableId) const override; + Data::Type GetVariableType(const VariableId& variableId) const; + AZStd::string_view GetVariableName(const VariableId& variableId) const; bool IsGraphObserved() const override; void SetIsGraphObserved(bool isObserved) override; @@ -208,7 +201,6 @@ namespace ScriptCanvas AZ::Data::AssetType m_assetType; private: - bool m_isFunctionGraph = false; ScriptCanvasId m_scriptCanvasId; ExecutionMode m_executionMode = ExecutionMode::Interpreted; VersionData m_versionData; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/GraphBus.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/GraphBus.h index c85c76e54e..111ee7f339 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/GraphBus.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/GraphBus.h @@ -11,6 +11,7 @@ #include "Endpoint.h" #include +#include #include #include @@ -23,6 +24,8 @@ namespace ScriptCanvas class Graph; class Slot; + using EndpointMapConstIterator = AZStd::unordered_multimap::const_iterator; + //! These are public graph requests class GraphRequests : public AZ::EBusTraits { @@ -51,7 +54,7 @@ namespace ScriptCanvas virtual bool FindConnection(AZ::Entity*& connectionEntity, const Endpoint& firstEndpoint, const Endpoint& otherEndpoint) const = 0; virtual Slot* FindSlot(const Endpoint& endpoint) const = 0; - + //! Retrieves the Entity this Graph component is located on //! NOTE: There can be multiple Graph components on the same entity so calling FindComponent may not not return this GraphComponent virtual AZ::Entity* GetGraphEntity() const = 0; @@ -59,7 +62,7 @@ namespace ScriptCanvas //! Retrieves the Graph Component directly using the BusId virtual Graph* GetGraph() = 0; - virtual bool Connect(const AZ::EntityId& sourceNodeId, const SlotId& sourceSlot, const AZ::EntityId& targetNodeId,const SlotId& targetSlot) = 0; + virtual bool Connect(const AZ::EntityId& sourceNodeId, const SlotId& sourceSlot, const AZ::EntityId& targetNodeId, const SlotId& targetSlot) = 0; virtual bool Disconnect(const AZ::EntityId& sourceNodeId, const SlotId& sourceSlot, const AZ::EntityId& targetNodeId, const SlotId& targetSlot) = 0; virtual bool ConnectByEndpoint(const Endpoint& sourceEndpoint, const Endpoint& targetEndpoint) = 0; @@ -88,7 +91,7 @@ namespace ScriptCanvas virtual bool AddItem(AZ::Entity* itemEntity) = 0; //! Remove item if it is on the graph virtual bool RemoveItem(AZ::Entity* itemEntity) = 0; - + //! Retrieves a pointer the GraphData structure stored on the graph virtual GraphData* GetGraphData() = 0; virtual const GraphData* GetGraphDataConst() const = 0; @@ -104,8 +107,49 @@ namespace ScriptCanvas virtual void SetIsGraphObserved(bool observed) = 0; virtual bool IsGraphObserved() const = 0; - }; + virtual VariableId FindAssetVariableIdByRuntimeVariableId(VariableId runtimeId) const = 0; + + virtual AZ::EntityId FindAssetNodeIdByRuntimeNodeId(AZ::EntityId editorNode) const = 0; + + virtual AZ::Data::AssetId GetAssetId() const = 0; + + virtual GraphIdentifier GetGraphIdentifier() const = 0; + + virtual AZStd::string GetAssetName() const = 0; + + //! Looks up the nodeId within the bus handler + virtual Node* FindNode(AZ::EntityId nodeId) const = 0; + + virtual AZ::EntityId FindRuntimeNodeIdByAssetNodeId(AZ::EntityId runtimeNode) const = 0; + + //! Returns the entity id of the execution component + virtual AZ::EntityId GetRuntimeEntityId() const = 0; + + virtual AZStd::pair< EndpointMapConstIterator, EndpointMapConstIterator > GetConnectedEndpointIterators(const Endpoint& endpoint) const = 0; + + //! Returns whether the given endpoint has any connections + virtual bool IsEndpointConnected(const Endpoint& endpoint) const = 0; + + //! Retrieves VariableData structure which manages variable data for the execution component + virtual VariableData* GetVariableData() = 0; + virtual const VariableData* GetVariableDataConst() const = 0; + + //! Retrieves a map of variable id to variable name and variable datums pair + virtual const GraphVariableMapping* GetVariables() const = 0; + + //! Searches for a variable with the specified name + //! returns pointer to the first variable with the specified name or nullptr + virtual GraphVariable* FindVariable(AZStd::string_view varName) = 0; + + //! Searches for a variable by VariableId + //! returns a pair of with the supplied id + //! The variable datum pointer is non-null if the variable has been found + virtual GraphVariable* FindVariableById(const VariableId& variableId) = 0; + + virtual AZ::Data::AssetType GetAssetType() const = 0; + + }; using GraphRequestBus = AZ::EBus; class GraphNotifications : public AZ::EBusTraits diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/ModifiableDatumView.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/ModifiableDatumView.h index 7786a1a136..a079a2932f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/ModifiableDatumView.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/ModifiableDatumView.h @@ -29,8 +29,7 @@ namespace ScriptCanvas friend class Node; friend class GraphVariable; - friend class PureData; - + public: AZ_CLASS_ALLOCATOR(ModifiableDatumView, AZ::SystemAllocator, 0); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NativeDatumNode.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NativeDatumNode.h deleted file mode 100644 index 70c30198d5..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NativeDatumNode.h +++ /dev/null @@ -1,133 +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 -#include - -namespace ScriptCanvas -{ - namespace Nodes - { - template - class NativeDatumNode - : public PureData - { - public: - using t_ThisType = NativeDatumNode; - - AZ_RTTI(((NativeDatumNode), "{B7D8D8D6-B2F1-481A-A712-B07D1C19555F}", t_Node, t_Datum), PureData, AZ::Component); - AZ_COMPONENT_INTRUSIVE_DESCRIPTOR_TYPE(NativeDatumNode); - AZ_COMPONENT_BASE(NativeDatumNode, PureData); - - static void Reflect(AZ::ReflectContext* reflection) - { - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) - { - serializeContext->Class() - ->Version(0) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("NativeDatumNode", "") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ; - } - } - } - - ~NativeDatumNode() override = default; - - protected: - virtual void ConfigureSetters() - { - Data::SetterContainer setterWrappers = Data::ExplodeToSetters(Data::FromAZType(Data::Traits::GetAZType())); - for (const auto& setterWrapperPair : setterWrappers) - { - SlotId setterSlotId; - const Data::SetterWrapper& setterWrapper = setterWrapperPair.second; - const AZStd::string argName = AZStd::string::format("%s: %s", Data::GetName(setterWrapper.m_propertyType).data(), setterWrapper.m_propertyName.data()); - AZStd::string_view argumentTooltip; - // Add the slot if it doesn't exist - setterSlotId = FindSlotIdForDescriptor(argName, SlotDescriptors::DataIn()); - - if (!setterSlotId.IsValid()) - { - DataSlotConfiguration slotConfiguration; - - slotConfiguration.m_name = argName; - slotConfiguration.m_toolTip = argumentTooltip; - slotConfiguration.SetType(setterWrapper.m_propertyType); - slotConfiguration.SetConnectionType(ConnectionType::Input); - - setterSlotId = AddSlot(slotConfiguration); - } - - if (setterSlotId.IsValid()) - { - m_propertyAccount.m_getterSetterIdPairs[setterWrapperPair.first].second = setterSlotId; - m_propertyAccount.m_settersByInputSlot.emplace(setterSlotId, setterWrapperPair.second); - } - } - } - - virtual void ConfigureGetters() - { - Data::GetterContainer getterWrappers = Data::ExplodeToGetters(Data::FromAZType(Data::Traits::GetAZType())); - for (const auto& getterWrapperPair : getterWrappers) - { - SlotId getterSlotId; - - const Data::GetterWrapper& getterWrapper = getterWrapperPair.second; - const AZStd::string resultSlotName(AZStd::string::format("%s: %s", getterWrapper.m_propertyName.data(), Data::GetName(getterWrapper.m_propertyType).data())); - // Add the slot if it doesn't exist - - getterSlotId = FindSlotIdForDescriptor(resultSlotName, SlotDescriptors::DataOut()); - - if (!getterSlotId.IsValid()) - { - DataSlotConfiguration slotConfiguration; - - slotConfiguration.m_name = resultSlotName; - slotConfiguration.SetType(getterWrapper.m_propertyType); - slotConfiguration.SetConnectionType(ConnectionType::Output); - - getterSlotId = AddSlot(slotConfiguration); - } - - if (getterSlotId.IsValid()) - { - m_propertyAccount.m_getterSetterIdPairs[getterWrapperPair.first].first = getterSlotId; - m_propertyAccount.m_gettersByInputSlot.emplace(getterSlotId, getterWrapperPair.second); - } - } - } - - virtual void ConfigureProperties() - { - if (IsConfigured()) - { - return; - } - - ConfigureGetters(); - ConfigureSetters(); - m_configured = true; - } - - void OnInit() override - { - AddInputAndOutputTypeSlot(Data::FromAZType()); - ConfigureProperties(); - } - }; - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.cpp index f0faf324c1..3f9c5cc8a4 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.cpp @@ -19,19 +19,15 @@ #include #include #include -#include #include #include #include -#include #include #include #include #include #include #include -#include -#include #include // Version Conversion includes @@ -48,9 +44,7 @@ namespace NodeCpp // add your named version above Current, - }; - - + }; } namespace ScriptCanvas @@ -397,7 +391,6 @@ namespace ScriptCanvas void Node::Reflect(AZ::ReflectContext* context) { Slot::Reflect(context); - ExclusivePureDataContract::Reflect(context); Nodes::NodeableNode::Reflect(context); // Version Conversion Reflection @@ -492,23 +485,16 @@ namespace ScriptCanvas void Node::Activate() { - SignalBus::Handler::BusConnect(GetEntityId()); - - SetRuntimeBus(RuntimeRequestBus::FindFirstHandler(m_scriptCanvasId)); - AZ_Assert(m_runtimeBus, "Invalid m_executionUniqueId given for RuntimeRequestBus"); - + m_graphRequestBus = GraphRequestBus::FindFirstHandler(m_scriptCanvasId); + AZ_Assert(m_graphRequestBus, "Invalid m_executionUniqueId given for RuntimeRequestBus"); OnActivate(); - MarkDefaultableInput(); } void Node::Deactivate() { OnDeactivate(); - - SignalBus::Handler::BusDisconnect(); - - SetRuntimeBus(RuntimeRequestBus::FindFirstHandler(m_scriptCanvasId)); + m_graphRequestBus = GraphRequestBus::FindFirstHandler(m_scriptCanvasId); } void Node::PostActivate() @@ -730,26 +716,11 @@ namespace ScriptCanvas // for each output slot... // for each connected node... // remove the ability to default it... - // ...and until a more viable solution is available, variable get input in another node must be exclusive - + EndpointsResolved connections = GetConnectedNodes(inputSlot); if (!connections.empty()) { - bool isConnectedToPureData = false; - - for (auto& nodePtrSlotId : connections) - { - if (azrtti_cast(nodePtrSlotId.first)) - { - isConnectedToPureData = true; - break; - } - } - - if (!isConnectedToPureData) - { - m_possiblyStaleInput.insert(slotId); - } + m_possiblyStaleInput.insert(slotId); } } } @@ -757,7 +728,7 @@ namespace ScriptCanvas bool Node::IsInEventHandlingScope(const ID& possibleEventHandler) const { - Node* node = m_runtimeBus->FindNode(possibleEventHandler); + Node* node = m_graphRequestBus->FindNode(possibleEventHandler); if (auto eventHandler = azrtti_cast(node)) { @@ -804,9 +775,7 @@ namespace ScriptCanvas bool Node::IsTargetInDataFlowPath(const Node* targetNode) const { AZStd::unordered_set path; - return azrtti_cast(this) - || azrtti_cast(targetNode) - || (targetNode && IsTargetInDataFlowPath(targetNode->GetEntityId(), path)); + return (targetNode && IsTargetInDataFlowPath(targetNode->GetEntityId(), path)); } bool Node::IsTargetInDataFlowPath(const ID& targetNodeId, AZStd::unordered_set& path) const @@ -866,7 +835,7 @@ namespace ScriptCanvas GraphVariable* Node::FindGraphVariable(const VariableId& variableId) const { - return m_runtimeBus->FindVariableById(variableId); + return m_graphRequestBus->FindVariableById(variableId); } void Node::OnSlotConvertedToValue(const SlotId& slotId) @@ -1620,24 +1589,6 @@ namespace ScriptCanvas NodeNotificationsBus::Event(GetEntityId(), &NodeNotifications::OnSlotDisplayTypeChanged, slotId, dataType); } - void Node::SignalInput(const SlotId& slotId) - { - AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::ScriptCanvas); - SC_EXECUTION_TRACE_SIGNAL_INPUT((*this), (InputSignal(CreateNodeInputSignal(slotId)))); - - { - AZ_PROFILE_SCOPE_DYNAMIC(AZ::Debug::ProfileCategory::ScriptCanvas, "ScriptCanvas::%s::SignalInput", GetNodeName().c_str()); - OnInputSignal(slotId); - } - - } - - void Node::SignalOutput(const SlotId& slotId, ExecuteMode mode) - { - AZ_UNUSED(slotId); - AZ_UNUSED(mode); - } - AZ::Outcome Node::SlotAcceptsType(const SlotId& slotID, const Data::Type& type) const { if (auto slot = GetSlot(slotID)) @@ -1936,7 +1887,7 @@ namespace ScriptCanvas if (slot.GetDescriptor() == slotDescriptor && (allowLatentSlots || !slot.IsLatent())) { - AZStd::vector connectedEndpoints = m_runtimeBus->GetConnectedEndpoints(Endpoint{ GetEntityId(), slot.GetId() }); + AZStd::vector connectedEndpoints = m_graphRequestBus->GetConnectedEndpoints(Endpoint{ GetEntityId(), slot.GetId() }); endpoints.insert(endpoints.end(), connectedEndpoints.begin(), connectedEndpoints.end()); } } @@ -2361,9 +2312,7 @@ namespace ScriptCanvas void Node::SetOwningScriptCanvasId(ScriptCanvasId scriptCanvasId) { m_scriptCanvasId = scriptCanvasId; - - SetRuntimeBus(RuntimeRequestBus::FindFirstHandler(m_scriptCanvasId)); - + m_graphRequestBus = GraphRequestBus::FindFirstHandler(m_scriptCanvasId); OnGraphSet(); } @@ -2384,6 +2333,11 @@ namespace ScriptCanvas } } + bool Node::CanAcceptNullInput([[maybe_unused]] const Slot& executionSlot, [[maybe_unused]] const Slot& inputSlot) const + { + return true; + } + void Node::CollectVariableReferences(AZStd::unordered_set< ScriptCanvas::VariableId >& variableIds) const { for (const Slot& slot : m_slots) @@ -2448,7 +2402,7 @@ namespace ScriptCanvas AZ::EntityId Node::GetGraphEntityId() const { - return m_runtimeBus->GetRuntimeEntityId(); + return m_graphRequestBus->GetRuntimeEntityId(); } NodePtrConstList Node::FindConnectedNodesByDescriptor(const SlotDescriptor& slotDescriptor, bool followLatentConnections) const @@ -2459,7 +2413,7 @@ namespace ScriptCanvas for (const auto& endpoint : GetAllEndpointsByDescriptor(slotDescriptor, followLatentConnections)) { - Node* connectedNode = m_runtimeBus->FindNode(endpoint.GetNodeId()); + Node* connectedNode = m_graphRequestBus->FindNode(endpoint.GetNodeId()); if (connectedNode) { @@ -2478,7 +2432,7 @@ namespace ScriptCanvas for (const auto& endpoint : GetAllEndpointsByDescriptor(slotDescriptor, followLatentConnections)) { - Node* connectedNode = m_runtimeBus->FindNode(endpoint.GetNodeId()); + Node* connectedNode = m_graphRequestBus->FindNode(endpoint.GetNodeId()); if (connectedNode) { @@ -2491,7 +2445,7 @@ namespace ScriptCanvas AZ::Data::AssetId Node::GetGraphAssetId() const { - return m_runtimeBus->GetAssetId(); + return m_graphRequestBus->GetAssetId(); } AZStd::string Node::GetGraphAssetName() const @@ -2504,7 +2458,7 @@ namespace ScriptCanvas GraphIdentifier Node::GetGraphIdentifier() const { - return m_runtimeBus->GetGraphIdentifier(); + return m_graphRequestBus->GetGraphIdentifier(); } bool Node::IsSanityCheckRequired() const @@ -2674,7 +2628,7 @@ namespace ScriptCanvas return; } - auto node = m_runtimeBus->FindNode(endpoint.GetNodeId()); + auto node = m_graphRequestBus->FindNode(endpoint.GetNodeId()); if (node) { @@ -2862,7 +2816,7 @@ namespace ScriptCanvas bool Node::IsConnected(const Slot& slot) const { AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::ScriptCanvas, "ScriptCanvas::Node::IsConnected"); - return slot.IsVariableReference() || m_runtimeBus->IsEndpointConnected(slot.GetEndpoint()); + return slot.IsVariableReference() || m_graphRequestBus->IsEndpointConnected(slot.GetEndpoint()); } bool Node::IsConnected(const SlotId& slotId) const @@ -2902,7 +2856,7 @@ namespace ScriptCanvas bool Node::IsActivated() const { - return m_runtimeBus; + return m_graphRequestBus; } EndpointsResolved Node::GetConnectedNodes(const Slot& slot) const @@ -2911,17 +2865,17 @@ namespace ScriptCanvas EndpointsResolved connectedNodes; - auto endpointIters = m_runtimeBus->GetConnectedEndpointIterators(Endpoint{ GetEntityId(), slot.GetId() }); + auto endpointIters = m_graphRequestBus->GetConnectedEndpointIterators(Endpoint{ GetEntityId(), slot.GetId() }); for (auto endpointIter = endpointIters.first; endpointIter != endpointIters.second; ++endpointIter) { const Endpoint& endpoint = endpointIter->second; - auto node = m_runtimeBus->FindNode(endpoint.GetNodeId()); + auto node = m_graphRequestBus->FindNode(endpoint.GetNodeId()); if (node == nullptr) { - AZStd::string assetName = m_runtimeBus->GetAssetName(); - AZ::EntityId assetNodeId = m_runtimeBus->FindAssetNodeIdByRuntimeNodeId(endpoint.GetNodeId()); + AZStd::string assetName = m_graphRequestBus->GetAssetName(); + AZ::EntityId assetNodeId = m_graphRequestBus->FindAssetNodeIdByRuntimeNodeId(endpoint.GetNodeId()); AZ_Warning("Script Canvas", false, "Unable to find node with id (id: %s) in the graph '%s'. Most likely the node was serialized with a type that is no longer reflected", assetNodeId.ToString().data(), assetName.data()); @@ -2935,8 +2889,8 @@ namespace ScriptCanvas auto endpointSlot = node->GetSlot(endpoint.GetSlotId()); if (!endpointSlot) { - AZStd::string assetName = m_runtimeBus->GetAssetName(); - AZ::EntityId assetNodeId = m_runtimeBus->FindAssetNodeIdByRuntimeNodeId(endpoint.GetNodeId()); + AZStd::string assetName = m_graphRequestBus->GetAssetName(); + AZ::EntityId assetNodeId = m_graphRequestBus->FindAssetNodeIdByRuntimeNodeId(endpoint.GetNodeId()); AZ_Warning("Script Canvas", false, "Endpoint was missing slot. id (id: %s) in the graph '%s'.", assetNodeId.ToString().data(), assetName.data()); @@ -2959,18 +2913,18 @@ namespace ScriptCanvas void Node::ModConnectedNodes(const Slot& slot, AZStd::vector>& connectedNodes) const { - auto endpointIters = m_runtimeBus->GetConnectedEndpointIterators(Endpoint{ GetEntityId(), slot.GetId() }); + auto endpointIters = m_graphRequestBus->GetConnectedEndpointIterators(Endpoint{ GetEntityId(), slot.GetId() }); for (auto endpointIter = endpointIters.first; endpointIter != endpointIters.second; ++endpointIter) { const Endpoint& endpoint = endpointIter->second; - auto node = m_runtimeBus->FindNode(endpoint.GetNodeId()); + auto node = m_graphRequestBus->FindNode(endpoint.GetNodeId()); if (node == nullptr) { - AZStd::string assetName = m_runtimeBus->GetAssetName(); - AZ::EntityId assetNodeId = m_runtimeBus->FindAssetNodeIdByRuntimeNodeId(endpoint.GetNodeId()); + AZStd::string assetName = m_graphRequestBus->GetAssetName(); + AZ::EntityId assetNodeId = m_graphRequestBus->FindAssetNodeIdByRuntimeNodeId(endpoint.GetNodeId()); AZ_Error("Script Canvas", false, "Unable to find node with id (id: %s) in the graph '%s'. Most likely the node was serialized with a type that is no longer reflected", assetNodeId.ToString().data(), assetName.data()); @@ -2983,41 +2937,7 @@ namespace ScriptCanvas bool Node::HasConnectedNodes(const Slot& slot) const { - return m_runtimeBus->IsEndpointConnected(Endpoint{ GetEntityId(), slot.GetId() }); - } - - void Node::OnInputChanged(Node& node, const Datum& input, const SlotId& slotID) - { - AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::ScriptCanvas); - node.OnInputChanged(input, slotID); - } - - void Node::PushOutput(const Datum& output, const Slot& slot) const - { - AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::ScriptCanvas); - - if (slot.IsVariableReference()) - { - GraphVariable* variable = slot.GetVariable(); - - if (variable) - { - ModifiableDatumView datumView; - variable->ConfigureDatumView(datumView); - - datumView.AssignToDatum(output); - } - } - else - { - auto endpointIters = m_runtimeBus->GetConnectedEndpointIterators(Endpoint{ GetEntityId(), slot.GetId() }); - - for (auto endpointIter = endpointIters.first; endpointIter != endpointIters.second; ++endpointIter) - { - Node* node = m_runtimeBus->FindNode(endpointIter->second.GetNodeId()); - node->SetInput(output, endpointIter->second.GetSlotId()); - } - } + return m_graphRequestBus->IsEndpointConnected(Endpoint{ GetEntityId(), slot.GetId() }); } void Node::ForEachConnectedNode(const Slot& slot, AZStd::function callable) const @@ -3032,47 +2952,6 @@ namespace ScriptCanvas } } - void Node::SetInput(const Datum& newInput, const SlotId& slotId) - { - AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::ScriptCanvas); - - ModifiableDatumView datumView; - FindModifiableDatumView(slotId, datumView); - - if (datumView.IsValid()) - { - datumView.AssignToDatum(newInput); - OnInputChanged((*datumView.GetDatum()), slotId); - } - } - - void Node::SetInput(Datum&& newInput, const SlotId& slotId) - { - AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::ScriptCanvas); - - ModifiableDatumView datumView; - FindModifiableDatumView(slotId, datumView); - - if (datumView.IsValid()) - { - datumView.AssignToDatum(newInput); - OnInputChanged((*datumView.GetDatum()), slotId); - } - } - - void Node::SetInput(Node& node, const SlotId& id, const Datum& input) - { - AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::ScriptCanvas); - node.SetInput(input, id); - } - - void Node::SetInput(Node& node, const SlotId& id, Datum&& input) - { - AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::ScriptCanvas, "ScriptCanvas::Node::SetInput"); - - node.SetInput(AZStd::move(input), id); - } - AZStd::string Node::GetDebugName() const { if (GetEntityId().IsValid()) diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.h index 74707916f3..614494883a 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.h @@ -22,12 +22,10 @@ #include #include #include -#include #include #include #include #include -#include #include #include #include @@ -400,7 +398,6 @@ namespace ScriptCanvas class Node : public AZ::Component , public DatumNotificationBus::Handler - , private SignalBus::Handler , public NodeRequestBus::Handler , public EndpointNotificationBus::MultiHandler { @@ -482,7 +479,10 @@ namespace ScriptCanvas Node(const Node&); // Needed just for DLL linkage. Does not perform a copy Node& operator=(const Node&); // Needed just for DLL linkage. Does not perform a copy + virtual bool CanAcceptNullInput(const Slot& executionSlot, const Slot& inputSlot) const; + virtual void CollectVariableReferences(AZStd::unordered_set< ScriptCanvas::VariableId >& variableIds) const; + virtual bool ContainsReferencesToVariables(const AZStd::unordered_set< ScriptCanvas::VariableId >& variableIds) const; Graph* GetGraph() const; @@ -542,7 +542,6 @@ namespace ScriptCanvas AZStd::vector> FindConnectedNodesAndSlotsByDescriptor(const SlotDescriptor& slotType, bool followLatentConnections = false) const; AZStd::vector GetSlotsByType(CombinedSlotType slotType) const; - AZStd::vector GetConnectedEndpoints(SlotId outSlot) const; bool IsConnected(const Slot& slot) const; bool IsConnected(const SlotId& slotId) const; @@ -845,10 +844,6 @@ namespace ScriptCanvas void SignalSlotsReordered(); - static void OnInputChanged(Node& node, const Datum& input, const SlotId& slotID); - static void SetInput(Node& node, const SlotId& id, const Datum& input); - static void SetInput(Node& node, const SlotId& id, Datum&& input); - // Will ignore any references and return the Datum that the slot represents. void ModifyUnderlyingSlotDatum(const SlotId& id, ModifiableDatumView& datumView); @@ -892,7 +887,6 @@ protected: void Configure(); protected: - TransientSlotIdentifier ConstructTransientIdentifier(const Slot& slot) const; DatumVector GatherDatumsForDescriptor(SlotDescriptor descriptor) const; @@ -900,7 +894,6 @@ protected: SlotDataMap CreateInputMap() const; SlotDataMap CreateOutputMap() const; - Signal CreateNodeInputSignal(const SlotId& slotId) const; Signal CreateNodeOutputSignal(const SlotId& slotId) const; @@ -954,6 +947,7 @@ protected: //! This is a used by CodeGen to configure slots just prior to OnInit. virtual void ConfigureSlots() {} + //! Entity level initialization, perform any resource allocation here that should be available throughout the node's existence. virtual void OnInit() {} @@ -968,13 +962,11 @@ protected: //! Entity level activation, perform entity lifetime setup here, i.e. connect to EBuses virtual void OnActivate() {} + //! Entity level deactivation, perform any entity lifetime release here, i.e disconnect from EBuses virtual void OnDeactivate() {} virtual void OnPostActivate() {} - //! Any node that is not pure data will perform its operation assuming that all input has been pushed and is reasonably valid - // perform your derived nodes work in OnInputSignal(const SlotId&) - virtual void OnInputSignal(const SlotId& /*slot*/) {} //! Signal sent once the OwningScriptCanvasId is set. virtual void OnGraphSet() {} @@ -1000,25 +992,9 @@ protected: void ModConnectedNodes(const Slot& slot, AZStd::vector>&) const; bool HasConnectedNodes(const Slot& slot) const; - virtual void OnInputChanged(const Datum& /*input*/, const SlotId& /*slotID*/) {} - - ////////////////////////////////////////////////////////////////////////// - //! The body of the node's execution, implement the node's work here. - void PushOutput(const Datum& output, const Slot& slot) const; void SetOwningScriptCanvasId(ScriptCanvasId scriptCanvasId); void SetGraphEntityId(AZ::EntityId graphEntityId); - // on activate, simple expressions need to push this data - virtual void SetInput(const Datum& input, const SlotId& id); - virtual void SetInput(Datum&& input, const SlotId& id); - - //! Any node that is not pure data will perform its operation assuming that all input has been pushed and is reasonably valid - // perform your derived nodes work in OnInputSignal(const SlotId&) - void SignalInput(const SlotId& slot) override final; - - //! This must be called manually to send execution out of a specific slot - void SignalOutput(const SlotId& slot, ExecuteMode mode = ExecuteMode::Normal) override final; - bool SlotExists(AZStd::string_view name, const SlotDescriptor& slotDescriptor) const; bool IsTargetInDataFlowPath(const ID& targetNodeId, AZStd::unordered_set& path) const; @@ -1027,10 +1003,6 @@ protected: void PopulateNodeType(); - void SetRuntimeBus(RuntimeRequests* runtimeBus) { m_runtimeBus = runtimeBus; } - RuntimeRequests* GetRuntimeBus() const { return m_runtimeBus; } - - GraphScopedNodeId GetScopedNodeId() const { return GraphScopedNodeId(GetOwningScriptCanvasId(), GetEntityId()); } private: @@ -1070,102 +1042,17 @@ protected: AZStd::vector< VisualExtensionSlotConfiguration > m_visualExtensions; // Cache pointer to the owning Graph - RuntimeRequests* m_runtimeBus = nullptr; + GraphRequests* m_graphRequestBus = nullptr; ScriptCanvas::SlotId m_removingSlot; public: - template - const t_Value* GetInput_UNIT_TEST(AZStd::string_view slotName) - { - return GetInput_UNIT_TEST(GetSlotId(slotName)); - } - - template - t_Value* ModInput_UNIT_TEST(AZStd::string_view slotName) - { - return ModInput_UNIT_TEST(GetSlotId(slotName)); - } - - template - const t_Value* GetInput_UNIT_TEST(const SlotId& slotId) - { - const Datum* input = FindDatum(slotId); - return input ? input->GetAs() : nullptr; - } - - template - t_Value* ModInput_UNIT_TEST(const SlotId& slotId) - { - auto slotIter = m_slotIdIteratorCache.find(slotId); - - if (slotIter != m_slotIdIteratorCache.end()) - { - Slot* slot = &(*slotIter->second.m_slotIterator); - - if (slot->IsVariableReference()) - { - AZ_Assert(false, "Variable references are not supported in Unit Test methods."); - } - else - { - return slotIter->second.GetDatumIter()->ModAs(); - } - } - - return nullptr; - } - - const Datum* GetInput_UNIT_TEST(AZStd::string_view slotName) - { - return GetInput_UNIT_TEST(GetSlotId(slotName)); - } - - const Datum* GetInput_UNIT_TEST(const SlotId& slotId) - { - return FindDatum(slotId); - } - - // initializes the node input to the value passed in, not a pointer to it - template - void SetInput_UNIT_TEST(AZStd::string_view slotName, const t_Value& value) - { - SetInput_UNIT_TEST(GetSlotId(slotName), value); - } - - template - void SetInput_UNIT_TEST(const SlotId& slotId, const t_Value& value) - { - SetInput(Datum(value), slotId); - } - - void SetInput_UNIT_TEST(AZStd::string_view slotName, const Datum& value) - { - SetInput_UNIT_TEST(GetSlotId(slotName), value); - } - - void SetInput_UNIT_TEST(AZStd::string_view slotName, Datum&& value) - { - SetInput_UNIT_TEST(GetSlotId(slotName), AZStd::move(value)); - } - - void SetInput_UNIT_TEST(const SlotId& slotId, Datum&& value) - { - SetInput(AZStd::move(value), slotId); - } - template friend struct Internal::MultipleOutputHelper; template friend struct Internal::OutputSlotHelper; - template - friend struct Internal::PushOutputHelper; - - template - friend struct Internal::CallHelper; - template friend struct SetDefaultValuesByIndex; }; @@ -1238,104 +1125,6 @@ protected: } }; - template> - struct PushOutputHelper - { - template - static void PushOutput(Node& node, ResultType&& result, AZStd::index_sequence) - { - // protect against changes to the function that generated the node - if (auto slot = node.GetSlotByIndex(t_Traits::s_resultsSlotIndicesStart)) - { - node.PushOutput(Datum(AZStd::forward(result)), *slot); - } - } - }; - - template - struct PushOutputHelper - { - template static void PushOutput(Node& node, AZStd::ignore_t result, AZStd::index_sequence) {} - }; - - template - struct PushOutputHelper::value>> - { - template - static void PushOutputFold(Node& node, ResultType&& tupleResult) - { - // protect against changes to the function that generated the node - if (auto slot = node.GetSlotByIndex(t_Traits::s_resultsSlotIndicesStart + t_Index)) - { - node.PushOutput(Datum(AZStd::get(AZStd::forward(tupleResult))), *slot); - } - } - - template - static void PushOutput(Node& node, ResultType&& tupleResult, AZStd::index_sequence) - { - (PushOutputFold(node, AZStd::forward(tupleResult)), ...); - } - }; - - template - struct CallHelper - { - // protect against changes to the function that generated the node - template - static bool IsIndexSafe(Node& node, const AZStd::index_sequence&) - { - return (true && ... && (node.FindDatumByIndex(Indices) != nullptr && node.FindDatumByIndex(Indices)->GetAs>() != nullptr)); - } - - template - static void Call(Node& node, AZStd::Internal::pack_traits_arg_sequence, [[maybe_unused]] AZStd::index_sequence sequence) - { -#if !defined(_RELEASE) - if (IsIndexSafe(node, sequence)) - { - PushOutputHelper::PushOutput(node, AZStd::invoke(function, *node.FindDatumByIndex(ArgIndices)->GetAs>()...), ResultIndexSequence()); - } - else - { - SCRIPTCANVAS_REPORT_ERROR((node), "Generic function Node (%s) could not be executed, due to missing slot for source definition." - "this is likely due to changing the function signature. See serialization log for potential errors & warnings.", node.GetNodeName().c_str()); - } -#else - PushOutputHelper::PushOutput(node, AZStd::invoke(function, *node.FindDatumByIndex(ArgIndices)->GetAs>()...), ResultIndexSequence()); -#endif//!defined(_RELEASE) - } - }; - - template - struct CallHelper - { - // protect against changes to the function that generated the node - template - static bool IsIndexSafe(Node& node, const AZStd::index_sequence&) - { - return true && (... && (node.FindDatumByIndex(Indices) != nullptr && node.FindDatumByIndex(Indices)->GetAs>() != nullptr)); - } - - template - static void Call(Node& node, AZStd::Internal::pack_traits_arg_sequence, [[maybe_unused]] AZStd::index_sequence sequence) - { -#if !defined(_RELEASE) - if (IsIndexSafe(node, sequence)) - { - AZStd::invoke(function, *node.FindDatumByIndex(ArgIndices)->GetAs>()...); - } - else - { - SCRIPTCANVAS_REPORT_ERROR((node), "Generic function Node (%s) could not be executed, due to missing slot for source definition." - "this is likely due to changing the function signature. See serialization log for potential errors & warnings.", node.GetNodeName().c_str()); - } -#else - AZStd::invoke(function, *node.FindDatumByIndex(ArgIndices)->GetAs>()...); -#endif//!defined(_RELEASE) - } - }; - template struct MultipleOutputHelper { @@ -1346,11 +1135,6 @@ protected: { OutputSlotHelper::AddOutputSlot(node, ResultIndexSequence()); } - - static void Call(Node& node) - { - CallHelper::Call(node, typename AZStd::function_traits::arg_sequence{}, AZStd::make_index_sequence::arity>{}); - } }; template> diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeFunctionGeneric.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeFunctionGeneric.h index 95fc23c5d5..e3e0c1a7a3 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeFunctionGeneric.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeFunctionGeneric.h @@ -248,8 +248,6 @@ namespace ScriptCanvas return AZ::Success(scope); } - - protected: template @@ -298,13 +296,6 @@ namespace ScriptCanvas MultipleOutputInvoker::Add(*this); } - void OnInputSignal(const SlotId&) override - { - MultipleOutputInvoker::Call(*this); - SignalOutput(GetSlotId("Out")); - } - - static bool VersionConverter(AZ::SerializeContext& serializeContext, AZ::SerializeContext::DataElementNode& rootElement); static bool ConvertOldNodeGeneric(AZ::SerializeContext& serializeContext, AZ::SerializeContext::DataElementNode& rootElement); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Nodeable.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Nodeable.cpp index f3d6070ac6..01b754506c 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Nodeable.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Nodeable.cpp @@ -9,8 +9,6 @@ #include #include -#include -#include namespace NodeableOutCpp { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeableNode.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeableNode.cpp index 5ec40d8e5f..db0cf8e589 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeableNode.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeableNode.cpp @@ -12,8 +12,6 @@ #include #include #include -#include -#include #include #include diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeableNodeOverloaded.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeableNodeOverloaded.cpp index c9e2e3acc6..882804de36 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeableNodeOverloaded.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeableNodeOverloaded.cpp @@ -12,8 +12,6 @@ #include #include #include -#include -#include #include #include diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/PureData.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/PureData.cpp deleted file mode 100644 index 44d087e8a5..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/PureData.cpp +++ /dev/null @@ -1,230 +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 "PureData.h" - -namespace ScriptCanvas -{ - const char* PureData::k_getThis("Get"); - const char* PureData::k_setThis("Set"); - - PureData::~PureData() - { - - } - - const AZStd::unordered_map>& PureData::GetPropertyNameSlotMap() const - { - return m_propertyAccount.m_getterSetterIdPairs; - } - - void PureData::AddInputAndOutputTypeSlot(const Data::Type& type, const void* source) - { - { - DataSlotConfiguration slotConfiguration; - - slotConfiguration.m_name = k_setThis; - slotConfiguration.SetConnectionType(ConnectionType::Input); - slotConfiguration.ConfigureDatum(AZStd::move(Datum(type, Datum::eOriginality::Original, source, AZ::Uuid::CreateNull()))); - - AddSlot(slotConfiguration); - } - - { - DataSlotConfiguration slotConfiguration; - - slotConfiguration.m_name = k_getThis; - slotConfiguration.SetConnectionType(ConnectionType::Output); - slotConfiguration.SetType(type); - - AddSlot(slotConfiguration); - } - } - - void PureData::AddInputTypeAndOutputTypeSlot(const Data::Type& type) - { - { - DataSlotConfiguration slotConfiguration; - - slotConfiguration.m_name = k_setThis; - slotConfiguration.SetConnectionType(ConnectionType::Input); - slotConfiguration.SetType(type); - - AddSlot(slotConfiguration); - } - - { - DataSlotConfiguration slotConfiguration; - - slotConfiguration.m_name = k_getThis; - slotConfiguration.SetConnectionType(ConnectionType::Output); - slotConfiguration.SetType(type); - - AddSlot(slotConfiguration); - } - } - - void PureData::OnActivate() - { - PushThis(); - - for (const auto& propertySlotIdsPair : m_propertyAccount.m_getterSetterIdPairs) - { - const SlotId& getterSlotId = propertySlotIdsPair.second.first; - CallGetter(getterSlotId); - } - } - - void PureData::OnInputChanged(const Datum& input, [[maybe_unused]] const SlotId& id) - { - if (IsActivated()) - { - OnOutputChanged(input); - } - } - - AZStd::string_view PureData::GetInputDataName() const - { - return k_setThis; - } - - AZStd::string_view PureData::GetOutputDataName() const - { - return k_getThis; - } - - void PureData::CallGetter(const SlotId& getterSlotId) - { - auto getterFuncIt = m_propertyAccount.m_gettersByInputSlot.find(getterSlotId); - Slot* getterSlot = GetSlot(getterSlotId); - if (getterSlot && getterFuncIt != m_propertyAccount.m_gettersByInputSlot.end()) - { - AZStd::vector> outputNodes(ModConnectedNodes(*getterSlot)); - - if (!outputNodes.empty()) - { - auto getterOutcome = getterFuncIt->second.m_getterFunction((*FindDatum(GetSlotId(k_setThis)))); - if (!getterOutcome) - { - SCRIPTCANVAS_REPORT_ERROR((*this), getterOutcome.GetError().data()); - return; - } - - - for (auto& nodePtrSlot : outputNodes) - { - if (nodePtrSlot.first) - { - Node::SetInput(*nodePtrSlot.first, nodePtrSlot.second, getterOutcome.GetValue()); - } - } - } - } - } - - void PureData::SetInput(const Datum& input, const SlotId& id) - { - if (id == FindSlotIdForDescriptor(GetInputDataName(), SlotDescriptors::DataIn())) - { - // push this value, as usual - Node::SetInput(input, id); - - // now, call every getter, as every property has (presumably) been changed - for (const auto& propertyNameSlotIdsPair : m_propertyAccount.m_getterSetterIdPairs) - { - const SlotId& getterSlotId = propertyNameSlotIdsPair.second.first; - CallGetter(getterSlotId); - } - } - else - { - SetProperty(input, id); - } - } - - void PureData::SetInput(Datum&& input, const SlotId& id) - { - if (id == FindSlotIdForDescriptor(GetInputDataName(), SlotDescriptors::DataIn())) - { - // push this value, as usual - Node::SetInput(AZStd::move(input), id); - - if (IsActivated()) - { - // now, call every getter, as every property has (presumably) been changed - for (const auto& propertyNameSlotIdsPair : m_propertyAccount.m_getterSetterIdPairs) - { - const SlotId& getterSlotId = propertyNameSlotIdsPair.second.first; - CallGetter(getterSlotId); - } - } - } - else - { - SetProperty(AZStd::move(input), id); - } - } - - void PureData::SetProperty(const Datum& input, const SlotId& setterId) - { - auto methodBySlotIter = m_propertyAccount.m_settersByInputSlot.find(setterId); - if (methodBySlotIter == m_propertyAccount.m_settersByInputSlot.end()) - { - AZ_Error("Script Canvas", false, "BehaviorContextObject SlotId %s did not route to a setter", setterId.m_id.ToString().data()); - return; - } - if (!methodBySlotIter->second.m_setterFunction) - { - AZ_Error("Script Canvas", false, "BehaviorContextObject setter is not invocable for SlotId %s is nullptr", setterId.m_id.ToString().data()); - return; - } - - ModifiableDatumView datumView; - FindModifiableDatumView(GetSlotId(k_setThis), datumView); - - Datum* datum = datumView.ModifyDatum(); - - auto setterOutcome = methodBySlotIter->second.m_setterFunction((*datum), input); - - if (!setterOutcome) - { - SCRIPTCANVAS_REPORT_ERROR((*this), setterOutcome.TakeError().data()); - return; - } - - datumView.SignalModification(); - - PushThis(); - - auto getterSetterIt = m_propertyAccount.m_getterSetterIdPairs.find(methodBySlotIter->second.m_propertyName); - - if (getterSetterIt != m_propertyAccount.m_getterSetterIdPairs.end()) - { - CallGetter(getterSetterIt->second.first); - } - } - - - void PureData::Reflect(AZ::ReflectContext* reflectContext) - { - AZ::SerializeContext* serializeContext = azrtti_cast(reflectContext); - if (serializeContext) - { - serializeContext->Class() - ->Version(0) - ; - - AZ::EditContext* editContext = serializeContext->GetEditContext(); - if (editContext) - { - editContext->Class("PureData", "") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ; - } - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/PureData.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/PureData.h deleted file mode 100644 index 01c52d7378..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/PureData.h +++ /dev/null @@ -1,111 +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 -#include - -namespace AZ -{ - class BehaviorClass; - struct BehaviorValueParameter; - class ReflectContext; -} - -namespace ScriptCanvas -{ - struct PropertyAccount - { - AZStd::unordered_map m_gettersByInputSlot; - AZStd::unordered_map m_settersByInputSlot; - // The first slot id of the pair is the Getter SlotId, the second slot id of the pair is the Setter SlotID - AZStd::unordered_map> m_getterSetterIdPairs; - }; - - class PureData - : public Node - { - public: - AZ_COMPONENT(PureData, "{8B80FF54-0786-4FEE-B4A3-12907EBF8B75}", Node); - - static void Reflect(AZ::ReflectContext* reflectContext); - static const char* k_getThis; - static const char* k_setThis; - - const AZStd::unordered_map>& GetPropertyNameSlotMap() const; - - AZ_INLINE AZ::Outcome GetDependencies() const override { return AZ::Success(DependencyReport{}); } - - ~PureData() override; - - protected: - void AddInputAndOutputTypeSlot(const Data::Type& type, const void* defaultValue = nullptr); - template - void AddDefaultInputAndOutputTypeSlot(DatumType&& defaultValue); - void AddInputTypeAndOutputTypeSlot(const Data::Type& type); - - bool IsDeprecated() const override { return true; } - - void OnActivate() override; - void OnInputChanged(const Datum& input, const SlotId& id) override; - void MarkDefaultableInput() override {} - - AZ_INLINE void OnOutputChanged(const Datum& output) const - { - Slot* slot = GetSlotByName(GetOutputDataName()); - if (slot) - { - OnOutputChanged(output, (*slot)); - } - } - - AZ_INLINE void OnOutputChanged(const Datum& output, const Slot& outputSlot) const - { - PushOutput(output, outputSlot); - } - - // push data out - AZ_INLINE void PushThis() - { - auto slotId = GetSlotId(GetInputDataName()); - - if (auto setDatum = FindDatum(slotId)) - { - OnInputChanged(*setDatum, slotId); - } - else - { - SCRIPTCANVAS_REPORT_ERROR((*this), "No input datum in a PureData class %s. You must push your data manually in OnActivate() if no input is connected!"); - } - } - - AZStd::string_view GetInputDataName() const; - AZStd::string_view GetOutputDataName() const; - - void SetInput(const Datum& input, const SlotId& id) override; - void SetInput(Datum&& input, const SlotId& id) override; - void SetProperty(const Datum& input, const SlotId& id); - void CallGetter(const SlotId& getterSlotId); - bool IsConfigured() { return m_configured; } - - PropertyAccount m_propertyAccount; - bool m_configured = false; - }; - - template - void PureData::AddDefaultInputAndOutputTypeSlot(DatumType&& defaultValue) - { - AddInputDatumSlot(GetInputDataName(), "", Datum::eOriginality::Original, AZStd::forward(defaultValue)); - AddOutputTypeSlot(GetOutputDataName(), "", Data::FromAZType(azrtti_typeid>()), OutputStorage::Optional); - } - - template<> - void PureData::AddDefaultInputAndOutputTypeSlot(Data::Type&&) = delete; -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/SignalBus.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/SignalBus.h deleted file mode 100644 index 1a39c0f4d6..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/SignalBus.h +++ /dev/null @@ -1,36 +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 "Core.h" - -#include - -namespace ScriptCanvas -{ - enum class ExecuteMode - { - Normal, - UntilNodeIsFoundInStack - }; - - class SignalInterface : public AZ::EBusTraits - { - public: - ////////////////////////////////////////////////////////////////////////// - // EBusTraits overrides - static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById; - typedef ID BusIdType; - ////////////////////////////////////////////////////////////////////////// - - virtual void SignalInput(const SlotId& slot) = 0; - virtual void SignalOutput(const SlotId& slot, ExecuteMode mode = ExecuteMode::Normal) = 0; - }; - - using SignalBus = AZ::EBus; -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Slot.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Slot.cpp index 5b117dc4a9..204a087ab3 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Slot.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Slot.cpp @@ -231,12 +231,6 @@ namespace ScriptCanvas // Add the slot type contract by default, It is used for filtering input/output slots and flow/data slots m_contracts.emplace_back(AZStd::make_unique()); - // Every DataIn slot has a contract validating that only 1 connection from any PureData node is allowed - if (IsData() && IsInput()) - { - AddContract({ []() { return aznew ExclusivePureDataContract(); } }); - } - for (const auto& contractDesc : slotConfiguration.m_contractDescs) { AddContract(contractDesc); @@ -390,15 +384,10 @@ namespace ScriptCanvas if (m_variable) { VariableNotificationBus::Handler::BusConnect(m_variable->GetGraphScopedId()); - - if (IsInput()) - { - m_node->OnInputChanged((*m_variable->GetDatum()), GetId()); - } } - else + else if (m_node) { - SCRIPTCANVAS_REPORT_ERROR((*m_node), "Node (%s) is attempting to execute using an invalid Variable Reference", m_node->GetNodeName().c_str()); + AZ_Warning("ScriptCanvas", false, "Node (%s) is attempting to initialize an invalid Variable Reference", m_node->GetNodeName().c_str()); } } } @@ -590,11 +579,6 @@ namespace ScriptCanvas return m_isLatentSlot; } - void Slot::OnVariableValueChanged() - { - m_node->OnInputChanged((*m_variable->GetDatum()), GetId()); - } - void Slot::SetDynamicDataType(DynamicDataType dynamicDataType) { AZ_Assert(m_dynamicDataType == DynamicDataType::None, "Set Dynamic Data Type is meant to be used for a node wise version conversion step. Not as a run time reconfiguration of a dynamic type."); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Slot.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Slot.h index 1eeddb8898..0e5889e4ba 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Slot.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Slot.h @@ -167,10 +167,6 @@ namespace ScriptCanvas bool IsLatent() const; - // VariableNotificationBus - void OnVariableValueChanged() override; - //// - // Here to allow conversion of the previously untyped any slots into the dynamic type any. void SetDynamicDataType(DynamicDataType dynamicDataType); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/SubgraphInterface.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/SubgraphInterface.h index 024f3e7483..19ff2e1d65 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/SubgraphInterface.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/SubgraphInterface.h @@ -266,16 +266,6 @@ namespace ScriptCanvas const In* FindIn(const AZStd::string& inSlotId) const; const Out* FindLatentOut(const AZStd::string& latent) const; LexicalScope GetLexicalScope(bool isSourcePure) const; - -#if defined(FUNCTION_LEGACY_SUPPORT_ENABLED) - public: - bool IsAllInputOutputShared() const; - - // all input/output are used in every in/out/latent slot? - bool m_isAllInputOutputShared = false; - - void MarkAllInputOutputShared(); -#endif }; AZStd::string ToString(const In& in, size_t tabs = 0); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/RuntimeBus.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/RuntimeBus.h deleted file mode 100644 index eb3956c4e5..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/RuntimeBus.h +++ /dev/null @@ -1,103 +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 -#include -#include - -#include -#include -#include - -namespace ScriptCanvas -{ - struct GraphData; - class GraphVariable; - class VariableData; - - using EndpointMapConstIterator = AZStd::unordered_multimap::const_iterator; - - //! Runtime Request Bus for interfacing with the runtime execution component - class RuntimeRequests : public AZ::EBusTraits - { - public: - static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById; - //! BusIdType represents a unique id for the execution component - //! Because multiple Script Canvas graphs can execute on the same entity - //! this is not an "EntityId" in the sense that it uniquely identifies an entity. - using BusIdType = ScriptCanvasId; - - virtual VariableId FindAssetVariableIdByRuntimeVariableId(VariableId runtimeId) const = 0; - - virtual VariableId FindRuntimeVariableIdByAssetVariableId(VariableId assetId) const = 0; - - virtual AZ::EntityId FindAssetNodeIdByRuntimeNodeId(AZ::EntityId editorNode) const = 0; - - virtual AZ::Data::AssetId GetAssetId() const = 0; - virtual GraphIdentifier GetGraphIdentifier() const = 0; - virtual AZStd::string GetAssetName() const = 0; - - //! Looks up the nodeId within the bus handler - virtual Node* FindNode(AZ::EntityId nodeId) const = 0; - - virtual AZ::EntityId FindRuntimeNodeIdByAssetNodeId(AZ::EntityId runtimeNode) const = 0; - - //! Returns the entity id of the execution component - virtual AZ::EntityId GetRuntimeEntityId() const = 0; - - //! Returns a container of nodes - virtual AZStd::vector GetNodes() const = 0; - //! Returns a container of connections - virtual AZStd::vector GetConnections() const = 0; - - //! Returns a container of all endpoints to which the supplied endpoint is connected point - virtual AZStd::vector GetConnectedEndpoints(const Endpoint& endpoint) const = 0; - - virtual AZStd::pair< EndpointMapConstIterator, EndpointMapConstIterator > GetConnectedEndpointIterators(const Endpoint& endpoint) const = 0; - - //! Returns whether the given endpoint has any connections - virtual bool IsEndpointConnected(const Endpoint& endpoint) const = 0; - - //! Retrieves GraphData structure which manages the nodes and connections of an executing graph - virtual GraphData* GetGraphData() = 0; - virtual const GraphData* GetGraphDataConst() const = 0; - - //! Retrieves VariableData structure which manages variable data for the execution component - virtual VariableData* GetVariableData() = 0; - virtual const VariableData* GetVariableDataConst() const = 0; - - //! Retrieves a map of variable id to variable name and variable datums pair - virtual const GraphVariableMapping* GetVariables() const = 0; - - //! Searches for a variable with the specified name - //! returns pointer to the first variable with the specified name or nullptr - virtual GraphVariable* FindVariable(AZStd::string_view varName) = 0; - - //! Searches for a variable by VariableId - //! returns a pair of with the supplied id - //! The variable datum pointer is non-null if the variable has been found - virtual GraphVariable* FindVariableById(const VariableId& variableId) = 0; - - //! Returns the type associated with the specified variable. - virtual Data::Type GetVariableType(const VariableId& variableId) const = 0; - - //! Looks up the variable name that the variable data is associated with in the handler of the bus - virtual AZStd::string_view GetVariableName(const VariableId& variableId) const = 0; - - virtual bool IsGraphObserved() const = 0; - virtual void SetIsGraphObserved(bool isObserved) = 0; - - virtual AZ::Data::AssetType GetAssetType() const = 0; - }; - - using RuntimeRequestBus = AZ::EBus; -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/AbstractCodeModel.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/AbstractCodeModel.cpp index 2ba248bb5e..4ccb462a5d 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/AbstractCodeModel.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/AbstractCodeModel.cpp @@ -32,7 +32,6 @@ #include "AbstractCodeModel.h" #include "ExecutionTraversalListeners.h" -#include "GrammarContextBus.h" #include "ParsingUtilities.h" #include "Primitives.h" @@ -670,6 +669,28 @@ namespace ScriptCanvas return AddVariable(Datum(type), rawName); } + void AbstractCodeModel::CheckForKnownNullDereference(ExecutionTreeConstPtr execution, const ExecutionInput& input, const Slot& inputSlot) + { + if (Data::IsValueType(inputSlot.GetDataType()) + || !execution->GetId().m_node + || !execution->GetId().m_slot + || (input.m_value && !input.m_value->m_datum.Empty())) + { + return; + } + + if (!input.m_value) + { + AddError(execution->GetId().m_node->GetEntityId(), nullptr, "Internal Error: CheckForKnownNullDereference called with input with no m_value"); + return; + } + + if (!execution->GetId().m_node->CanAcceptNullInput(*execution->GetId().m_slot, inputSlot)) + { + AddError(execution->GetId().m_node->GetEntityId(), nullptr, ParseErrors::NullInputKnown); + } + } + void AbstractCodeModel::CheckConversion(ConversionByIndex& conversion, VariableConstPtr source, size_t index, const Data::Type& targetType) { const Data::Type& sourceType = source->m_datum.GetType(); @@ -698,7 +719,7 @@ namespace ScriptCanvas } AZStd::string AbstractCodeModel::CheckUniqueInterfaceNames - (AZStd::string_view candidate + ( AZStd::string_view candidate , AZStd::string_view defaultName , AZStd::unordered_set& uniqueNames , const AZStd::unordered_set& nodelingsOut) @@ -2248,17 +2269,6 @@ namespace ScriptCanvas m_subgraphInterface.SetNamespacePath(m_source.m_namespacePath); -#if defined(FUNCTION_LEGACY_SUPPORT_ENABLED) - if (m_source.m_graph->IsFunctionGraph()) - { - m_variableScopeMeaning = VariableScopeMeaning_LegacyFunctions::FunctionPrototype; - m_subgraphInterface.MarkAllInputOutputShared(); - } - else - { - m_variableScopeMeaning = VariableScopeMeaning_LegacyFunctions::ValueInitialization; - } -#endif // The Order Matters: begin // add all data to the ACM for easy look up in input/output processing for ACM nodes @@ -2433,17 +2443,17 @@ namespace ScriptCanvas ExecutionTreePtr start = OpenScope(nullptr, startNode, nullptr); start->SetSymbol(Symbol::FunctionDefinition); + m_start = start; // cache the function definition if (!m_subgraphStartCalls.empty()) { - m_start = start; - + // call OnGraphStart on all the member nodeables first for (auto node : m_subgraphStartCalls) { ExecutionTreePtr childStartCall = CreateChild(start, node, nullptr); childStartCall->SetSymbol(Symbol::FunctionCall); childStartCall->SetName(k_OnGraphStartFunctionName); - childStartCall->MarkStart(); + childStartCall->MarkStartCall(); auto lexicalScopeOutcome = node->GetFunctionCallLexicalScope(nullptr); @@ -2489,11 +2499,13 @@ namespace ScriptCanvas } } + // ExecutionTreePtr start is now either the last child start() call, or the beginning of the function block, + // either way, parsing can continue from the ExecutionTreePtr start. + if (!outSlots.empty()) { start->AddChild({ outSlots[0], {}, nullptr }); - start->MarkStart(); - + ParseExecutionMultipleOutSyntaxSugar(start, outNodes, outSlots); PostParseProcess(start); PostParseErrorDetect(start); @@ -2501,24 +2513,10 @@ namespace ScriptCanvas if (!IsErrorFree()) { start->Clear(); - - if (m_start) - { - m_start->Clear(); - } - + m_start->Clear(); AddError(AZ::EntityId{}, nullptr, ScriptCanvas::ParseErrors::StartNodeFailedToParse); return; } - - if (!m_start) - { - m_start = start; - } - } - else - { - // add warning or notification on useless start node? } if (m_start) @@ -4308,10 +4306,7 @@ namespace ScriptCanvas void AbstractCodeModel::ParseInputDatum(ExecutionTreePtr execution, const Slot& input) { - // \todo look for crossed lines in inferred functions, because sometimes, rather than the input - // being named of the result of the output that emitted it, it will be the name of the inferred function - // parameter ---> make a map of node output to function input names - AZ_Assert(execution->GetSymbol() != Symbol::FunctionDefinition, "Function definition input should have been handled already"); + AZ_Assert(execution->GetSymbol() != Symbol::FunctionDefinition, "Function definition input is not handled in AbstractCodeModel::ParseInputDatum"); auto nodes = execution->GetId().m_node->GetConnectedNodes(input); if (nodes.empty()) @@ -4321,17 +4316,6 @@ namespace ScriptCanvas execution->AddInput({ &input, variable, DebugDataSource::FromVariable(input.GetId(), input.GetDataType(), variable->m_sourceVariableId) }); CheckConversion(execution->ModConversions(), variable, execution->GetInputCount() - 1, input.GetDataType()); } - // This concept may never actually be possible -// else if (RequiresCreationFunction(input.GetDataType().GetType())) -// { -// AddError(execution, aznew NotYetImplemented( -// "1: finish input created by name when connected to other nodes" -// "2: add the name to the scope" -// "3: and check inputs be re-used, common constructors like zero/1, etc" -// "4: read the variable name if it is present instead of creating it" -// "5: check for entity references to self and other member slice variables" -// "6: mark the variable with RequiredCreationFunction()")); -// } else { auto variableDatum = input.FindDatum(); @@ -4368,26 +4352,30 @@ namespace ScriptCanvas } else { - // we don't support this, yet, but visually we could - // we could support both things, technically...auto-generated inputs, and defaults on the non-connected - // execution thread, or whatever makes possible sense - // \todo send enough information to reveal the data path in the editor - + // This isn't supported visually, yet, but technically, it could be. + // One could connect both latent execution and immediate execution to the same code execution path, + // but only one uses connected output, and the other uses defaults. + // It would require us to change the visualization of the shared path, based on which parent was clicked on in the editor. const auto& targetNode = *execution->GetId().m_node; const auto& targetSlot = input; for (auto sourceNodeAndSlot : nodes) { AddError(nullptr, aznew ScopedDataConnectionEvent - (execution->GetNodeId() + ( execution->GetNodeId() , targetNode , targetSlot , *sourceNodeAndSlot.first , *sourceNodeAndSlot.second)); } + + return; } } + + // Check for known null reads + CheckForKnownNullDereference(execution, execution->GetInput(execution->GetInputCount() - 1), input); } bool AbstractCodeModel::ParseInputThisPointer(ExecutionTreePtr execution) @@ -4439,6 +4427,7 @@ namespace ScriptCanvas if (auto eventHandling = GetEBusEventHandling(node)) { auto variable = AZStd::make_shared(); + variable->m_isMember = true; variable->m_datum = Datum(eventHandling->m_handlerName); execution->MarkInputHasThisPointer(); execution->AddInput({ nullptr, variable, DebugDataSource::FromInternal() }); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/AbstractCodeModel.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/AbstractCodeModel.h index 92de21ff97..45e289739d 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/AbstractCodeModel.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/AbstractCodeModel.h @@ -207,8 +207,10 @@ namespace ScriptCanvas bool CheckCreateRoot(const Node& node); + void CheckForKnownNullDereference(ExecutionTreeConstPtr parent, const ExecutionInput& input, const Slot& inputSlot); + AZStd::string CheckUniqueInterfaceNames - (AZStd::string_view candidate + ( AZStd::string_view candidate , AZStd::string_view defaultName , AZStd::unordered_set& uniqueNames , const AZStd::unordered_set& nodelingsOut); @@ -594,24 +596,6 @@ namespace ScriptCanvas void ParseExecutionIfStatementBooleanExpression(ExecutionTreePtr booleanExpressionExecution, AZStd::string executionName, LexicalScope lexicalScope); void ParseExecutionIfStatementInternalFunction(ExecutionTreePtr internalFunctionExecution); - -#if defined(FUNCTION_LEGACY_SUPPORT_ENABLED) - public: - AZStd::vector FindAllVariablesInVariableFlagScope(VariableFlags::Scope scope) const; - - // scrape variables for scope, every Scope::In and InOut - AZStd::vector FindSubGraphInputValues() const; - - // scrape variables for scope, every Scope::Out and InOut - AZStd::vector FindSubGraphOutputValues() const; - - AZStd::vector GetLocalVariablesUser() const; - - VariableScopeMeaning_LegacyFunctions GetVariableScopeMeaning() const; - - private: - VariableScopeMeaning_LegacyFunctions m_variableScopeMeaning = VariableScopeMeaning_LegacyFunctions::ValueInitialization; -#endif }; // class AbstractCodeModel template diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/ExecutionTraversalListeners.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/ExecutionTraversalListeners.cpp index 1ac9303082..6ac80de542 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/ExecutionTraversalListeners.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/ExecutionTraversalListeners.cpp @@ -27,7 +27,6 @@ #include #include "ExecutionTraversalListeners.h" -#include "GrammarContextBus.h" #include "ParsingUtilities.h" #include "Primitives.h" diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/FunctionsLegacySupport.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/FunctionsLegacySupport.cpp deleted file mode 100644 index 5d16bd7f9c..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/FunctionsLegacySupport.cpp +++ /dev/null @@ -1,283 +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 "PrimitivesDeclarations.h" - -#if defined(FUNCTION_LEGACY_SUPPORT_ENABLED) - -#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 -#include -#include -#include -#include -#include - -#include "AbstractCodeModel.h" -#include "FunctionsLegacySupport.h" -#include "GrammarContextBus.h" -#include "ParsingUtilities.h" -#include "Primitives.h" - -namespace ScriptCanvas -{ - namespace Grammar - { - - void AbstractCodeModel::AddAllVariablesPreParse_LegacyFunctions() - { - // all variables assumed to be NOT persistent - in the live code they are reset when activated - // variables with no scope In/Out is assumed to be persistent, this is a mess with tick handlers - // warn on any variable attempted to be read before written - AZ_Assert(m_variableScopeMeaning == VariableScopeMeaning_LegacyFunctions::FunctionPrototype, "new graph type added without full support"); - auto& sourceVariables = m_source.m_variableData->GetVariables(); - - AZStd::set sortedVariables; - for (const auto& variablePair : sourceVariables) - { - sortedVariables.insert(&variablePair.second); - } - - for (auto& sourceVariable : sortedVariables) - { - auto datum = sourceVariable->GetDatum(); - AZ_Assert(datum != nullptr, "the datum must be valid"); - AddVariable(*datum, sourceVariable->GetVariableName(), sourceVariable->GetVariableId()); - } - } - - AZStd::vector AbstractCodeModel::FindSubGraphInputValues() const - { - return FindAllVariablesInVariableFlagScope(VariableFlags::Scope::Input); - } - - AZStd::vector AbstractCodeModel::FindSubGraphOutputValues() const - { - return FindAllVariablesInVariableFlagScope(VariableFlags::Scope::Output); - } - - AZStd::vector AbstractCodeModel::FindAllVariablesInVariableFlagScope(VariableFlags::Scope scope) const - { - AZStd::vector variables; - auto& sourceVariables = m_source.m_variableData->GetVariables(); - - for (auto& variable : m_variables) - { - if (IsSourceInScope(variable, scope)) - { - variables.push_back(variable); - } - } - - // sort by variable id - AZStd::sort(variables.begin(), variables.end(), [](const auto& lhs, const auto& rhs) { return lhs->m_sourceVariableId < rhs->m_sourceVariableId; }); - return variables; - } - - AZStd::vector AbstractCodeModel::GetLocalVariablesUser() const - { - AZStd::vector userLocalVariables; - - if (m_variableScopeMeaning == VariableScopeMeaning_LegacyFunctions::FunctionPrototype) - { - for (auto variable : m_variables) - { - if (!variable->m_isMember - && variable->m_sourceVariableId.IsValid() - && !IsSourceInScope(variable, VariableFlags::Scope::Input) - && !IsSourceInScope(variable, VariableFlags::Scope::Output)) - { - userLocalVariables.push_back(variable); - } - } - } - - return userLocalVariables; - } - - VariableScopeMeaning_LegacyFunctions AbstractCodeModel::GetVariableScopeMeaning() const - { - return m_variableScopeMeaning; - } - - bool SubgraphInterface::IsAllInputOutputShared() const - { - return m_isAllInputOutputShared; - } - - void SubgraphInterface::MarkAllInputOutputShared() - { - m_isAllInputOutputShared = true; - } - } // namespace Grammar - - namespace Nodes - { - namespace Core - { - void FunctionCallNode::BuildNodeFromSubgraphInterface - (const AZ::Data::Asset& runtimeAsset - , const SlotExecution::Map& previousMap) - { - // build the node here, from the asset topology, take the node/variable ordering from the function runtime data as a suggestion - // deal with updates and conversions after - const Grammar::SubgraphInterface& subgraphInterface = runtimeAsset.Get()->m_runtimeData.m_interface; - m_prettyName = runtimeAsset.Get()->m_runtimeData.m_name; - - if (!subgraphInterface.IsAllInputOutputShared()) - { - AZ_Error("ScriptCanvas", false, "the current assumption is that there is no way to distinguish between the input/output of different nodelings"); - return; - } - - // for now, all outputs are shared - Grammar::Outputs outputs; - bool sharedOutputInitialized = false; - - SlotExecution::Ins slotMapIns; - SlotExecution::Outs slotMapLatents; - - int slotOffset = 0; - - // add all ins->outs, in their display groups - for (size_t indexIn = 0; indexIn < subgraphInterface.GetInCount(); ++indexIn) - { - const Grammar::In& interfaceIn = subgraphInterface.GetIn(indexIn); - - SlotExecution::In slotMapIn = AddExecutionInSlotFromInterface(interfaceIn, slotOffset++, previousMap.FindInSlotIdBySource(interfaceIn.sourceID)); - if (!slotMapIn.slotId.IsValid()) - { - AZ_Error("ScriptCanvas", false, "Failed to add Execution In slot from sub graph interface"); - return; - } - slotMapIn.inputs = AddDataInputSlotFromInterface(interfaceIn.inputs, interfaceIn.sourceID, interfaceIn.displayName, previousMap, slotOffset); - for (auto& input : slotMapIn.inputs) - { - if (!input.slotId.IsValid()) - { - AZ_Error("ScriptCanvas", false, "Failed to add Input slot from sub graph interface"); - return; - } - } - - for (auto& interfaceOut : interfaceIn.outs) - { - SlotExecution::Out slotMapOut = AddExecutionOutSlotFromInterface(interfaceIn, interfaceOut, slotOffset++, previousMap.FindOutSlotIdBySource(interfaceIn.sourceID, interfaceOut.sourceID)); - if (!slotMapOut.slotId.IsValid()) - { - AZ_Error("ScriptCanvas", false, "Failed to add Execution Out slot from sub graph interface"); - return; - } - if (!sharedOutputInitialized) - { - outputs = interfaceOut.outputs; - sharedOutputInitialized = true; - } - - slotMapIn.outs.push_back(slotMapOut); - } - - slotMapIns.push_back(slotMapIn); - } - - // add all latents in their display groups - for (size_t indexLatent = 0; indexLatent < subgraphInterface.GetLatentOutCount(); ++indexLatent) - { - const Grammar::Out& interfaceLatent = subgraphInterface.GetLatentOut(indexLatent); - - SlotExecution::Out slotMapLatentOut = AddExecutionLatentOutSlotFromInterface(interfaceLatent, slotOffset++, previousMap.FindLatentSlotIdBySource(interfaceLatent.sourceID)); - if (!slotMapLatentOut.slotId.IsValid()) - { - AZ_Error("ScriptCanvas", false, "Failed to add Latent Out slot from sub graph interface"); - return; - } - slotMapLatentOut.returnValues.values = AddDataInputSlotFromInterface(interfaceLatent.returnValues, interfaceLatent.sourceID, interfaceLatent.displayName, previousMap, slotOffset); - for (auto& input : slotMapLatentOut.returnValues.values) - { - if (!input.slotId.IsValid()) - { - AZ_Error("ScriptCanvas", false, "Failed to add Input slot from sub graph interface"); - return; - } - } - - if (!sharedOutputInitialized) - { - outputs = interfaceLatent.outputs; - sharedOutputInitialized = true; - } - - slotMapLatents.push_back(slotMapLatentOut); - } - - // add all outputs one time, since they are currently all required to be part of all the signatures [\todo must fix] , in a variable display group - SlotExecution::Outputs slotMapOutputs = AddDataOutputSlotFromInterface(outputs, "", previousMap, slotOffset); - for (auto& output : slotMapOutputs) - { - if (!output.slotId.IsValid()) - { - AZ_Error("ScriptCanvas", false, "Failed to add Output slot from sub graph interface"); - return; - } - } - if (!subgraphInterface.IsLatent()) - { - for (auto& slotMapIn : slotMapIns) - { - for (auto& slotMapOut : slotMapIn.outs) - { - slotMapOut.outputs = slotMapOutputs; - } - } - } - else - { - for (auto& slotMapLatent : slotMapLatents) - { - slotMapLatent.outputs = slotMapOutputs; - } - } - - // when returning variables: sort variables by source slot id, they are sorted in the slot map, so just take them from the slot map - m_slotExecutionMap = AZStd::move(SlotExecution::Map(AZStd::move(slotMapIns), AZStd::move(slotMapLatents))); - m_slotExecutionMapSourceInterface = subgraphInterface; - m_asset = runtimeAsset; - SignalSlotsReordered(); - } - } // namespace Core - } // namespace Nodes -} - -#endif diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/FunctionsLegacySupport.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/FunctionsLegacySupport.h deleted file mode 100644 index 756537fcc7..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/FunctionsLegacySupport.h +++ /dev/null @@ -1,20 +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 - -namespace ScriptCanvas -{ - namespace Grammar - { - enum class VariableScopeMeaning_LegacyFunctions : AZ::u32 - { - ValueInitialization, - FunctionPrototype, - }; - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/GrammarContext.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/GrammarContext.cpp deleted file mode 100644 index b8eb5f5ad5..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/GrammarContext.cpp +++ /dev/null @@ -1,25 +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 "GrammarContext.h" - -namespace ScriptCanvas -{ - namespace Grammar - { - const SubgraphInterfaceSystem& Context::GetExecutionMapSystem() const - { - return m_executionMapSystem; - } - - SubgraphInterfaceSystem& Context::ModExecutionMapSystem() - { - return m_executionMapSystem; - } - } - -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/GrammarContext.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/GrammarContext.h deleted file mode 100644 index 7a9d2eaec9..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/GrammarContext.h +++ /dev/null @@ -1,37 +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 ScriptCanvas -{ - namespace Grammar - { - class Context - { - public: - AZ_CLASS_ALLOCATOR(Context, AZ::SystemAllocator, 0); - - Context() = default; - ~Context() = default; - - const SubgraphInterfaceSystem& GetExecutionMapSystem() const; - SubgraphInterfaceSystem& ModExecutionMapSystem(); - - private: - SubgraphInterfaceSystem m_executionMapSystem; - - // put grammatical state globals in here, things that can be useful across several parses of graphs - }; - } - -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/GrammarContextBus.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/GrammarContextBus.h deleted file mode 100644 index 1630d0b99e..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/GrammarContextBus.h +++ /dev/null @@ -1,35 +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 - -namespace ScriptCanvas -{ - namespace Grammar - { - class Context; - - struct RequestTraits : public AZ::EBusTraits - { - static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; - - virtual Context* GetGrammarContext() = 0; - }; - - using RequestBus = AZ::EBus; - - struct EventTraits : public AZ::EBusTraits - { - static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; - - // add stuff here to speed up parsing across separate graphs - }; - - using EventBus = AZ::EBus; - } - -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/PrimitivesDeclarations.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/PrimitivesDeclarations.h index 6ff1010509..12f4199bc4 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/PrimitivesDeclarations.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/PrimitivesDeclarations.h @@ -19,10 +19,6 @@ #include #include -#if defined (FUNCTION_LEGACY_SUPPORT_ENABLED) -#include "FunctionsLegacySupport.h" -#endif - namespace AZ { class ReflectContext; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/PrimitivesExecution.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/PrimitivesExecution.cpp index 0984440bf4..011dfeda97 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/PrimitivesExecution.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/PrimitivesExecution.cpp @@ -354,9 +354,9 @@ namespace ScriptCanvas return GetRoot()->m_isPure; } - bool ExecutionTree::IsStart() const + bool ExecutionTree::IsStartCall() const { - return m_isStart; + return m_isStartCall; } void ExecutionTree::MarkDebugEmptyStatement() @@ -403,9 +403,9 @@ namespace ScriptCanvas root->m_isLatent = true; } - void ExecutionTree::MarkStart() + void ExecutionTree::MarkStartCall() { - m_isStart = true; + m_isStartCall = true; } ExecutionChild& ExecutionTree::ModChild(size_t index) diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/PrimitivesExecution.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/PrimitivesExecution.h index c86f445a68..80d602ad17 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/PrimitivesExecution.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/PrimitivesExecution.h @@ -199,7 +199,7 @@ namespace ScriptCanvas bool IsPure() const; - bool IsStart() const; + bool IsStartCall() const; void MarkDebugEmptyStatement(); @@ -215,7 +215,7 @@ namespace ScriptCanvas void MarkRootLatent(); - void MarkStart(); + void MarkStartCall(); ExecutionChild& ModChild(size_t index); @@ -286,7 +286,7 @@ namespace ScriptCanvas bool m_isPure = false; - bool m_isStart = false; + bool m_isStartCall = false; bool m_hasExplicitUserOutCalls = false; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/BaseTimerNode.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/BaseTimerNode.cpp index 598671becb..3980fbd044 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/BaseTimerNode.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/BaseTimerNode.cpp @@ -23,15 +23,6 @@ namespace ScriptCanvas } } - ////////////////// - // BaseTimerNode - ////////////////// - - BaseTimerNode::~BaseTimerNode() - { - StopTimer(); - } - void BaseTimerNode::OnInit() { AZStd::string slotName = GetTimeSlotName(); @@ -74,11 +65,6 @@ namespace ScriptCanvas AddTimeDataSlot(); } - void BaseTimerNode::OnDeactivate() - { - StopTimer(); - } - void BaseTimerNode::ConfigureVisualExtensions() { { @@ -103,54 +89,7 @@ namespace ScriptCanvas return nullptr; } - - void BaseTimerNode::OnSystemTick() - { - AZ::SystemTickBus::Handler::BusDisconnect(); - - if (!AZ::TickBus::Handler::BusIsConnected()) - { - AZ::TickBus::Handler::BusConnect(); - } - } - - void BaseTimerNode::OnTick(float delta, AZ::ScriptTimePoint) - { - if (m_timeUnits == TimeUnits::Ticks) - { - m_timerCounter += 1; - } - switch (m_timeUnits) - { - case TimeUnits::Ticks: - m_timerCounter += 1; - break; - case TimeUnits::Milliseconds: - case TimeUnits::Seconds: - m_timerCounter += delta; - break; - default: - break; - } - - while (m_timerCounter > m_timerDuration) - { - if (!m_isActive) - { - break; - } - - m_timerCounter -= m_timerDuration; - - OnTimeElapsed(); - } - } - - int BaseTimerNode::GetTickOrder() - { - return m_tickOrder; - } - + void BaseTimerNode::AddTimeDataSlot() { if (!m_timeSlotId.IsValid()) @@ -174,70 +113,6 @@ namespace ScriptCanvas } } - void BaseTimerNode::StartTimer() - { - StopTimer(); - - m_isActive = true; - - const Datum* datum = FindDatum(m_timeSlotId); - - if (datum) - { - const Data::NumberType* timeAmount = datum->GetAs(); - - if (timeAmount) - { - m_timerDuration = (*timeAmount); - m_timerCounter = 0; - - // Manage the different unit types - if (m_timeUnits == TimeUnits::Ticks) - { - // Remove all of the floating points - m_timerDuration = aznumeric_cast(aznumeric_cast(m_timerDuration)); - } - else if (m_timeUnits == TimeUnits::Milliseconds) - { - m_timerDuration /= 1000.0; - } - } - } - - if (AZ::TickBus::Handler::BusIsConnected()) - { - AZ::TickBus::Handler::BusDisconnect(); - } - - if (AZ::SystemTickBus::Handler::BusIsConnected()) - { - AZ::SystemTickBus::Handler::BusDisconnect(); - } - - if (!AZ::IsClose(m_timerDuration, 0.0, DBL_EPSILON)) - { - AZ::SystemTickBus::Handler::BusConnect(); - } - else if (AllowInstantResponse()) - { - while (m_isActive) - { - OnTimeElapsed(); - } - } - } - - void BaseTimerNode::StopTimer() - { - m_isActive = false; - - m_timerCounter = 0.0; - m_timerDuration = 0.0; - - AZ::SystemTickBus::Handler::BusDisconnect(); - AZ::TickBus::Handler::BusDisconnect(); - } - AZStd::string BaseTimerNode::GetTimeSlotName() const { return GetBaseTimeSlotName(); @@ -283,11 +158,7 @@ namespace ScriptCanvas { return false; } - - void BaseTimerNode::OnTimeElapsed() - { - } - + void BaseTimerNode::ConfigureTimeSlot(DataSlotConfiguration& configuration) { AZ_UNUSED(configuration); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/BaseTimerNode.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/BaseTimerNode.h index ca4306cb6e..3977807305 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/BaseTimerNode.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/BaseTimerNode.h @@ -7,10 +7,7 @@ #pragma once -#include - #include - #include namespace ScriptCanvas @@ -23,8 +20,6 @@ namespace ScriptCanvas class BaseTimerNode : public Node , public NodePropertyInterfaceListener - , public AZ::TickBus::Handler - , public AZ::SystemTickBus::Handler { public: @@ -44,32 +39,16 @@ namespace ScriptCanvas "Seconds" }; - virtual ~BaseTimerNode(); - // Node... void OnInit() override; void OnConfigured() override; - void OnDeactivate() override; void ConfigureVisualExtensions() override; NodePropertyInterface* GetPropertyInterface(AZ::Crc32 propertyId) override; - //// - - // SystemTickBus... - void OnSystemTick() override; - //// - - // TickBus... - void OnTick(float delta, AZ::ScriptTimePoint timePoint) override; - int GetTickOrder() override; - //// - + // Method that will handle displaying and viewing of the time slot void AddTimeDataSlot(); - void StartTimer(); - void StopTimer(); - AZStd::string GetTimeSlotName() const; protected: @@ -83,7 +62,6 @@ namespace ScriptCanvas bool IsActive() const; virtual bool AllowInstantResponse() const; - virtual void OnTimeElapsed(); // Store until versioning is complete virtual const char* GetTimeSlotFormat() const { return "Time (%s)"; } @@ -105,7 +83,7 @@ namespace ScriptCanvas //// int m_timeUnits = 0; - int m_tickOrder = static_cast(AZ::TICK_DEFAULT); + int m_tickOrder = 1000; // from TICK_DEFAULT bool m_isActive = false; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/ExpressionNodeBase.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/ExpressionNodeBase.cpp index aef18a9255..c4f8f0edd5 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/ExpressionNodeBase.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/ExpressionNodeBase.cpp @@ -112,37 +112,6 @@ namespace ScriptCanvas } } - void ExpressionNodeBase::OnInputSignal(const SlotId& slotId) - { - if (slotId == ExpressionNodeBaseProperty::GetInSlotId(this)) - { - for (const SlotId& dirtySlotId : m_dirtyInputs) - { - auto variableIter = m_slotToVariableMap.find(dirtySlotId); - - if (variableIter != m_slotToVariableMap.end()) - { - PushVariable(variableIter->second, (*FindDatum(dirtySlotId))); - } - } - - m_dirtyInputs.clear(); - - if (m_parseError.IsValidExpression() && m_expressionTree.GetTreeSize() != 0) - { - ExpressionEvaluation::ExpressionResult expressionResult; - ExpressionEvaluation::ExpressionEvaluationRequestBus::BroadcastResult(expressionResult, &ExpressionEvaluation::ExpressionEvaluationRequests::Evaluate, m_expressionTree); - - OnResult(expressionResult); - } - } - } - - void ExpressionNodeBase::OnInputChanged([[maybe_unused]] const Datum& input, const SlotId& slotId) - { - m_dirtyInputs.insert(slotId); - } - bool ExpressionNodeBase::CanDeleteSlot([[maybe_unused]] const SlotId& slotId) const { return m_handlingExtension; @@ -474,11 +443,6 @@ namespace ScriptCanvas }); } - void ExpressionNodeBase::OnResult([[maybe_unused]] const ExpressionEvaluation::ExpressionResult& result) - { - AZ_Assert(false, "Implementing node must override OnResult."); - } - ExpressionEvaluation::ParseOutcome ExpressionNodeBase::ParseExpression([[maybe_unused]] const AZStd::string& formatString) { AZ_Assert(false , "Implementing node must override OnResult."); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/ExpressionNodeBase.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/ExpressionNodeBase.h index 4f8949ba4b..32886e0cd2 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/ExpressionNodeBase.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/ExpressionNodeBase.h @@ -37,8 +37,6 @@ namespace ScriptCanvas AZStd::string GetRawFormat() const; const AZStd::unordered_map& GetSlotsByName() const; - - protected: @@ -53,10 +51,6 @@ namespace ScriptCanvas void OnInit() override; void OnPostActivate() override; void ConfigureVisualExtensions() override; - - void OnInputSignal(const SlotId& slotId) override; - void OnInputChanged(const Datum& input, const SlotId& slotId) override; - bool CanDeleteSlot(const SlotId& slotId) const override; SlotId HandleExtension(AZ::Crc32 extensionId) override; @@ -80,14 +74,11 @@ namespace ScriptCanvas AZ::Crc32 GetPropertyId() const { return AZ_CRC("FormatStringProperty", 0x2c587efa); } protected: - - virtual void OnResult(const ExpressionEvaluation::ExpressionResult& result); virtual ExpressionEvaluation::ParseOutcome ParseExpression(const AZStd::string& formatString); virtual AZStd::string GetExpressionSeparator() const; private: - void PushVariable(const AZStd::string& variableName, const Datum& datum); // NodePropertyInterface... @@ -110,7 +101,6 @@ namespace ScriptCanvas bool m_isInError = false; AZStd::unordered_map m_slotToVariableMap; - AZStd::unordered_set m_dirtyInputs; AZStd::unordered_map m_slotsByVariables; ExpressionEvaluation::ParsingError m_parseError; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/EqualTo.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/EqualTo.h index 8d597884ed..1e9a821761 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/EqualTo.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/EqualTo.h @@ -41,22 +41,6 @@ namespace ScriptCanvas } } } - - protected: - Datum Evaluate(const Datum& lhs, const Datum& rhs) override - { - ComparisonOutcome result(lhs == rhs); - - if (result.IsSuccess()) - { - return Datum(result.GetValue()); - } - else - { - SCRIPTCANVAS_REPORT_ERROR((*this), result.GetError().c_str()); - return Datum(false); - } - } }; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/Greater.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/Greater.h index baa4762911..d70158ccd1 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/Greater.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/Greater.h @@ -40,21 +40,6 @@ namespace ScriptCanvas } } } - - protected: - Datum Evaluate(const Datum& lhs, const Datum& rhs) override - { - ComparisonOutcome result(lhs > rhs); - if (result.IsSuccess()) - { - return Datum(result.GetValue()); - } - else - { - SCRIPTCANVAS_REPORT_ERROR((*this), result.GetError().c_str()); - return Datum(false); - } - } }; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/GreaterEqual.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/GreaterEqual.h index e9f5c06501..8546956aa6 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/GreaterEqual.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/GreaterEqual.h @@ -41,21 +41,6 @@ namespace ScriptCanvas } } } - - protected: - Datum Evaluate(const Datum& lhs, const Datum& rhs) override - { - ComparisonOutcome result(lhs >= rhs); - if (result.IsSuccess()) - { - return Datum(result.GetValue()); - } - else - { - SCRIPTCANVAS_REPORT_ERROR((*this), result.GetError().c_str()); - return Datum(false); - } - } }; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/Less.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/Less.h index b16f447d92..2c54247580 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/Less.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/Less.h @@ -40,22 +40,6 @@ namespace ScriptCanvas } } } - - protected: - Datum Evaluate(const Datum& lhs, const Datum& rhs) override - { - ComparisonOutcome result(lhs < rhs); - - if (result.IsSuccess()) - { - return Datum(result.GetValue()); - } - else - { - SCRIPTCANVAS_REPORT_ERROR((*this), result.GetError().c_str()); - return Datum(false); - } - } }; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/LessEqual.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/LessEqual.h index 35364b918f..7f0077588f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/LessEqual.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/LessEqual.h @@ -40,22 +40,6 @@ namespace ScriptCanvas } } } - - protected: - Datum Evaluate(const Datum& lhs, const Datum& rhs) override - { - ComparisonOutcome result(lhs <= rhs); - - if (result.IsSuccess()) - { - return Datum(result.GetValue()); - } - else - { - SCRIPTCANVAS_REPORT_ERROR((*this), result.GetError().c_str()); - return Datum(false); - } - } }; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/NotEqualTo.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/NotEqualTo.h index c11ff1ba05..b3f6158aa2 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/NotEqualTo.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/NotEqualTo.h @@ -40,22 +40,6 @@ namespace ScriptCanvas } } } - - protected: - Datum Evaluate(const Datum& lhs, const Datum& rhs) override - { - ComparisonOutcome result(lhs != rhs); - - if (result.IsSuccess()) - { - return Datum(result.GetValue()); - } - else - { - SCRIPTCANVAS_REPORT_ERROR((*this), result.GetError().c_str()); - return Datum(false); - } - } }; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Assign.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Assign.cpp deleted file mode 100644 index 39faae9f0a..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Assign.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 "Assign.h" - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Core - { - void Assign::OnInit() - { - AddSlot("In", "", SlotType::ExecutionIn); - AddSlot("Out", "", SlotType::ExecutionOut); - AddInputDatumDynamicTypedSlot("Source"); - AddSlot("Target", "", SlotType::DataOut); - } - - Data::Type Assign::GetSlotDataType(const SlotId& slotId) const - { - if (Slot* sourceSlot = GetSlot(GetSlotId("Source"))) - { - auto inputs = GetConnectedNodes(*sourceSlot); - // contracts should enforce this, but in case it breaks... - if (inputs.size() == 1) - { - auto input = *inputs.begin(); - return input.first->GetSlotDataType(input.second); - } - else - { - AZ_Error("ScriptCanvas", (inputs.size() == 0), "Multiple inputs to 'Assign' are forbidden"); - } - } - - return Data::Type::Invalid(); - } - - void Assign::OnInputSignal(const SlotId&) - { - if (auto input = GetDatumByIndex(k_sourceInputIndex)) - { - PushOutput(*input, *GetSlotByIndex(k_targetSlotIndex)); - } - - SignalOutput(GetSlotId("Out")); - } - - AZStd::Outcome Assign::SlotAcceptsType(const SlotId& slotID, const Data::Type& type) const - { - Slot* sourceSlot = GetSlot(GetSlotId("Source")); - Slot* targetSlot = GetSlot(GetSlotId("Target")); - - if (sourceSlot == nullptr - || targetSlot == nullptr) - { - return AZ::Failure(AZStd::string("Unable to find all necessary slots on node");) - } - - return DynamicSlotAcceptsType(slotID, type, Node::DynamicTypeArity::Single, *targetSlot, AZStd::vector{sourceSlot}); - } - - void Assign::Reflect(AZ::ReflectContext* reflectContext) - { - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflectContext)) - { - serializeContext->Class() - ->Version(0) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("Assign", "") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All) - ->Attribute(AZ::Edit::Attributes::Icon, "Editor/Icons/ScriptCanvas/Placeholder.png") - ; - } - } - } - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Assign.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Assign.h deleted file mode 100644 index 89d164f3d2..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Assign.h +++ /dev/null @@ -1,39 +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 ScriptCanvas -{ - namespace Nodes - { - namespace Core - { - class Assign - : public Node - { - public: - AZ_COMPONENT(Assign, "{E734ADCE-D822-4487-9681-5A80D8E4D263}", Node); - - static void Reflect(AZ::ReflectContext* reflectContext); - - protected: - static const int k_sourceInputIndex = 0; - static const int k_targetSlotIndex = 3; - - Data::Type GetSlotDataType(const SlotId& slotId) const override; - void OnInit() override; - void OnInputSignal(const SlotId&) override; - AZ::Outcome SlotAcceptsType(const SlotId&, const Data::Type&) const override; - - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BehaviorContextObjectNode.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BehaviorContextObjectNode.cpp deleted file mode 100644 index c4d3b6f302..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BehaviorContextObjectNode.cpp +++ /dev/null @@ -1,216 +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 "BehaviorContextObjectNode.h" - -#include -#include -#include - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Core - { - namespace Internal - { - static const AZ::u32 k_thisParamIndex(0); - static const AZ::u32 k_setValueParamIndex(1); - static const AZ::u32 k_firstFirstPropertyDataSlotIndex(2); - static const AZ::u32 k_valueArgumentIndex(1); - static const char* k_setThis("Set"); - } - - AZStd::string BehaviorContextObjectNode::GetDebugName() const - { - if (auto input = FindDatum(GetSlotId(Internal::k_setThis))) - { - return Data::GetName(input->GetType()); - } - - return "Invalid"; - } - - void BehaviorContextObjectNode::InitializeObject(const AZ::Uuid& azType) - { - // \todo this works with basic types, and it probably shouldn't - if (auto bcClass = AZ::BehaviorContextHelper::GetClass(azType)) - { - InitializeObject(*bcClass); - } - else - { - const void* defaultValue = nullptr; - if (Data::IsEntityID(azType)) - { - defaultValue = &ScriptCanvas::GraphOwnerId; - } - AddInputAndOutputTypeSlot(Data::FromAZType(azType), defaultValue); - } - } - - void BehaviorContextObjectNode::InitializeObject(const AZStd::string& classNameString) - { - if (auto bcClass = AZ::BehaviorContextHelper::GetClass(classNameString)) - { - InitializeObject(*bcClass); - } - } - - void BehaviorContextObjectNode::InitializeObject(const AZ::BehaviorClass& behaviorClass) - { - m_className = behaviorClass.m_name; - const void* defaultValue = nullptr; - if (Data::IsEntityID(behaviorClass.m_typeId)) - { - defaultValue = &ScriptCanvas::GraphOwnerId; - } - AddInputAndOutputTypeSlot(Data::FromAZType(behaviorClass.m_typeId), defaultValue); - ConfigureProperties(behaviorClass); - } - - void BehaviorContextObjectNode::InitializeObject(const Data::Type& type) - { - if (auto bcClass = AZ::BehaviorContextHelper::GetClass(type.GetAZType())) - { - InitializeObject(*bcClass); - } - } - - void BehaviorContextObjectNode::ConfigureSetters(const AZ::BehaviorClass& behaviorClass) - { - Data::SetterContainer setterWrappers = Data::ExplodeToSetters(Data::FromAZType(behaviorClass.m_typeId)); - for (const auto& setterWrapperPair : setterWrappers) - { - SlotId setterSlotId; - auto propertyIt = behaviorClass.m_properties.find(setterWrapperPair.first); - if (propertyIt != behaviorClass.m_properties.end()) - { - const Data::SetterWrapper& setterWrapper = setterWrapperPair.second; - const AZStd::string argName = AZStd::string::format("%s: %s", Data::GetName(setterWrapper.m_propertyType).data(), setterWrapper.m_propertyName.data()); - const AZStd::string* argumentTooltipPtr = propertyIt->second->m_setter->GetArgumentToolTip(Internal::k_setValueParamIndex); - AZStd::string_view argumentTooltip = argumentTooltipPtr ? AZStd::string_view(*argumentTooltipPtr) : AZStd::string_view{}; - - // Add the slot if it doesn't exist - setterSlotId = FindSlotIdForDescriptor(argName, SlotDescriptors::DataIn()); - - if (!setterSlotId.IsValid()) - { - DataSlotConfiguration slotConfiguration; - - slotConfiguration.m_name = argName; - slotConfiguration.m_toolTip = argumentTooltip; - slotConfiguration.SetType(setterWrapper.m_propertyType); - slotConfiguration.SetConnectionType(ConnectionType::Input); - - setterSlotId = AddSlot(slotConfiguration); - } - - } - if (setterSlotId.IsValid()) - { - m_propertyAccount.m_getterSetterIdPairs[setterWrapperPair.first].second = setterSlotId; - m_propertyAccount.m_settersByInputSlot.emplace(setterSlotId, setterWrapperPair.second); - } - } - } - - void BehaviorContextObjectNode::ConfigureGetters(const AZ::BehaviorClass& behaviorClass) - { - Data::GetterContainer getterWrappers = Data::ExplodeToGetters(Data::FromAZType(behaviorClass.m_typeId)); - for (const auto& getterWrapperPair : getterWrappers) - { - SlotId getterSlotId; - auto propertyIt = behaviorClass.m_properties.find(getterWrapperPair.first); - if (propertyIt != behaviorClass.m_properties.end()) - { - const Data::GetterWrapper& getterWrapper = getterWrapperPair.second; - const AZStd::string resultSlotName(AZStd::string::format("%s: %s", getterWrapper.m_propertyName.data(), Data::GetName(getterWrapper.m_propertyType).data())); - - // Add the slot if it doesn't exist - getterSlotId = FindSlotIdForDescriptor(resultSlotName, SlotDescriptors::DataOut()); - - if (!getterSlotId.IsValid()) - { - DataSlotConfiguration slotConfiguration; - - slotConfiguration.m_name = resultSlotName; - slotConfiguration.SetType(getterWrapper.m_propertyType); - slotConfiguration.SetConnectionType(ConnectionType::Output); - - getterSlotId = AddSlot(slotConfiguration); - } - - } - if (getterSlotId.IsValid()) - { - m_propertyAccount.m_getterSetterIdPairs[getterWrapperPair.first].first = getterSlotId; - m_propertyAccount.m_gettersByInputSlot.emplace(getterSlotId, getterWrapperPair.second); - } - } - } - - void BehaviorContextObjectNode::ConfigureProperties(const AZ::BehaviorClass& behaviorClass) - { - if (IsConfigured()) - { - return; - } - - ConfigureGetters(behaviorClass); - ConfigureSetters(behaviorClass); - m_configured = true; - } - - void BehaviorContextObjectNode::OnInit() - { - if (auto input = FindDatum(GetSlotId(k_setThis))) - { - if (!input->Empty()) - { - AddInputTypeAndOutputTypeSlot(input->GetType()); - } - } - } - - void BehaviorContextObjectNode::OnWriteEnd() - { - AZStd::lock_guard lock(m_mutex); - - auto bcClass = !m_className.empty() ? AZ::BehaviorContextHelper::GetClass(m_className) : nullptr; - - if (bcClass) - { - ConfigureProperties(*bcClass); - } - } - - - void BehaviorContextObjectNode::Reflect(AZ::ReflectContext* reflectContext) - { - if (auto serializeContext = azrtti_cast(reflectContext)) - { - serializeContext->Class() - ->Version(1) - ->EventHandler>() - ->Field("m_className", &BehaviorContextObjectNode::m_className) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("BehaviorContextObjectNode", "BehaviorContextObjectNode") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::List) - ; - } - } - } - - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BehaviorContextObjectNode.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BehaviorContextObjectNode.h deleted file mode 100644 index 88680fd0a3..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BehaviorContextObjectNode.h +++ /dev/null @@ -1,73 +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 -#include - -namespace AZ -{ - class BehaviorClass; - struct BehaviorValueParameter; - class ReflectContext; -} - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Core - { - class BehaviorContextObjectNode - : public PureData - { - public: - //\todo move to behavior context - enum ParameterCount - { - Getter = 1, - Setter = 2, - }; - - AZ_COMPONENT(BehaviorContextObjectNode, "{4344869D-2543-4FA3-BCD0-B6DB1E815928}", PureData); - - static void Reflect(AZ::ReflectContext* reflectContext); - - BehaviorContextObjectNode() = default; - - ~BehaviorContextObjectNode() override = default; - - AZStd::string GetDebugName() const override; - - void InitializeObject(const AZ::Uuid& azType); - - void InitializeObject(const AZStd::string& classNameString); - - void InitializeObject(const Data::Type& type); - - void OnWriteEnd(); - - protected: - void InitializeObject(const AZ::BehaviorClass& behaviorClass); - void OnInit() override; - - virtual void ConfigureSetters(const AZ::BehaviorClass& behaviorClass); - virtual void ConfigureGetters(const AZ::BehaviorClass& behaviorClass); - void ConfigureProperties(const AZ::BehaviorClass& behaviorClass); - - private: - AZStd::recursive_mutex m_mutex; // post-serialization - AZStd::string m_className; - - BehaviorContextObjectNode(const BehaviorContextObjectNode&) = delete; - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BinaryOperator.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BinaryOperator.cpp index 7b840862bd..8afb5138e1 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BinaryOperator.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BinaryOperator.cpp @@ -75,20 +75,6 @@ namespace ScriptCanvas } } - void ArithmeticExpression::OnInputSignal(const SlotId& slotId) - { - if (slotId == GetSlotId(k_evaluateName)) - { - const Datum output = Evaluate(*FindDatumByIndex(k_datumIndexLHS), *FindDatumByIndex(k_datumIndexRHS)); - if (auto slot = GetSlot(GetOutputSlotId())) - { - PushOutput(output, *slot); - } - - SignalOutput(GetSlotId(k_outName)); - } - } - void ArithmeticExpression::Reflect(AZ::ReflectContext* reflection) { if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) @@ -107,17 +93,6 @@ namespace ScriptCanvas } } - Datum BinaryOperator::Evaluate([[maybe_unused]] const Datum& lhs, [[maybe_unused]] const Datum& rhs) - { - AZ_Assert(false, "Evaluate must be overridden"); - return Datum(); - }; - - void BinaryOperator::OnInputSignal([[maybe_unused]] const SlotId& slot) - { - AZ_Assert(false, "OnInputSignal must be overridden"); - } - void BinaryOperator::OnInit() { { @@ -159,28 +134,6 @@ namespace ScriptCanvas AZ_Assert(false, "InitializeBooleanExpression must be overridden"); } - void BooleanExpression::OnInputSignal(const SlotId& slotId) - { - if (slotId == GetSlotId(k_evaluateName)) - { - const Datum output = Evaluate(*FindDatumByIndex(k_datumIndexLHS), *FindDatumByIndex(k_datumIndexRHS)); - if (auto slot = GetSlot(GetOutputSlotId())) - { - PushOutput(output, *slot); - } - - const bool* result = output.GetAs(); - if (result && *result) - { - SignalOutput(GetSlotId(k_onTrue)); - } - else - { - SignalOutput(GetSlotId(k_onFalse)); - } - } - } - void BooleanExpression::OnInit() { { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BinaryOperator.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BinaryOperator.h index 92890b2842..64e59b593d 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BinaryOperator.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BinaryOperator.h @@ -1,6 +1,6 @@ /* * 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 * */ @@ -10,7 +10,6 @@ #include #include #include -#include #include namespace ScriptCanvas @@ -24,7 +23,7 @@ namespace ScriptCanvas AZ_COMPONENT(BinaryOperator, "{5BD0E8C7-9B0A-42F5-9EB0-199E6EC8FA99}", Node); static void Reflect(AZ::ReflectContext* reflection); - + static const char* k_lhsName; static const char* k_rhsName; static const char* k_resultName; @@ -34,8 +33,6 @@ namespace ScriptCanvas static const char* k_onTrue; static const char* k_onFalse; - - protected: ConstSlotsOutcome GetSlotsInExecutionThreadByTypeImpl(const Slot& /*executionSlot*/, CombinedSlotType targetSlotType, const Slot* /*executionChildSlot*/) const override { @@ -48,15 +45,9 @@ namespace ScriptCanvas void OnInit() override; - // must be overridden with the binary operations - virtual Datum Evaluate(const Datum& lhs, const Datum& rhs); - - // Triggered by the execution signal - void OnInputSignal(const SlotId& slot) override; - SlotId GetOutputSlotId() const; }; - + class ArithmeticExpression : public BinaryOperator { @@ -66,24 +57,20 @@ namespace ScriptCanvas static void Reflect(AZ::ReflectContext* reflection); bool IsDeprecated() const override { return true; } - + void CustomizeReplacementNode(Node* replacementNode, AZStd::unordered_map>& outSlotIdMap) const override; protected: // adds Number inputs, adds Number output type void OnInit() override; - - void OnInputSignal(const SlotId& slot) override; - - }; - + class BooleanExpression : public BinaryOperator { public: AZ_COMPONENT(BooleanExpression, "{36C69825-CFF8-4F70-8F3B-1A9227E8BEEA}", BinaryOperator); - + static void Reflect(AZ::ReflectContext* reflection); ////////////////////////////////////////////////////////////////////////// @@ -106,31 +93,27 @@ namespace ScriptCanvas ////////////////////////////////////////////////////////////////////////// protected: - // initialize boolean expression, adds boolean output type calls + // initialize boolean expression, adds boolean output type calls void OnInit() override; virtual void InitializeBooleanExpression(); - void OnInputSignal(const SlotId& slot) override; - }; // accepts any type, checks for type equality, and then value equality or pointer equality class EqualityExpression - : public BooleanExpression + : public BooleanExpression { public: AZ_COMPONENT(EqualityExpression, "{78D20EB6-BA07-4071-B646-7C2D68A0A4A6}", BooleanExpression); - + static void Reflect(AZ::ReflectContext* reflection); - + protected: // adds any required input types void InitializeBooleanExpression() override; private: - SlotId m_firstSlotId; SlotId m_secondSlotId; - ScriptCanvas::Data::Type m_displayType; }; @@ -142,11 +125,10 @@ namespace ScriptCanvas AZ_COMPONENT(ComparisonExpression, "{82C50EAD-D3DD-45D2-BFCE-981D95771DC8}", EqualityExpression); static void Reflect(AZ::ReflectContext* reflection); - + protected: // adds number types void InitializeBooleanExpression() override; - }; - } -} + } +} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/CoreNodes.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/CoreNodes.cpp index f5a9148231..bd86696596 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/CoreNodes.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/CoreNodes.cpp @@ -99,13 +99,9 @@ namespace ScriptCanvas void Core::InitNodeRegistry(NodeRegistry& nodeRegistry) { using namespace ScriptCanvas::Nodes::Core; - AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); @@ -124,13 +120,9 @@ namespace ScriptCanvas AZStd::vector Core::GetComponentDescriptors() { return AZStd::vector({ - ScriptCanvas::Nodes::Core::Error::CreateDescriptor(), - ScriptCanvas::Nodes::Core::ErrorHandler::CreateDescriptor(), ScriptCanvas::Nodes::Core::Method::CreateDescriptor(), ScriptCanvas::Nodes::Core::MethodOverloaded::CreateDescriptor(), - ScriptCanvas::Nodes::Core::BehaviorContextObjectNode::CreateDescriptor(), ScriptCanvas::Nodes::Core::Start::CreateDescriptor(), - ScriptCanvas::Nodes::Core::String::CreateDescriptor(), ScriptCanvas::Nodes::Core::EBusEventHandler::CreateDescriptor(), ScriptCanvas::Nodes::Core::AzEventHandler::CreateDescriptor(), ScriptCanvas::Nodes::Core::ExtractProperty::CreateDescriptor(), diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/CoreNodes.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/CoreNodes.h index 2551dfb4b1..f1c921b1ca 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/CoreNodes.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/CoreNodes.h @@ -10,10 +10,7 @@ // This header is only meant to include the nodes and should not contain // shared code -#include "BehaviorContextObjectNode.h" #include "EBusEventHandler.h" -#include "Error.h" -#include "ErrorHandler.h" #include "ExtractProperty.h" #include "FunctionDefinitionNode.h" #include "ForEach.h" @@ -28,4 +25,3 @@ #include "SendScriptEvent.h" #include "SetVariable.h" #include "Start.h" -#include "String.h" diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/EBusEventHandler.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/EBusEventHandler.cpp index fb43e41ad8..d28f375707 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/EBusEventHandler.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/EBusEventHandler.cpp @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include @@ -59,16 +58,6 @@ namespace ScriptCanvas SetAutoConnectToGraphOwner(m_autoConnectToGraphOwner); } - void EBusEventHandler::OnPostActivate() - { - - } - - void EBusEventHandler::OnDeactivate() - { - Disconnect(); - } - void EBusEventHandler::OnGraphSet() { GraphScopedNodeId scopedNodeId(GetOwningScriptCanvasId(), GetEntityId()); @@ -127,14 +116,6 @@ namespace ScriptCanvas } } - void EBusEventHandler::Connect() - { - } - - void EBusEventHandler::Disconnect() - { - } - AZ::Outcome EBusEventHandler::GetDependencies() const { return AZ::Success(DependencyReport{}); @@ -149,12 +130,12 @@ namespace ScriptCanvas { return IsIDRequired(); } - + bool EBusEventHandler::IsAutoConnected() const { return m_autoConnectToGraphOwner; } - + const Datum* EBusEventHandler::GetHandlerStartAddress() const { return FindDatum(GetSlotId(c_busIdName)); @@ -222,7 +203,7 @@ namespace ScriptCanvas { return AZ::Success(entry->m_eventName); } - + return AZ::Failure(); } @@ -263,7 +244,7 @@ namespace ScriptCanvas { return EventHandlerTranslationHelper::GetSlotsInExecutionThreadByType(*this, executionSlot, targetSlotType); } - + AZStd::vector EBusEventHandler::GetNonEventSlotIds() const { AZStd::vector nonEventSlotIds; @@ -330,7 +311,7 @@ namespace ScriptCanvas return true; } - const AZ::BehaviorEBusHandler::BusForwarderEvent& event = m_handler->GetEvents()[eventIndex]; + const AZ::BehaviorEBusHandler::BusForwarderEvent& event = m_handler->GetEvents()[eventIndex]; // Compare output type const bool eventHasOutput = !event.m_parameters.empty() && !event.m_parameters.front().m_typeId.IsNull() && event.m_parameters.front().m_typeId != azrtti_typeid(); @@ -470,7 +451,7 @@ namespace ScriptCanvas config.m_name = c_busIdName; config.m_toolTip = busToolTip; config.SetConnectionType(ConnectionType::Input); - + if (busId == azrtti_typeid()) { config.SetDefaultValue(GraphOwnerId); @@ -478,7 +459,7 @@ namespace ScriptCanvas else { Data::Type busIdType(AZ::BehaviorContextHelper::IsStringParameter(m_ebus->m_idParam) ? Data::Type::String() : Data::FromAZType(busId)); - + config.ConfigureDatum(AZStd::move(Datum(busIdType, Datum::eOriginality::Original))); } @@ -515,7 +496,6 @@ namespace ScriptCanvas const AZ::BehaviorEBusHandler::BusForwarderEvent& event = events[eventIndex]; AZ_Assert(!event.m_parameters.empty(), "No parameters in event!"); - m_handler->InstallGenericHook(events[eventIndex].m_name, &OnEventGenericHook, this); if (m_eventMap.find(AZ::Crc32(event.m_name)) != m_eventMap.end()) { @@ -621,137 +601,6 @@ namespace ScriptCanvas } } - void EBusEventHandler::OnEvent(const char* eventName, const int /*eventIndex*/, AZ::BehaviorValueParameter* result, const int numParameters, AZ::BehaviorValueParameter* parameters) - { - AZ_PROFILE_SCOPE_DYNAMIC(AZ::Debug::ProfileCategory::ScriptCanvas, "EBusEventHandler::OnEvent %s", eventName); - - SCRIPTCANVAS_RETURN_IF_ERROR_STATE((*this)); - - auto iter = m_eventMap.find(AZ::Crc32(eventName)); - if (iter == m_eventMap.end()) - { - SCRIPTCANVAS_REPORT_ERROR((*this), "Invalid event index in Ebus handler"); - return; - } - - EBusEventEntry& ebusEventEntry = iter->second; - - if (!ebusEventEntry.m_shouldHandleEvent || ebusEventEntry.m_isHandlingEvent) - { - AZ_Warning("ScriptCanvas", !ebusEventEntry.m_isHandlingEvent, "Found situation where in handling event(%s::%s) triggered the same event. Possible infinite loop, not handling second call.", GetEBusName().c_str(), eventName); - return; - } - - ebusEventEntry.m_isHandlingEvent = true; - - ebusEventEntry.m_resultEvaluated = !ebusEventEntry.IsExpectingResult(); - - AZ_Assert(ebusEventEntry.m_eventName.compare(eventName) == 0, "Wrong event handled by this EBusEventHandler! received %s, expected %s", eventName, ebusEventEntry.m_eventName.c_str()); - AZ_Assert(numParameters == ebusEventEntry.m_numExpectedArguments, "Wrong number of events passed into EBusEventHandler %s", eventName); - - // route my parameters to the connect nodes input - AZ_Assert(ebusEventEntry.m_parameterSlotIds.size() == numParameters, "Node %s-%s Num parameters = %d, but num output slots = %d", m_ebusName.c_str(), ebusEventEntry.m_eventName.c_str(), numParameters, ebusEventEntry.m_parameterSlotIds.size()); - - for (int parameterIndex(0); parameterIndex < numParameters; ++parameterIndex) - { - const Slot* slot = GetSlot(ebusEventEntry.m_parameterSlotIds[parameterIndex]); - const auto& value = *(parameters + parameterIndex); - const Datum input(value); - - PushOutput(input, (*slot)); - } - - // now, this should pass execution off to the nodes that will push their output into this result input - SignalOutput(ebusEventEntry.m_eventSlotId, ExecuteMode::UntilNodeIsFoundInStack); - - // route executed nodes output to my input, and my input to the result - if (ebusEventEntry.IsExpectingResult()) - { - if (result) - { - if (const Datum* resultInput = FindDatum(ebusEventEntry.m_resultSlotId)) - { - ebusEventEntry.m_resultEvaluated = resultInput->ToBehaviorContext(*result); - AZ_Warning("Script Canvas", ebusEventEntry.m_resultEvaluated, "Script Canvas failed to write a value back to the caller!"); - } - else - { - AZ_Warning("Script Canvas", false, "Script Canvas handler expecting a result, but had no ability to return it"); - } - } - else - { - AZ_Warning("Script Canvas", false, "Script Canvas handler is expecting a result, but was called without expecting one!"); - } - } - else - { - AZ_Warning("Script Canvas", !result, "Script Canvas handler is not expecting a result, but was called expecting one!"); - } - - // route executed nodes output to my input, and my input to the result - AZ_Warning("Script Canvas", (result != nullptr) == ebusEventEntry.IsExpectingResult(), "Node %s-%s mismatch between expecting a result and getting one!", m_ebusName.c_str(), ebusEventEntry.m_eventName.c_str()); - AZ_Warning("Script Canvas", ebusEventEntry.m_resultEvaluated, "Node %s-%s result not evaluated properly!", m_ebusName.c_str(), ebusEventEntry.m_eventName.c_str()); - - ebusEventEntry.m_isHandlingEvent = false; - } - - void EBusEventHandler::OnInputSignal(const SlotId& slotId) - { - SlotId connectSlot = EBusEventHandlerProperty::GetConnectSlotId(this); - SlotId disconnectSlot = EBusEventHandlerProperty::GetDisconnectSlotId(this); - - if (connectSlot == slotId) - { - if (IsIDRequired()) - { - const Datum* busIdDatum = FindDatum(GetSlotId(c_busIdName)); - - if (!busIdDatum || busIdDatum->Empty()) - { - SlotId failureSlot = EBusEventHandlerProperty::GetOnFailureSlotId(this); - SignalOutput(failureSlot); - SCRIPTCANVAS_REPORT_ERROR((*this), "In order to connect this node, a valid BusId must be provided."); - return; - } - } - - Disconnect(); - Connect(); - - SlotId onConnectSlotId = EBusEventHandlerProperty::GetOnConnectedSlotId(this); - SignalOutput(onConnectSlotId); - return; - } - else if (disconnectSlot == slotId) - { - Disconnect(); - - SlotId onDisconnectSlotId = EBusEventHandlerProperty::GetOnDisconnectedSlotId(this); - SignalOutput(onDisconnectSlotId); - return; - } - } - - void EBusEventHandler::OnInputChanged(const Datum& /*input*/, const SlotId& /*slotId*/) - { - /* - if (GetExecutionType() == ExecutionType::Runtime - && m_autoConnectToGraphOwner - && slotId == FindSlotIdForDescriptor(c_busIdName, SlotDescriptors::DataIn())) - { - Disconnect(); - Connect(); - } - */ - } - - void EBusEventHandler::OnEventGenericHook(void* userData, const char* eventName, int eventIndex, AZ::BehaviorValueParameter* result, int numParameters, AZ::BehaviorValueParameter* parameters) - { - EBusEventHandler* handler(reinterpret_cast(userData)); - handler->OnEvent(eventName, eventIndex, result, numParameters, parameters); - } - void EBusEventHandler::OnWriteEnd() { AZStd::lock_guard lock(m_mutex); @@ -806,7 +655,7 @@ namespace ScriptCanvas return AZStd::find(m_parameterSlotIds.begin(), m_parameterSlotIds.end(), slotId) != m_parameterSlotIds.end(); } } - + bool EBusEventEntry::EBusEventEntryVersionConverter(AZ::SerializeContext& serializeContext, AZ::SerializeContext::DataElementNode& rootElement) { if (rootElement.GetVersion() == 0) diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/EBusEventHandler.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/EBusEventHandler.h index 5fad1ecec2..4e4c3f45c4 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/EBusEventHandler.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/EBusEventHandler.h @@ -36,7 +36,7 @@ namespace ScriptCanvas static void Reflect(AZ::ReflectContext* context); AZ_TYPE_INFO(EBusEventEntry, "{92A20C1B-A54A-4583-97DB-A894377ACE21}"); - + AZStd::string m_eventName; EBusEventId m_eventId; SlotId m_eventSlotId; @@ -44,7 +44,7 @@ namespace ScriptCanvas AZStd::vector m_parameterSlotIds; int m_numExpectedArguments = {}; bool m_resultEvaluated = {}; - + bool m_shouldHandleEvent = false; bool m_isHandlingEvent = false; @@ -54,7 +54,7 @@ namespace ScriptCanvas }; //! Provides a node that represents an EBus handler - class EBusEventHandler + class EBusEventHandler : public Node , public EBusHandlerNodeRequestBus::Handler { @@ -68,7 +68,7 @@ namespace ScriptCanvas using Events = AZStd::vector; using EventMap = AZStd::map; - EBusEventHandler() + EBusEventHandler() : m_autoConnectToGraphOwner(true) {} @@ -78,11 +78,8 @@ namespace ScriptCanvas void OnInit() override; void OnActivate() override; - void OnPostActivate() override; - void OnDeactivate() override; - void OnGraphSet() override; - + void CollectVariableReferences(AZStd::unordered_set< ScriptCanvas::VariableId >& variableIds) const override; bool ContainsReferencesToVariables(const AZStd::unordered_set< ScriptCanvas::VariableId >& variableIds) const override; @@ -98,14 +95,8 @@ namespace ScriptCanvas bool IsOutOfDate(const VersionData& graphVersion) const override; - - bool CreateHandler(AZStd::string_view ebusName); - void Connect(); - - void Disconnect(); - const EBusEventEntry* FindEventWithSlot(const Slot& slot) const; AZ::Outcome GetFunctionCallName(const Slot* /*slot*/) const override; @@ -128,7 +119,7 @@ namespace ScriptCanvas AZStd::vector GetNonEventSlotIds() const override; AZ::Outcome GetDependencies() const override; - + bool IsEventSlotId(const SlotId& slotId) const; bool IsEventHandler() const override; @@ -138,7 +129,7 @@ namespace ScriptCanvas bool IsVariableWriteHandler() const override; bool IsValid() const; - + inline bool IsIDRequired() const { return m_ebus && BehaviorContextUtils::GetEBusAddressPolicy(*m_ebus) == AZ::EBusAddressPolicy::ById; @@ -165,16 +156,10 @@ namespace ScriptCanvas ConstSlotsOutcome GetSlotsInExecutionThreadByTypeImpl(const Slot& executionSlot, CombinedSlotType targetSlotType, const Slot* executionChildSlot) const override; inline bool IsConfigured() const { return !m_eventMap.empty(); } - - void OnEvent(const char* eventName, const int eventIndex, AZ::BehaviorValueParameter* result, const int numParameters, AZ::BehaviorValueParameter* parameters); - - void OnInputSignal(const SlotId&) override; - void OnInputChanged(const Datum& input, const SlotId& slotID) override; private: EBusEventHandler(const EBusEventHandler&) = delete; - static void OnEventGenericHook(void* userData, const char* eventName, int eventIndex, AZ::BehaviorValueParameter* result, int numParameters, AZ::BehaviorValueParameter* parameters); EventMap m_eventMap; AZStd::string m_ebusName; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Error.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Error.cpp deleted file mode 100644 index 1da9428e8f..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Error.cpp +++ /dev/null @@ -1,84 +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 "Error.h" - -#include -#include -#include - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Core - { - void Error::OnInit() - { - { - ExecutionSlotConfiguration slotConfiguration("In", ConnectionType::Input); - AddSlot(slotConfiguration); - } - - { - DynamicDataSlotConfiguration slotConfiguration; - - slotConfiguration.m_name = "This"; - slotConfiguration.m_dynamicDataType = DynamicDataType::Any; - slotConfiguration.SetConnectionType(ConnectionType::Output); - - AddSlot(slotConfiguration); // \todo for testing only, we need to ability to arbitrarily connect nodes themeselve to slots (as input to function call or error handling) or directly (as the flow of execution with arrows if easier to read...) - } - - { - DataSlotConfiguration slotConfiguration; - - slotConfiguration.m_name = "Description"; - slotConfiguration.SetConnectionType(ConnectionType::Input); - slotConfiguration.ConfigureDatum(AZStd::move(Datum(AZStd::move(Data::Type::String()), Datum::eOriginality::Copy))); - - AddSlot(slotConfiguration); - } - } - - void Error::OnInputSignal(const SlotId&) - { - const Datum* input = FindDatum(GetSlotId("Description")); - if (const Data::StringType* desc = input ? input->GetAs() : nullptr) - { - SCRIPTCANVAS_REPORT_ERROR((*this), desc->data()); - } - else - { - // \todo get a more descriptive default error report - SCRIPTCANVAS_REPORT_ERROR((*this), "Undescribed error"); - } - } - - void Error::Reflect(AZ::ReflectContext* reflectContext) - { - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflectContext)) - { - serializeContext->Class() - ->Version(0) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("Error", "") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Category, "Utilities/Debug") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/Error.png") - ->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly) - ; - } - } - } - - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Error.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Error.h deleted file mode 100644 index f9c91ad85b..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Error.h +++ /dev/null @@ -1,34 +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 ScriptCanvas -{ - namespace Nodes - { - namespace Core - { - class Error - : public Node - { - public: - AZ_COMPONENT(Error, "{C6928F30-87BA-4FFE-A3C0-B6096C161DD0}", Node); - - static void Reflect(AZ::ReflectContext* reflection); - - bool IsDeprecated() const override { return true; } - - protected: - void OnInit() override; - void OnInputSignal(const SlotId&) override; - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ErrorHandler.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ErrorHandler.cpp deleted file mode 100644 index a53eb18cbb..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ErrorHandler.cpp +++ /dev/null @@ -1,74 +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 "ErrorHandler.h" - -#include -#include -#include - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Core - { - const char* ErrorHandler::k_sourceName = "Source"; - - void ErrorHandler::OnInit() - { - { - ExecutionSlotConfiguration slotConfiguration("Out", ConnectionType::Output); - AddSlot(slotConfiguration); - } - - { - DynamicDataSlotConfiguration slotConfiguration; - - slotConfiguration.m_name = k_sourceName; - slotConfiguration.SetConnectionType(ConnectionType::Input); - - slotConfiguration.m_dynamicDataType = DynamicDataType::Any; - - // \todo split node abstractions into executable and !executable - AZStd::vector forbiddenTypes{ azrtti_typeid() }; - auto func = [forbiddenTypes]() { return aznew ContractRTTI(forbiddenTypes, ContractRTTI::Flags::Exclusive); }; - ContractDescriptor descriptor{ AZStd::move(func) }; - - slotConfiguration.m_contractDescs.emplace_back(descriptor); - - AddSlot(slotConfiguration); - } - } - - AZStd::vector> ErrorHandler::GetSources() const - { - return ModConnectedNodes(*GetSlot(GetSlotId(k_sourceName))); - } - - void ErrorHandler::Reflect(AZ::ReflectContext* reflectContext) - { - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflectContext)) - { - serializeContext->Class() - ->Version(0) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("Error Handler", "") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Category, "Utilities/Debug") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/ErrorHandler.png") - ; - } - } - } - - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ErrorHandler.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ErrorHandler.h deleted file mode 100644 index 3edd8c7d4b..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ErrorHandler.h +++ /dev/null @@ -1,37 +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 ScriptCanvas -{ - namespace Nodes - { - namespace Core - { - class ErrorHandler - : public Node - { - public: - AZ_COMPONENT(ErrorHandler, "{CF23B5A6-827C-4364-9714-EA99612D6CAE}", Node); - - static void Reflect(AZ::ReflectContext* reflection); - - AZStd::vector> GetSources() const; - - bool IsDeprecated() const override { return true; } - - protected: - static const char* k_sourceName; - void OnInit() override; - }; - - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ExtractProperty.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ExtractProperty.cpp index c97654c1d8..e2f2627bbc 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ExtractProperty.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ExtractProperty.cpp @@ -5,8 +5,6 @@ * */ #include -#include - #include namespace ScriptCanvas @@ -58,37 +56,12 @@ namespace ScriptCanvas AddPropertySlots(dataType); } } - + Data::Type ExtractProperty::GetSourceSlotDataType() const { return m_dataType; } - void ExtractProperty::OnInputSignal(const SlotId& slotID) - { - if (slotID == GetSlotId(GetInputSlotName())) - { - if (auto input = FindDatum(ExtractPropertyProperty::GetSourceSlotId(this))) - { - for(auto&& propertyAccount : m_propertyAccounts) - { - Slot* propertySlot = GetSlot(propertyAccount.m_propertySlotId); - if (propertySlot && propertyAccount.m_getterFunction) - { - auto outputOutcome = propertyAccount.m_getterFunction(*input); - if (!outputOutcome) - { - SCRIPTCANVAS_REPORT_ERROR((*this), outputOutcome.TakeError().data()); - return; - } - PushOutput(outputOutcome.TakeValue(), *propertySlot); - } - } - } - SignalOutput(GetSlotId(GetOutputSlotName())); - } - } - void ExtractProperty::AddPropertySlots(const Data::Type& type) { AZStd::unordered_map versionedInfo; @@ -108,7 +81,7 @@ namespace ScriptCanvas { return AZ::Success(DependencyReport::NativeLibrary(Data::GetName(m_dataType))); } - + PropertyFields ExtractProperty::GetPropertyFields() const { PropertyFields propertyFields; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ExtractProperty.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ExtractProperty.h index eb255c8f09..d686ae0e1e 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ExtractProperty.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ExtractProperty.h @@ -44,17 +44,13 @@ namespace ScriptCanvas bool IsOutOfDate(const VersionData& graphVersion) const override; //// - + protected: - bool IsPropertySlot(const SlotId& slotId) const; - void OnInit() override; UpdateResult OnUpdateNode() override; - void OnInputSignal(const SlotId&) override; - void OnSlotDisplayTypeChanged(const SlotId& slotId, const Data::Type& dataType) override; void AddPropertySlots(const Data::Type& type); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ForEach.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ForEach.cpp index 6584f795b8..496b164726 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ForEach.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ForEach.cpp @@ -6,7 +6,6 @@ */ #include -#include #include #include diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/FunctionCallNode.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/FunctionCallNode.h index 56b17095a7..99679e53bc 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/FunctionCallNode.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/FunctionCallNode.h @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/GetVariable.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/GetVariable.cpp index c8defb77ec..f78a57308a 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/GetVariable.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/GetVariable.cpp @@ -63,43 +63,6 @@ namespace ScriptCanvas } } - void GetVariableNode::OnInputSignal(const SlotId& slotID) - { - if (slotID == GetSlotId("In")) - { - SC_EXECUTION_TRACE_ANNOTATE_NODE((*this), CreateAnnotationData()); - - if (m_variableView.IsValid()) - { - Slot* resultSlot = GetSlot(m_variableDataOutSlotId); - if (resultSlot) - { - const Datum* inputDatum = m_variableView.GetDatum(); - - PushOutput(*inputDatum, *resultSlot); - - // Push the data for each property slot out as well - for (auto&& propertyAccount : m_propertyAccounts) - { - Slot* propertySlot = GetSlot(propertyAccount.m_propertySlotId); - if (propertySlot && propertyAccount.m_getterFunction) - { - auto outputOutcome = propertyAccount.m_getterFunction(*inputDatum); - if (!outputOutcome) - { - SCRIPTCANVAS_REPORT_ERROR((*this), outputOutcome.TakeError().data()); - return; - } - PushOutput(outputOutcome.TakeValue(), *propertySlot); - } - } - } - } - - SignalOutput(GetSlotId("Out")); - } - } - void GetVariableNode::CollectVariableReferences(AZStd::unordered_set< ScriptCanvas::VariableId >& variableIds) const { if (m_variableId.IsValid()) @@ -324,7 +287,8 @@ namespace ScriptCanvas ScriptCanvas::Data::Type baseType = ScriptCanvas::Data::Type::Invalid(); VariableRequestBus::EventResult(baseType, GetScopedVariableId(), &VariableRequests::GetType); - const GraphVariableMapping* variableMap = GetRuntimeBus()->GetVariables(); + const GraphVariableMapping* variableMap = nullptr; + GraphRequestBus::EventResult(variableMap, GetOwningScriptCanvasId(), &GraphRequests::GetVariables); if (variableMap && baseType.IsValid()) { @@ -360,12 +324,6 @@ namespace ScriptCanvas VariableNodeNotificationBus::Event(GetEntityId(), &VariableNodeNotifications::OnVariableRemovedFromNode, removedVariableId); } - AnnotateNodeSignal GetVariableNode::CreateAnnotationData() - { - AZ::EntityId assetNodeId = GetRuntimeBus()->FindAssetNodeIdByRuntimeNodeId(GetEntityId()); - return AnnotateNodeSignal(CreateGraphInfo(GetOwningScriptCanvasId(), GetGraphIdentifier()), AnnotateNodeSignal::AnnotationLevel::Info, m_variableName, AZ::NamedEntityId(assetNodeId, GetNodeName())); - } - VariableId GetVariableNode::GetVariableIdRead(const Slot*) const { return m_variableId; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/GetVariable.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/GetVariable.h index e5011de5c6..08d8d115d5 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/GetVariable.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/GetVariable.h @@ -58,13 +58,12 @@ namespace ScriptCanvas const Slot* GetVariableOutputSlot() const override; // Translation ////////////////////////////////////////////////////////////////////////// - + protected: void OnInit() override; void OnPostActivate() override; - void OnInputSignal(const SlotId&) override; void AddOutputSlot(); void RemoveOutputSlot(); @@ -78,8 +77,6 @@ namespace ScriptCanvas void OnVariableRemoved() override; //// - AnnotateNodeSignal CreateAnnotationData(); - // Adds/Remove Property Slots from the GetVariable node void AddPropertySlots(const Data::Type& type); void ClearPropertySlots(); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Method.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Method.cpp index b76c3ce87c..4eafa82331 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Method.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Method.cpp @@ -25,6 +25,7 @@ namespace MethodCPP Unnamed2, PluralizeResults, AddedPrettyNameFieldToSerialization, + StoreInputSlotIdsToSupportNullCheck, // add your version above Current, }; @@ -86,11 +87,6 @@ namespace ScriptCanvas AZ::Outcome IsExposable(const AZ::BehaviorMethod& method) { - if (method.GetNumArguments() > BehaviorContextMethodHelper::MaxCount) - { - return AZ::Failure(AZStd::string("Too many arguments for a Script Canvas method")); - } - for (size_t argIndex(0), sentinel(method.GetNumArguments()); argIndex != sentinel; ++argIndex) { if (const AZ::BehaviorParameter* argument = method.GetArgument(argIndex)) @@ -115,6 +111,37 @@ namespace ScriptCanvas { namespace Core { + bool Method::CanAcceptNullInput([[maybe_unused]] const Slot& executionSlot, const Slot& inputSlot) const + { + if (m_method) + { + auto candidateID = inputSlot.GetId(); + auto slotIter = AZStd::find(m_inputSlots.begin(), m_inputSlots.end(), candidateID); + + if (slotIter != m_inputSlots.end()) + { + const size_t index = slotIter - m_inputSlots.begin(); + if (index < m_method->GetNumArguments()) + { + const auto* argument = m_method->GetArgument(index); + if (argument->m_traits & (AZ::BehaviorParameter::TR_REFERENCE | AZ::BehaviorParameter::TR_THIS_PTR)) + { + // references and this pointers cannot accept null input + return false; + } + + if (!(argument->m_traits & AZ::BehaviorParameter::TR_POINTER)) + { + // values cannot accept null input + return false; + } + } + } + } + + return true; + } + const AZ::BehaviorClass* Method::GetClass() const { return m_class; @@ -126,7 +153,7 @@ namespace ScriptCanvas { return AZ::Failure(); } - + DependencyReport dependencyNames; for (size_t index(0), sentinel = m_method->GetNumArguments(); index < sentinel; ++index) { @@ -136,7 +163,7 @@ namespace ScriptCanvas return AZ::Success(dependencyNames); } - + AZ::Outcome Method::GetFunctionCallLexicalScope(const Slot* /*slot*/) const { if (m_method) @@ -144,7 +171,7 @@ namespace ScriptCanvas Grammar::LexicalScope lexicalScope; if (m_method->IsMember() - || AZ::FindAttribute(AZ::Script::Attributes::TreatAsMemberFunction, m_method->m_attributes)) + || AZ::FindAttribute(AZ::Script::Attributes::TreatAsMemberFunction, m_method->m_attributes)) { lexicalScope.m_type = Grammar::LexicalScopeType::Variable; } @@ -165,7 +192,7 @@ namespace ScriptCanvas if (m_method) { if (m_method->IsMember() - || AZ::FindAttribute(AZ::Script::Attributes::TreatAsMemberFunction, m_method->m_attributes)) + || AZ::FindAttribute(AZ::Script::Attributes::TreatAsMemberFunction, m_method->m_attributes)) { auto name = BehaviorContextUtils::FindExposedMethodName(*m_method, m_class); if (!name.empty()) @@ -177,7 +204,7 @@ namespace ScriptCanvas return AZ::Success(m_lookupName); } - + EventType Method::GetFunctionEventType(const Slot*) const { return m_eventType; @@ -211,7 +238,7 @@ namespace ScriptCanvas m_lookupName = config.m_lookupName ? AZStd::string(*config.m_lookupName) : config.m_method.m_name; m_methodType = config.m_methodType; m_eventType = config.m_eventType; - + auto isExposableOutcome = IsExposable(config.m_method); AZ_Warning("ScriptCanvas", isExposableOutcome.IsSuccess(), "BehaviorContext Method %s is no longer exposable to ScriptCanvas: %s", isExposableOutcome.GetError().data()); ConfigureMethod(config.m_method, config.m_class); @@ -237,6 +264,11 @@ namespace ScriptCanvas if (addedSlot.IsValid()) { MethodHelper::SetSlotToDefaultValue(*this, addedSlot, config, argIndex); + m_inputSlots.push_back(addedSlot); + } + else + { + AZ_Warning("ScriptCanvas", false, "Failed to add method input slot to Method node: %s-%s", config.m_prettyClassName.c_str(), config.m_method.m_name.c_str()); } } } @@ -327,7 +359,7 @@ namespace ScriptCanvas } } - void Method::InitializeEvent(const NamespacePath&, AZStd::string_view ebusName, AZStd::string_view eventName) + void Method::InitializeEvent(const NamespacePath&, AZStd::string_view ebusName, AZStd::string_view eventName) { AZStd::lock_guard lock(m_mutex); @@ -525,8 +557,8 @@ namespace ScriptCanvas if (m_method && m_method->HasResult()) { if (branchOnResultMethod.GetNumArguments() == 1 - && branchOnResultMethod.HasResult() - && Data::FromAZType(branchOnResultMethod.GetResult()->m_typeId) == Data::Type::Boolean()) + && branchOnResultMethod.HasResult() + && Data::FromAZType(branchOnResultMethod.GetResult()->m_typeId) == Data::Type::Boolean()) { AZ::Uuid methodResultType = m_method->GetResult()->m_typeId; AZ::Uuid branchOnResultMethodArgType = branchOnResultMethod.GetArgument(0)->m_typeId; @@ -703,7 +735,7 @@ namespace ScriptCanvas return TupleType{ method, m_methodType, eventType, bcClass }; } - return TupleType{ nullptr, MethodType::Count, EventType::Count, nullptr}; + return TupleType{ nullptr, MethodType::Count, EventType::Count, nullptr }; } void Method::OnWriteEnd() @@ -802,6 +834,7 @@ namespace ScriptCanvas ->Field("className", &Method::m_className) ->Field("namespaces", &Method::m_namespaces) ->Field("resultSlotIDs", &Method::m_resultSlotIDs) + ->Field("inputSlots", &Method::m_inputSlots) ->Field("prettyClassName", &Method::m_classNamePretty) ; @@ -809,13 +842,13 @@ namespace ScriptCanvas { editContext->Class("Method", "Method") ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly) - ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All) + ->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly) + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All) ; } } } - } - } -} + } + } +} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Method.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Method.h index 930b6e8539..3dec8e3e72 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Method.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Method.h @@ -45,6 +45,8 @@ namespace ScriptCanvas size_t GenerateFingerprint() const override; + bool CanAcceptNullInput(const Slot& executionSlot, const Slot& inputSlot) const override; + bool GetBranchOnResultCheckName(AZStd::string& exposedName, Grammar::LexicalScope& lexicalScope) const; virtual bool GetCheckedOperationInfo(AZ::CheckedOperationInfo& checkedInfo, AZStd::string& exposedName, Grammar::LexicalScope& lexicalScope) const; @@ -149,8 +151,6 @@ namespace ScriptCanvas bool IsExpectingResult() const; - AZ_INLINE AZStd::vector& ModResultSlotIds() { return m_resultSlotIDs; } - virtual void OnInitializeOutputPost(const MethodOutputConfig&) {} virtual void OnInitializeOutputPre(MethodOutputConfig&) {} @@ -176,12 +176,13 @@ namespace ScriptCanvas NamespacePath m_namespaces; const AZ::BehaviorMethod* m_method = nullptr; const AZ::BehaviorClass* m_class = nullptr; + AZStd::vector m_inputSlots; AZStd::vector m_resultSlotIDs; AZStd::recursive_mutex m_mutex; // post-serialization bool m_warnOnMissingFunction = true; Method(const Method&) = delete; }; - } - } -} + } + } +} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/MethodUtility.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/MethodUtility.cpp index 144427d74c..bfb54d5421 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/MethodUtility.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/MethodUtility.cpp @@ -11,105 +11,6 @@ namespace ScriptCanvas { - int CountMatchingInputTypes(const Grammar::FunctionPrototype& a, const Grammar::FunctionPrototype& b, const AZStd::vector& checkedIndices) - { - AZ_Warning("ScriptCanvas", a.m_inputs.size() == b.m_inputs.size(), "Function inputs are not the same size"); - - int matching = 0; - - if (a.m_inputs.size() == b.m_inputs.size()) - { - if (checkedIndices.empty()) - { - for (size_t index = 0; index < a.m_inputs.size(); ++index) - { - if (!a.m_inputs[index]->m_datum.GetType().IsValid() - || a.m_inputs[index]->m_datum.GetType() == b.m_inputs[index]->m_datum.GetType()) - { - ++matching; - } - } - } - else - { - for (const auto checkedIndex : checkedIndices) - { - const auto index = checkedIndices[checkedIndex]; - - if (index < a.m_inputs.size()) - { - if (!a.m_inputs[index]->m_datum.GetType().IsValid() - || a.m_inputs[index]->m_datum.GetType() == b.m_inputs[index]->m_datum.GetType()) - { - ++matching; - } - } - else - { - AZ_Error("ScriptCanvas", false, "Overload checked index is no longer valid"); - } - } - } - } - - return matching; - } - - BehaviorContextMethodHelper::CallResult BehaviorContextMethodHelper::Call(Node& node, bool isExpectingMultipleResults, const AZ::BehaviorMethod* method, AZ::BehaviorValueParameter* paramBegin, AZ::BehaviorValueParameter* paramEnd, AZStd::vector& resultSlotIds) - { - if (isExpectingMultipleResults) - { - return BehaviorContextMethodHelper::Call(node, method, paramBegin, paramEnd, resultSlotIds); - } - else - { - return BehaviorContextMethodHelper::Call(node, method, paramBegin, paramEnd, resultSlotIds[0]); - } - } - - BehaviorContextMethodHelper::CallResult BehaviorContextMethodHelper::Call(Node& node, const AZ::BehaviorMethod* method, AZ::BehaviorValueParameter* paramBegin, AZ::BehaviorValueParameter* paramEnd, SlotId resultSlotId) - { - AZ_PROFILE_SCOPE_DYNAMIC(AZ::Debug::ProfileCategory::ScriptCanvas, "ScriptCanvas::Method::OnInputSignal::Call %s", method->m_name.c_str()); - return CallGeneric(node, method, paramBegin, paramEnd, &AttemptCallWithResults, resultSlotId); - } - - BehaviorContextMethodHelper::CallResult BehaviorContextMethodHelper::Call(Node& node, const AZ::BehaviorMethod* method, AZ::BehaviorValueParameter* paramBegin, AZ::BehaviorValueParameter* paramEnd, AZStd::vector& resultSlotIds) - { - AZ_PROFILE_SCOPE_DYNAMIC(AZ::Debug::ProfileCategory::ScriptCanvas, "ScriptCanvas::Method::OnInputSignal::Call %s", method->m_name.c_str()); - return CallGeneric(node, method, paramBegin, paramEnd, &AttemptCallWithTupleResults, resultSlotIds); - } - - AZ::Outcome BehaviorContextMethodHelper::AttemptCallWithResults(Node&, const AZ::BehaviorMethod*, AZ::BehaviorValueParameter*, unsigned int, SlotId) - { - return AZ::Failure(AZStd::string("This method is slated for deletion")); - } - - AZ::Outcome BehaviorContextMethodHelper::AttemptCallWithTupleResults(Node&, const AZ::BehaviorMethod*, AZ::BehaviorValueParameter*, unsigned int, AZStd::vector) - { - return AZ::Failure(AZStd::string("This method is slated for deletion")); - } - - AZ::Outcome BehaviorContextMethodHelper::CallTupleGetMethod(const AZ::BehaviorMethod*, Datum&) - { - return AZ::Failure(AZStd::string("This method is slated for deletion")); - } - - AZ::Outcome BehaviorContextMethodHelper::CallOutcomeTupleMethod(Node&, const SlotId&, Datum&, size_t, AZStd::string) - { - return AZ::Failure(AZStd::string("to be deleted")); - } - - AZ::BehaviorValueParameter BehaviorContextMethodHelper::ToBehaviorValueParameter(const AZ::BehaviorMethod* method, size_t index, const Datum& datum) - { - const AZ::BehaviorParameter* datumParam = method->GetArgument(index); - auto toParamOutcome = datumParam ? datum.ToBehaviorValueParameter(*datumParam) : AZ::Failure(AZStd::string::format("BehaviorMethod contains nullptr BehaviorParameter at index %zu", index)); - if (toParamOutcome) - { - return AZ::BehaviorValueParameter(toParamOutcome.TakeValue()); - } - return AZ::BehaviorValueParameter(); - } - AZStd::unordered_map GetTupleGetMethodsFromResult(const AZ::BehaviorMethod& method) { if (method.HasResult()) @@ -126,7 +27,7 @@ namespace ScriptCanvas AZStd::unordered_map GetTupleGetMethods(const AZ::TypeId& typeId) { AZStd::unordered_map tupleGetMethodMap; - + AZ::BehaviorContext* behaviorContext{}; AZ::ComponentApplicationBus::BroadcastResult(behaviorContext, &AZ::ComponentApplicationRequests::GetBehaviorContext); auto bcClassIterator = behaviorContext->m_typeToClassMap.find(typeId); @@ -182,4 +83,4 @@ namespace ScriptCanvas return AZ::Failure(); } -} +} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/MethodUtility.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/MethodUtility.h index 92248d3ac6..a6cd84dbf6 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/MethodUtility.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/MethodUtility.h @@ -19,202 +19,9 @@ namespace ScriptCanvas::Grammar namespace ScriptCanvas { - int CountMatchingInputTypes(const Grammar::FunctionPrototype& a, const Grammar::FunctionPrototype& b, const AZStd::vector& checkedIndices); - - struct BehaviorContextMethodHelper - { - enum BehaviorContextInputOutput : size_t - { - MaxCount = 40, - }; - - enum class MethodCallStatus - { - NotAttempted = 0, - Attempted, - Failed, - Succeeded, - }; - - struct CallResult - { - const MethodCallStatus m_status = MethodCallStatus::NotAttempted; - const AZStd::string m_executionOutOverride = "Out"; - - AZ_INLINE CallResult(const MethodCallStatus status, AZStd::string executionOutOverride = "Out") - : m_status(status) - , m_executionOutOverride(executionOutOverride) - {} - }; - - template - static CallResult CallGeneric(Node& node, const AZ::BehaviorMethod* method, AZ::BehaviorValueParameter* paramBegin, AZ::BehaviorValueParameter* paramEnd, t_Call attempt, t_Slots& slots); - - static CallResult Call(Node& node, bool isExpectingMultipleResults, const AZ::BehaviorMethod* method, AZ::BehaviorValueParameter* paramBegin, AZ::BehaviorValueParameter* paramEnd, AZStd::vector& resultSlotIds); - static CallResult Call(Node& node, const AZ::BehaviorMethod* method, AZ::BehaviorValueParameter* paramBegin, AZ::BehaviorValueParameter* paramEnd, SlotId resultSlotId); - static CallResult Call(Node& node, const AZ::BehaviorMethod* method, AZ::BehaviorValueParameter* paramBegin, AZ::BehaviorValueParameter* paramEnd, AZStd::vector& resultSlotIds); - static AZ::Outcome AttemptCallWithResults(Node& node, const AZ::BehaviorMethod* method, AZ::BehaviorValueParameter* params, unsigned int numExpectedArgs, SlotId resultSlotId); - static AZ::Outcome AttemptCallWithTupleResults(Node& node, const AZ::BehaviorMethod* method, AZ::BehaviorValueParameter* params, unsigned int numExpectedArgs, AZStd::vector resultSlotIds); - - template - static AZ::Outcome CallMethodOnDatum(const Datum& input, AZStd::string_view methodName, Args&& ... args); - - template - static AZ::Outcome CallMethodOnDatumUnpackOutcomeSuccess(const Datum& input, AZStd::string_view methodName, Args&& ... args); - - template - static AZStd::vector CreateParameterList(const AZ::BehaviorMethod* method, Args&&... args); - - static AZ::Outcome CallTupleGetMethod(const AZ::BehaviorMethod* method, Datum& thisPointer); - - private: - static AZ::Outcome CallOutcomeTupleMethod(Node& node, const SlotId& resultSlotId, Datum& outcomeDatum, size_t index, AZStd::string outSlotName); - static AZ::BehaviorValueParameter ToBehaviorValueParameter(const AZ::BehaviorMethod* method, size_t index, const Datum& datum); - - template - static AZ::BehaviorValueParameter ToBehaviorValueParameter(const AZ::BehaviorMethod*, size_t, const T& arg); - - template - static AZStd::vector CreateParameterListInternal(const AZ::BehaviorMethod* method, AZStd::index_sequence, Args&&... args); - }; - AZStd::unordered_map GetTupleGetMethodsFromResult(const AZ::BehaviorMethod& method); AZStd::unordered_map GetTupleGetMethods(const AZ::TypeId& typeId); AZ::Outcome GetTupleGetMethod(const AZ::TypeId& typeID, size_t index); - - template - BehaviorContextMethodHelper::CallResult BehaviorContextMethodHelper::CallGeneric(Node& node, const AZ::BehaviorMethod* method, AZ::BehaviorValueParameter* paramBegin, AZ::BehaviorValueParameter* paramEnd, t_Call attempt, t_Slots& slots) - { - const auto numExpectedArgs(static_cast(method->GetNumArguments())); - if ((paramEnd - paramBegin) == numExpectedArgs) - { - AZ::Outcome withResultsOutcome = attempt(node, method, paramBegin, numExpectedArgs, slots); - - if (!withResultsOutcome.IsSuccess()) - { - SCRIPTCANVAS_REPORT_ERROR((node), "Script Canvas attempt to call %s with a result failed: %s", method->m_name.data(), withResultsOutcome.GetError().data()); - return CallResult(MethodCallStatus::Failed); - } - else if (withResultsOutcome.GetValue().m_status == MethodCallStatus::Attempted) - { - return CallResult(MethodCallStatus::Succeeded, withResultsOutcome.GetValue().m_executionOutOverride); - } - else if (method->Call(paramBegin, numExpectedArgs)) - { - return CallResult(MethodCallStatus::Succeeded); - } - else - { - SCRIPTCANVAS_REPORT_ERROR((node), "Script Canvas attempt to call %s failed", method->m_name.data()); - return CallResult(MethodCallStatus::Failed); - } - } - else - { - SCRIPTCANVAS_REPORT_ERROR((node), "Script Canvas attempt to call %s failed, it expects %d args but called with %d", method->m_name.c_str(), numExpectedArgs, paramEnd - paramBegin); - return CallResult(MethodCallStatus::NotAttempted); - } - } - - template - AZ::Outcome BehaviorContextMethodHelper::CallMethodOnDatumUnpackOutcomeSuccess(const Datum& input, AZStd::string_view methodName, Args&& ... args) - { - AZ::Outcome methodCallResult = CallMethodOnDatum(input, methodName, args...); - if (methodCallResult.IsSuccess()) - { - // Even when successfully called, the method will return an outcome as the result, we need to test that - // outcome in case any errors were returned from the invoked function call. - const Datum& methodCallResultDatum = methodCallResult.GetValue(); - - const auto* actualOutcome = methodCallResultDatum.GetAs>(); - if (actualOutcome && !actualOutcome->IsSuccess()) - { - return AZ::Failure(AZStd::string::format("%s returned an error: %s", methodName.data(), actualOutcome->GetError().c_str())); - } - - AZ::Outcome isSuccessCallResult = CallMethodOnDatum(methodCallResult.GetValue(), "IsSuccess"); - if (isSuccessCallResult.IsSuccess()) - { - if (*isSuccessCallResult.GetValue().GetAs()) - { - return CallMethodOnDatum(methodCallResult.GetValue(), "GetValue"); - } - else - { - return AZ::Failure(AZStd::string::format("%s returned an error", methodName.data())); - } - } - else - { - return AZ::Failure(AZStd::string::format("Script Canvas attempt to call %s failed, Failed to query result Outcome success", methodName.data())); - } - } - else - { - return AZ::Failure(methodCallResult.GetError()); - } - - return methodCallResult; - } - - template - AZ::Outcome BehaviorContextMethodHelper::CallMethodOnDatum(const Datum& input, AZStd::string_view methodName, Args&& ... args) - { - const AZ::BehaviorClass* behaviorClass = AZ::BehaviorContextHelper::GetClass(input.GetType().GetAZType()); - if (behaviorClass) - { - auto methodIt = behaviorClass->m_methods.find(methodName); - - if (methodIt != behaviorClass->m_methods.end()) - { - AZ::BehaviorMethod* method = methodIt->second; - - const AZ::BehaviorParameter* resultType = method->HasResult() ? method->GetResult() : nullptr; - - if (resultType) - { - // Populate parameters - AZStd::vector parameters = CreateParameterList(method, input, AZStd::forward(args)...); - return Datum::CallBehaviorContextMethodResult(method, resultType, parameters.begin(), (unsigned int)AZStd::GetMin(parameters.size(), method->GetNumArguments()), behaviorClass->m_name); - } - else - { - AZStd::vector parameters = CreateParameterList(method, input, AZStd::forward(args)...); - if (Datum::CallBehaviorContextMethod(method, parameters.begin(), (unsigned int)AZStd::GetMin(parameters.size(), method->GetNumArguments())).IsSuccess()) - { - return AZ::Success(Datum()); - } - } - } - else - { - return AZ::Failure(AZStd::string::format("ScriptCanvas Behavior Context method call failed; method named \"%s\" not found.", methodName.data())); - } - } - - return AZ::Failure(AZStd::string::format("ScriptCanvas Behavior Context method call failed; unable to retrieve Behavior Class.")); - } - - template - AZStd::vector BehaviorContextMethodHelper::CreateParameterList(const AZ::BehaviorMethod* method, Args&&... args) - { - // Create an index sequence for the parameters and forward the arguments - return CreateParameterListInternal(method, AZStd::make_index_sequence{}, AZStd::forward(args)...); - } - - template - AZ::BehaviorValueParameter BehaviorContextMethodHelper::ToBehaviorValueParameter(const AZ::BehaviorMethod*, size_t, const T& arg) - { - return AZ::BehaviorValueParameter(&arg); - } - - template - AZStd::vector BehaviorContextMethodHelper::CreateParameterListInternal(const AZ::BehaviorMethod* method, AZStd::index_sequence, Args&&... args) - { - // Unpack the arguments and the index sequence to populate the parameter list - return { ToBehaviorValueParameter(method, Indices, args)... }; - } - -} +} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.cpp index b797174f59..190c1a78c0 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.cpp @@ -12,8 +12,8 @@ #include #include +#include #include -#include #include #include @@ -75,7 +75,7 @@ namespace ScriptCanvas AZ::Data::AssetCatalogRequestBus::BroadcastResult(assetInfo, &AZ::Data::AssetCatalogRequests::GetAssetInfoById, asset.GetId()); AZStd::string graphAssetName; - RuntimeRequestBus::EventResult(graphAssetName, GetOwningScriptCanvasId(), &RuntimeRequests::GetAssetName); + GraphRequestBus::EventResult(graphAssetName, GetOwningScriptCanvasId(), &GraphRequests::GetAssetName); AZ_Error("Script Event", false, "The Script Event asset (%s) has been modified. Open the graph (%s) and re-save it.", assetInfo.m_relativePath.c_str(), graphAssetName.c_str()); return; @@ -93,7 +93,7 @@ namespace ScriptCanvas bool isNewSlot = true; const auto busToolTip = AZStd::string::format("%s (Type: %s)", c_busIdTooltip, m_ebus->m_idParam.m_name); - const AZ::TypeId& busId = m_ebus->m_idParam.m_typeId; + const AZ::TypeId& busId = m_ebus->m_idParam.m_typeId; SlotId addressSlotId; @@ -117,8 +117,8 @@ namespace ScriptCanvas } else { - Data::Type busIdType(AZ::BehaviorContextHelper::IsStringParameter(m_ebus->m_idParam) ? Data::Type::String() : Data::FromAZType(busId)); - + Data::Type busIdType(AZ::BehaviorContextHelper::IsStringParameter(m_ebus->m_idParam) ? Data::Type::String() : Data::FromAZType(busId)); + config.ConfigureDatum(AZStd::move(Datum(busIdType, Datum::eOriginality::Original))); config.m_contractDescs = { { [busIdType]() { return aznew RestrictedTypeContract({ busIdType }); } } }; } @@ -177,11 +177,6 @@ namespace ScriptCanvas m_userData.m_methodDefinition = methodDefinition; AZ_Assert(!event.m_parameters.empty(), "No parameters in event!"); - if (!events[eventIndex].m_function) - { - m_handler->InstallGenericHook(events[eventIndex].m_name, &OnEventGenericHook, &m_userData); - } - if (m_eventMap.find(eventId) == m_eventMap.end()) { m_eventMap[eventId] = ConfigureEbusEntry(*methodDefinition, event, populationMapping); @@ -272,7 +267,7 @@ namespace ScriptCanvas SlotId slotId = AddSlot(slotConfiguration, isNewSlot); AZ_Error("ScriptCanvas", populationMapping.find(argIdentifier) == populationMapping.end(), "Trying to create the same slot twice. Unable to create sane mapping."); - + populationMapping[argIdentifier] = slotId; eBusEventEntry.m_parameterSlotIds.push_back(slotId); } @@ -286,7 +281,7 @@ namespace ScriptCanvas slotConfiguration.m_isLatent = true; slotConfiguration.m_name = eventID; - slotConfiguration.SetConnectionType(ConnectionType::Output); + slotConfiguration.SetConnectionType(ConnectionType::Output); slotConfiguration.m_addUniqueSlotByNameAndType = true; auto remappingIter = m_eventSlotMapping.find(outputSlotId); @@ -309,12 +304,6 @@ namespace ScriptCanvas return eBusEventEntry; } - void ReceiveScriptEvent::OnEventGenericHook(void* userData, const char* eventName, int eventIndex, AZ::BehaviorValueParameter* result, int numParameters, AZ::BehaviorValueParameter* parameters) - { - ReceiveScriptEvent::EventHookUserData* eventHookUserData(reinterpret_cast(userData)); - eventHookUserData->m_handler->OnEvent(eventName, eventIndex, result, numParameters, parameters); - } - void ReceiveScriptEvent::SetAutoConnectToGraphOwner(bool enabled) { ScriptCanvas::Slot* connectSlot = ReceiveScriptEventProperty::GetConnectSlot(this); @@ -325,197 +314,16 @@ namespace ScriptCanvas } } - void ReceiveScriptEvent::OnEvent(const char* eventName, const int, AZ::BehaviorValueParameter* result, const int numParameters, AZ::BehaviorValueParameter* parameters) - { - AZ_PROFILE_SCOPE_DYNAMIC(AZ::Debug::ProfileCategory::ScriptCanvas, "ReceiveScriptEvent::OnEvent %s", eventName); - - SCRIPTCANVAS_RETURN_IF_ERROR_STATE((*this)); - - ScriptEvents::Method method; - if (!GetScriptEvent().FindMethod(eventName, method)) - { - AZ_Warning("Script Events", false, "Failed to find method: %s when trying to handle it.", eventName); - return; - } - - auto iter = m_eventMap.find(AZ::Crc32(method.GetNameProperty().GetId().ToString().c_str())); - if (iter == m_eventMap.end()) - { - SCRIPTCANVAS_REPORT_ERROR((*this), "Invalid event index in Ebus handler"); - return; - } - - Internal::ScriptEventEntry& scriptEventEntry = iter->second; - - if (!scriptEventEntry.m_shouldHandleEvent || scriptEventEntry.m_isHandlingEvent) - { - AZ_Warning("ScriptCanvas", !scriptEventEntry.m_isHandlingEvent, "Found situation where in handling event(%s::%s) triggered the same event. Possible infinite loop, not handling second call.", GetScriptEvent().GetName().c_str(), eventName); - return; - } - - scriptEventEntry.m_isHandlingEvent = true; - - scriptEventEntry.m_resultEvaluated = !scriptEventEntry.IsExpectingResult(); - - // route the parameters to the connect nodes input - if (scriptEventEntry.m_parameterSlotIds.size() != numParameters) - { - SCRIPTCANVAS_REPORT_ERROR((*this), "The Script Event, %s, has %d parameters. While the ScriptCanvas Node (%s) has (%zu) slots. Make sure the node is updated in the Script Canvas graph.", eventName, numParameters, GetNodeName().c_str(), scriptEventEntry.m_parameterSlotIds.size()); - } - else - { - for (int parameterIndex(0); parameterIndex < numParameters; ++parameterIndex) - { - const Slot* slot = GetSlot(scriptEventEntry.m_parameterSlotIds[parameterIndex]); - const auto& value = *(parameters + parameterIndex); - const Datum input(value); - - if (slot->IsTypeMatchFor(input.GetType())) - { - PushOutput(input, *slot); - } - else - { - SCRIPTCANVAS_REPORT_ERROR((*this), "Type mismatch in Script Event %s on ScriptCanvas Node (%s). Make sure the nodes is updated in the Script Canvas graph", eventName, GetNodeName().c_str()); - } - } - } - - { - // now, this should pass execution off to the nodes that will push their output into this result input - SignalOutput(scriptEventEntry.m_eventSlotId, ExecuteMode::UntilNodeIsFoundInStack); - } - - // route executed nodes output to my input, and my input to the result - if (scriptEventEntry.IsExpectingResult()) - { - if (result) - { - if (const Datum* resultInput = FindDatum(scriptEventEntry.m_resultSlotId)) - { - scriptEventEntry.m_resultEvaluated = resultInput->ToBehaviorContext(*result); - AZ_Warning("Script Canvas", scriptEventEntry.m_resultEvaluated, "%s expects a result value of type %s to be provided, got %s", scriptEventEntry.m_eventName.c_str(), Data::GetName(resultInput->GetType()).c_str(), result->m_name); - } - else - { - AZ_Warning("Script Canvas", false, "Script Canvas handler expecting a result, but had no ability to return it"); - } - } - else - { - AZ_Warning("Script Canvas", false, "Script Canvas handler is expecting a result, but was called without receiving one!"); - } - } - else - { - AZ_Warning("Script Canvas", !result, "Script Canvas handler is not expecting a result, but was called receiving one!"); - } - - // route executed nodes output to my input, and my input to the result - AZ_Warning("Script Canvas", (result != nullptr) == scriptEventEntry.IsExpectingResult(), "Node %s-%s mismatch between expecting a result and getting one!", m_ebus->m_name.c_str(), scriptEventEntry.m_eventName.c_str()); - AZ_Warning("Script Canvas", scriptEventEntry.m_resultEvaluated, "Node %s-%s result not evaluated properly!", m_ebus->m_name.c_str(), scriptEventEntry.m_eventName.c_str()); - - scriptEventEntry.m_isHandlingEvent = false; - } - void ReceiveScriptEvent::OnActivate() { SetAutoConnectToGraphOwner(m_autoConnectToGraphOwner); ScriptEventBase::OnActivate(); } - void ReceiveScriptEvent::OnPostActivate() - { - - } - void ReceiveScriptEvent::OnDeactivate() { - Disconnect(false); - ScriptEventBase::OnDeactivate(); } - - void ReceiveScriptEvent::Connect() - { - AZ::EntityId connectToEntityId; - AZ::BehaviorValueParameter busIdParameter; - busIdParameter.Set(m_ebus->m_idParam); - const AZ::Uuid busIdType = m_ebus->m_idParam.m_typeId; - - const Datum* busIdDatum = IsIDRequired() ? FindDatum(GetSlotId(c_busIdName)) : nullptr; - if (busIdDatum && !busIdDatum->Empty()) - { - if (busIdDatum->IS_A(Data::FromAZType(busIdType)) || busIdDatum->IsConvertibleTo(Data::FromAZType(busIdType))) - { - auto busIdOutcome = busIdDatum->ToBehaviorValueParameter(m_ebus->m_idParam); - if (busIdOutcome.IsSuccess()) - { - busIdParameter = busIdOutcome.TakeValue(); - } - } - - if (busIdType == azrtti_typeid()) - { - if (auto busEntityId = busIdDatum->GetAs()) - { - if (!busEntityId->IsValid() || *busEntityId == ScriptCanvas::GraphOwnerId) - { - RuntimeRequestBus::EventResult(connectToEntityId, GetOwningScriptCanvasId(), &RuntimeRequests::GetRuntimeEntityId); - busIdParameter.m_value = &connectToEntityId; - } - } - } - } - - if (!IsIDRequired() || busIdParameter.GetValueAddress()) - { - if (m_connected) - { - // Ensure we disconnect if this bus is already connected, this could happen if a different bus Id is provided - // and this node is connected through the Connect slot. - m_handler->Disconnect(); - } - - AZ_VerifyError("Script Canvas", m_handler->Connect(&busIdParameter), - "Unable to connect to EBus with BusIdType %s. The BusIdType of the Script Event (%s) does not match the BusIdType provided.", - busIdType.ToString().data(), m_definition.GetName().c_str()); - - m_connected = true; - } - } - - void ReceiveScriptEvent::CompleteDisconnection() - { - m_handler->Disconnect(); - m_connected = false; - - if (IsActivated()) - { - SlotId onDisconnectSlotId = ReceiveScriptEventProperty::GetOnDisconnectedSlotId(this); - SignalOutput(onDisconnectSlotId); - } - } - - void ReceiveScriptEvent::Disconnect(bool queueDisconnect) - { - if (m_connected && m_handler) - { - if (queueDisconnect) - { - AZ::SystemTickBus::QueueFunction( - [this]() - { - CompleteDisconnection(); - } - ); - } - else - { - CompleteDisconnection(); - } - } - } const Internal::ScriptEventEntry* ReceiveScriptEvent::FindEventWithSlot(const Slot& slot) const { @@ -727,7 +535,7 @@ namespace ScriptCanvas { AZ::BehaviorContext* behaviorContext = nullptr; AZ::ComponentApplicationBus::BroadcastResult(behaviorContext, &AZ::ComponentApplicationBus::Events::GetBehaviorContext); - + const auto& ebusIterator = behaviorContext->m_ebuses.find(m_definition.GetName()); if (ebusIterator == behaviorContext->m_ebuses.end()) { @@ -771,51 +579,6 @@ namespace ScriptCanvas return true; } - void ReceiveScriptEvent::OnInputSignal(const SlotId& slotId) - { - SlotId connectSlot = ReceiveScriptEventProperty::GetConnectSlotId(this); - - if (connectSlot == slotId) - { - const Datum* busIdDatum = FindDatum(GetSlotId(c_busIdName)); - if (IsIDRequired() && (!busIdDatum || busIdDatum->Empty())) - { - SlotId failureSlot = ReceiveScriptEventProperty::GetOnFailureSlotId(this); - SignalOutput(failureSlot); - SCRIPTCANVAS_REPORT_ERROR((*this), "In order to connect this node, a valid BusId must be provided."); - return; - } - else - { - Connect(); - SlotId onConnectSlotId = ReceiveScriptEventProperty::GetOnConnectedSlotId(this); - SignalOutput(onConnectSlotId); - return; - } - } - - SlotId disconnectSlot = ReceiveScriptEventProperty::GetDisconnectSlotId(this); - if (disconnectSlot == slotId) - { - Disconnect(); - - return; - } - } - - void ReceiveScriptEvent::OnInputChanged(const Datum&, const SlotId&) - { - /* - if (GetExecutionType() == ExecutionType::Runtime - && m_autoConnectToGraphOwner - && slotId == FindSlotIdForDescriptor(c_busIdName, SlotDescriptors::DataIn())) - { - Disconnect(false); - Connect(); - } - */ - } - bool ReceiveScriptEvent::IsOutOfDate(const VersionData& graphVersion) const { AZ_UNUSED(graphVersion); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.h index e541f428db..ea86d263f8 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.h @@ -42,7 +42,6 @@ namespace ScriptCanvas ~ReceiveScriptEvent() override; void OnActivate() override; - void OnPostActivate() override; void OnDeactivate() override; const AZ::Data::AssetId GetAssetId() const { return m_scriptEventAssetId; } @@ -55,11 +54,11 @@ namespace ScriptCanvas AZStd::optional GetEventIndex(AZStd::string eventName) const override; AZStd::vector GetEventSlotIds() const override; AZStd::vector GetNonEventSlotIds() const override; - + bool IsIDRequired() const; - + bool IsEventSlotId(const SlotId& slotId) const; - + // NodeVersioning... bool IsOutOfDate(const VersionData& graphVersion) const override; UpdateResult OnUpdateNode() override; @@ -87,16 +86,9 @@ namespace ScriptCanvas private: - void Connect(); - void Disconnect(bool queueDisconnect = true); - void CompleteDisconnection(); - bool CreateEbus(); bool SetupHandler(); - void OnInputSignal(const SlotId& slotId) override; - void OnInputChanged(const Datum& input, const SlotId& slotId) override; - AZ::BehaviorEBusHandler* m_handler = nullptr; AZ::BehaviorEBus* m_ebus = nullptr; AZStd::recursive_mutex m_mutex; // post-serialization @@ -105,9 +97,6 @@ namespace ScriptCanvas void InitializeEvent(AZ::Data::Asset asset, int eventIndex, SlotIdMapping& populationMapping); - static void OnEventGenericHook(void* userData, const char* eventName, int eventIndex, AZ::BehaviorValueParameter* result, int numParameters, AZ::BehaviorValueParameter* parameters); - void OnEvent(const char* eventName, const int eventIndex, AZ::BehaviorValueParameter* result, const int numParameters, AZ::BehaviorValueParameter* parameters); - bool IsEventConnected(const Internal::ScriptEventEntry& entry) const; Internal::ScriptEventEntry ConfigureEbusEntry(const ScriptEvents::Method& methodDefinition, const AZ::BehaviorEBusHandler::BusForwarderEvent& event, SlotIdMapping& populationMapping); @@ -133,6 +122,6 @@ namespace ScriptCanvas bool m_connected; }; - } + } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Repeater.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Repeater.cpp index 3ff8545746..b5c2f90fcd 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Repeater.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Repeater.cpp @@ -59,7 +59,7 @@ namespace ScriptCanvas if (slot == nullptr) { // Handle older versions and improperly updated names - for (auto testUnit : { BaseTimerNode::TimeUnits::Seconds, BaseTimerNode::TimeUnits::Ticks}) + for (auto testUnit : { BaseTimerNode::TimeUnits::Seconds, BaseTimerNode::TimeUnits::Ticks }) { AZStd::string legacyName = BaseTimerNode::s_timeUnitNames[static_cast(testUnit)]; @@ -74,28 +74,6 @@ namespace ScriptCanvas } } } - - void Repeater::OnInputSignal(const SlotId&) - { - m_repetionCount = aznumeric_cast(RepeaterProperty::GetRepetitions(this)); - - if (m_repetionCount > 0) - { - StartTimer(); - } - } - - void Repeater::OnTimeElapsed() - { - m_repetionCount--; - SignalOutput(RepeaterProperty::GetActionSlotId(this), ScriptCanvas::ExecuteMode::UntilNodeIsFoundInStack); - - if (m_repetionCount == 0) - { - StopTimer(); - SignalOutput(RepeaterProperty::GetCompleteSlotId(this)); - } - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Repeater.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Repeater.h index 3d094feb78..b7c3dfb698 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Repeater.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Repeater.h @@ -17,6 +17,7 @@ namespace ScriptCanvas namespace Core { //! A node that repeats an execution signal over the specified time + //! Deprecated for nodeable version class Repeater : public ScriptCanvas::Nodes::Internal::BaseTimerNode { @@ -27,18 +28,11 @@ namespace ScriptCanvas void OnInit() override; - void OnInputSignal(const SlotId& slotId) override; - void OnTimeElapsed(); - const char* GetTimeSlotFormat() const override { return "Delay (%s)"; } - const char* GetBaseTimeSlotName() const override { return "Interval"; } const char* GetBaseTimeSlotToolTip() const override { return "The Interval between repetitions"; } - + protected: - - bool AllowInstantResponse() const override { return true; } - int m_repetionCount; }; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ScriptEventBase.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ScriptEventBase.cpp index ac946dc037..52f7b538ef 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ScriptEventBase.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ScriptEventBase.cpp @@ -10,8 +10,6 @@ #include #include #include - -#include #include #include @@ -23,7 +21,7 @@ namespace ScriptCanvas { namespace Internal { - void ScriptEventEntry::Reflect(AZ::ReflectContext* context) + void ScriptEventEntry::Reflect(AZ::ReflectContext* context) { if (AZ::SerializeContext* serialize = azrtti_cast(context)) { @@ -156,7 +154,7 @@ namespace ScriptCanvas } m_definition = definition; - } + } void ScriptEventBase::OnDeactivate() { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ScriptEventBase.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ScriptEventBase.h index d2ec893b5b..5baa76f4b6 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ScriptEventBase.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ScriptEventBase.h @@ -108,8 +108,6 @@ namespace ScriptCanvas virtual void Initialize(const AZ::Data::AssetId assetId); - - protected: // AZ::Data::AssetBus::Handler... diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SendScriptEvent.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SendScriptEvent.cpp index ee1d00e646..4ce7ee6e02 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SendScriptEvent.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SendScriptEvent.cpp @@ -28,64 +28,6 @@ namespace ScriptCanvas ScriptEvents::ScriptEventNotificationBus::Handler::BusDisconnect(); } - void SendScriptEvent::OnInputSignal(const SlotId&) - { - if (!m_method) - { - if (!m_asset.IsReady()) - { - m_asset = AZ::Data::AssetManager::Instance().GetAsset(m_scriptEventAssetId, AZ::Data::AssetLoadBehavior::PreLoad); - } - - CreateSender(m_asset); - } - - if (!m_method) - { - AZStd::string error = AZStd::string::format("Script Event sender node called with no initialized method (%s::%s)!", m_busName.c_str(), m_eventName.c_str()); - SCRIPTCANVAS_REPORT_ERROR((*this), error.c_str()); - } - - if (m_method) - { - Node::DatumVector inputDatums = GatherDatumsForDescriptor(SlotDescriptors::DataIn()); - - if (m_method->GetNumArguments() != inputDatums.size()) - { - SCRIPTCANVAS_REPORT_ERROR((*this), "The Script Event %s number of parameters %d do not correspond to the number of slots %zu in the Script Canvas node (%s). Make sure the node is updated in the Script Canvas graph.", m_method->m_name.c_str(), m_method->GetNumArguments(), inputDatums.size(), GetNodeName().c_str()); - return; - } - - AZStd::array params; - AZ::BehaviorValueParameter* paramFirst(params.begin()); - AZ::BehaviorValueParameter* paramIter = paramFirst; - { - // all input should have been pushed into this node already - int argIndex(0); - for (const Datum* datum : inputDatums) - { - AZ::Outcome inputParameter = datum->ToBehaviorValueParameter(*m_method->GetArgument(argIndex)); - if (!inputParameter.IsSuccess()) - { - SCRIPTCANVAS_REPORT_ERROR((*this), "BehaviorContext method input problem at parameter index %d: %s", argIndex, inputParameter.GetError().data()); - return; - } - - paramIter->Set(inputParameter.GetValue()); - ++paramIter; - ++argIndex; - } - - AZ_PROFILE_SCOPE_DYNAMIC(AZ::Debug::ProfileCategory::ScriptCanvas, "ScriptCanvas::ScriptEvents::OnInputSignal::Call %s::%s", m_busName.c_str(), m_eventName.c_str()); - { - BehaviorContextMethodHelper::Call(*this, m_method, paramFirst, paramIter, m_resultSlotID); - } - } - } - - SignalOutput(GetSlotId("Out")); - } - ScriptCanvas::EBusBusId SendScriptEvent::GetBusId() const { return m_busId; @@ -155,11 +97,6 @@ namespace ScriptCanvas AZ::Outcome IsExposable(const AZ::BehaviorMethod& method) { - if (method.GetNumArguments() > BehaviorContextMethodHelper::MaxCount) - { - return AZ::Failure(AZStd::string("Too many arguments for a Script Canvas method")); - } - for (size_t argIndex(0), sentinel(method.GetNumArguments()); argIndex != sentinel; ++argIndex) { if (const AZ::BehaviorParameter* argument = method.GetArgument(argIndex)) @@ -271,7 +208,7 @@ namespace ScriptCanvas asset.BlockUntilLoadComplete(); const ScriptEvents::ScriptEvent& definition = asset.Get()->m_definition; - + // If no name has been serialized, this is a new node, so initialize it to the Script Event's definition values. if (m_busId == ScriptCanvas::EBusBusId()) { @@ -295,7 +232,7 @@ namespace ScriptCanvas } NamespacePath emptyNamespacePath; - + ScriptEvents::ScriptEventBus::BroadcastResult(m_scriptEvent, &ScriptEvents::ScriptEventRequests::RegisterScriptEvent, assetId, m_version); AZ::BehaviorMethod* method{}; @@ -362,9 +299,9 @@ namespace ScriptCanvas ScriptEvents::Method scriptEventMethod; definition.FindMethod(method->m_name, scriptEventMethod); - + size_t argIndex = 0; - + // Address slot (BusId) if (method->HasBusId()) { @@ -460,7 +397,7 @@ namespace ScriptCanvas { return true; } - + RegisterScriptEvent(asset); if (asset && asset.IsReady()) @@ -491,7 +428,7 @@ namespace ScriptCanvas { ConfigureMethod(*method); InitializeResultSlotId(); - + return true; } } @@ -591,7 +528,7 @@ namespace ScriptCanvas if (m_scriptEvent == nullptr) { return false; - } + } m_ebus = m_scriptEvent->GetBehaviorBus(); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SendScriptEvent.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SendScriptEvent.h index 27cd309386..7490fef650 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SendScriptEvent.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SendScriptEvent.h @@ -79,11 +79,7 @@ namespace ScriptCanvas bool IsConfigured() const { return m_method != nullptr; } void ConfigureMethod(AZ::BehaviorMethod& method); bool RegisterScriptEvent(AZ::Data::Asset asset); - - void OnInputSignal(const SlotId&) override; - void AddInputSlot(size_t slotIndex, size_t argIndex, const AZStd::string_view argName, const AZStd::string_view tooltip, AZ::BehaviorMethod* method, const AZ::BehaviorParameter* argument, AZ::Uuid slotKey, SlotIdMapping& populationMapping); - void OnRegistered(const ScriptEvents::ScriptEvent&) override; SlotId m_resultSlotID; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SetVariable.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SetVariable.cpp index 7096f5024e..6d6260aabe 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SetVariable.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SetVariable.cpp @@ -59,47 +59,6 @@ namespace ScriptCanvas } } - void SetVariableNode::OnInputSignal(const SlotId& slotID) - { - if (slotID == GetSlotId(GetInputSlotName())) - { - const Datum* sourceDatum = FindDatum(m_variableDataInSlotId); - - if (sourceDatum && m_variableView.IsValid()) - { - m_variableView.AssignToDatum((*sourceDatum)); - - SC_EXECUTION_TRACE_VARIABLE_CHANGE((m_variableId), (CreateVariableChange((*m_variableView.GetDatum()), m_variableId))); - } - - Slot* resultSlot = GetSlot(m_variableDataOutSlotId); - if (resultSlot && m_variableView.IsValid()) - { - const Datum* variableDatum = m_variableView.GetDatum(); - - PushOutput((*variableDatum), *resultSlot); - - // Push the data for each property slot out as well - for (auto&& propertyAccount : m_propertyAccounts) - { - Slot* propertySlot = GetSlot(propertyAccount.m_propertySlotId); - if (propertySlot && propertyAccount.m_getterFunction) - { - auto outputOutcome = propertyAccount.m_getterFunction((*variableDatum)); - - if (!outputOutcome) - { - SCRIPTCANVAS_REPORT_ERROR((*this), outputOutcome.TakeError().data()); - return; - } - PushOutput(outputOutcome.TakeValue(), *propertySlot); - } - } - } - - SignalOutput(GetSlotId(GetOutputSlotName())); - } - } VariableId SetVariableNode::GetVariableIdRead(const Slot*) const { return m_variableId; @@ -283,7 +242,8 @@ namespace ScriptCanvas ScriptCanvas::Data::Type baseType = ScriptCanvas::Data::Type::Invalid(); VariableRequestBus::EventResult(baseType, GetScopedVariableId(), &VariableRequests::GetType); - const AZStd::unordered_map* variableMap = GetRuntimeBus()->GetVariables(); + const GraphVariableMapping* variableMap = nullptr; + GraphRequestBus::EventResult(variableMap, GetOwningScriptCanvasId(), &GraphRequests::GetVariables); if (variableMap && baseType.IsValid()) { @@ -319,12 +279,6 @@ namespace ScriptCanvas VariableNodeNotificationBus::Event(GetEntityId(), &VariableNodeNotifications::OnVariableRemovedFromNode, removedVariableId); } - AnnotateNodeSignal SetVariableNode::CreateAnnotationData() - { - AZ::EntityId assetNodeId = GetRuntimeBus()->FindAssetNodeIdByRuntimeNodeId(GetEntityId()); - return AnnotateNodeSignal(CreateGraphInfo(GetOwningScriptCanvasId(), GetGraphIdentifier()), AnnotateNodeSignal::AnnotationLevel::Info, m_variableName, AZ::NamedEntityId(assetNodeId, GetNodeName())); - } - void SetVariableNode::AddPropertySlots(const Data::Type& type) { Data::GetterContainer getterFunctions = Data::ExplodeToGetters(type); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SetVariable.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SetVariable.h index bc97fa6a08..05695a9b1e 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SetVariable.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SetVariable.h @@ -61,13 +61,12 @@ namespace ScriptCanvas PropertyFields GetPropertyFields() const override; // Translation ////////////////////////////////////////////////////////////////////////// - + protected: void OnInit() override; - void OnPostActivate() override; - void OnInputSignal(const SlotId&) override; + void OnPostActivate() override; void AddSlots(); void RemoveSlots(); @@ -86,8 +85,6 @@ namespace ScriptCanvas void OnVariableRemoved() override; //// - AnnotateNodeSignal CreateAnnotationData(); - VariableId m_variableId; SlotId m_variableDataInSlotId; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Start.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Start.cpp deleted file mode 100644 index 66dfe424c5..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Start.cpp +++ /dev/null @@ -1,25 +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 "Start.h" - -#include -#include - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Core - { - void Start::OnInputSignal(const SlotId&) - { - SignalOutput(StartProperty::GetOutSlotId(this)); - } - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Start.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Start.h index bc5ca997e8..f4ba99746a 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Start.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Start.h @@ -25,11 +25,6 @@ namespace ScriptCanvas public: SCRIPTCANVAS_NODE(Start); - - - - void OnInputSignal(const SlotId&) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/String.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/String.h deleted file mode 100644 index 712d3d808f..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/String.h +++ /dev/null @@ -1,47 +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 ScriptCanvas -{ - namespace Nodes - { - namespace Core - { - - class String - : public NativeDatumNode - { - public: - using ParentType = NativeDatumNode; - AZ_COMPONENT(String, "{9C9B9D96-1838-4493-A14D-40C77B4DB5DD}", ParentType); - - static void Reflect(AZ::ReflectContext* context) - { - if (AZ::SerializeContext* serializeContext = azrtti_cast(context)) - { - serializeContext->Class() - ->Version(3) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("String", "Holds a string value") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/String.png") - ; - } - } - } - - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/UnaryOperator.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/UnaryOperator.cpp index 43d84f0e28..1695c1d4d3 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/UnaryOperator.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/UnaryOperator.cpp @@ -18,17 +18,6 @@ namespace ScriptCanvas const char* UnaryOperator::k_valueName = "Value"; const char* UnaryOperator::k_resultName = "Result"; - Datum UnaryOperator::Evaluate([[maybe_unused]] const Datum& value) - { - AZ_Assert(false, "Evaluate must be overridden"); - return Datum(); - }; - - void UnaryOperator::OnInputSignal([[maybe_unused]] const SlotId& slot) - { - AZ_Assert(false, "OnInputSignal must be overridden"); - } - void UnaryOperator::ConfigureSlots() { { @@ -68,25 +57,6 @@ namespace ScriptCanvas { } - void UnaryExpression::OnInputSignal(const SlotId&) - { - const Datum output = Evaluate(*FindDatumByIndex(k_datumIndex)); - if (auto slot = GetSlot(GetOutputSlotId())) - { - PushOutput(output, *slot); - } - - const bool* value = output.GetAs(); - if (value && *value) - { - SignalOutput(GetSlotId(k_onTrue)); - } - else - { - SignalOutput(GetSlotId(k_onFalse)); - } - } - void UnaryExpression::ConfigureSlots() { { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/UnaryOperator.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/UnaryOperator.h index d2188f0b3c..fbc481bb48 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/UnaryOperator.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/UnaryOperator.h @@ -10,7 +10,6 @@ #include #include #include -#include #include namespace ScriptCanvas @@ -32,8 +31,6 @@ namespace ScriptCanvas static const char* k_onTrue; static const char* k_onFalse; - - protected: ConstSlotsOutcome GetSlotsInExecutionThreadByTypeImpl(const Slot&, CombinedSlotType targetSlotType, const Slot*) const override { @@ -45,15 +42,7 @@ namespace ScriptCanvas void ConfigureSlots() override; - // must be overridden with the binary operations - virtual Datum Evaluate(const Datum& value); - - // Triggered by the execution signal - void OnInputSignal(const SlotId& slot) override; - SlotId GetOutputSlotId() const; - - }; class UnaryExpression : public UnaryOperator @@ -67,11 +56,7 @@ namespace ScriptCanvas void ConfigureSlots() override; - void OnInputSignal(const SlotId& slot) override; - virtual void InitializeUnaryExpression(); - - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Entity.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Entity.cpp index 79a89ab1bf..b3bb5f474f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Entity.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Entity.cpp @@ -11,8 +11,6 @@ namespace ScriptCanvas { - - static bool OldEntityIdIsValidNodeVersionConverter(AZ::SerializeContext& context, AZ::SerializeContext::DataElementNode& rootNodeElement) { int nodeElementIndex = rootNodeElement.FindElement(AZ_CRC("BaseClass1", 0xd4925735)); @@ -64,7 +62,7 @@ namespace ScriptCanvas const AZ::TypeId nodeFunctionGenericMultiReturnTemplateTypeId("{DC5B1799-6C5B-4190-8D90-EF0C2D1BCE4E}"); const AZ::TypeId oldEntityIdIsValidFuncSignatureTypeId = azrtti_typeid(); const AZ::TypeId oldEntityIdIsValidTypeId("{7CEC53AE-E12B-4738-B542-4587B8B95DC2}"); - + // Aggregate NodeFunctionGenericMultiReturn typeid // NOTE: Aggregation order addition is not commutative and must be in the added last to first: (FirstUuid + ( SecondUuid + (ThirdUuid + ... + (NthUuid)) const AZ::TypeId oldIsValidNodeAggregateTypeId = nodeFunctionGenericMultiReturnTemplateTypeId + (oldEntityIdIsValidFuncSignatureTypeId + oldEntityIdIsValidTypeId); @@ -72,8 +70,6 @@ namespace ScriptCanvas } if (AZ::BehaviorContext* behaviorContext = azrtti_cast(reflection)) { - using namespace ScriptCanvas::Nodes::Entity; - SCRIPT_CANVAS_GENERICS_TO_VM(EntityIDNodes::Registrar, EntityID, behaviorContext, EntityIDNodes::k_categoryName); SCRIPT_CANVAS_GENERICS_TO_VM(EntityNodes::Registrar, Entity, behaviorContext, EntityNodes::k_categoryName); } @@ -82,25 +78,15 @@ namespace ScriptCanvas void Entity::InitNodeRegistry(NodeRegistry& nodeRegistry) { - using namespace ScriptCanvas::Nodes::Entity; - AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); EntityIDNodes::Registrar::AddToRegistry(nodeRegistry); EntityNodes::Registrar::AddToRegistry(nodeRegistry); } AZStd::vector Entity::GetComponentDescriptors() { - AZStd::vector descriptors = { - ScriptCanvas::Nodes::Entity::Rotate::CreateDescriptor(), - ScriptCanvas::Nodes::Entity::EntityID::CreateDescriptor(), - ScriptCanvas::Nodes::Entity::EntityRef::CreateDescriptor() - }; - + AZStd::vector descriptors; EntityIDNodes::Registrar::AddDescriptors(descriptors); EntityNodes::Registrar::AddDescriptors(descriptors); - return descriptors; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Entity.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Entity.h index 0bd54f4194..be746e65f0 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Entity.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Entity.h @@ -10,9 +10,6 @@ // This header is only meant to include the nodes and should not contain // shared code -#include "Rotate.h" #include "RotateMethod.h" -#include "EntityIDNode.h" #include "EntityIDNodes.h" -#include "EntityRef.h" #include "EntityNodes.h" diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/EntityIDNode.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/EntityIDNode.h deleted file mode 100644 index 5b60c0cea8..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/EntityIDNode.h +++ /dev/null @@ -1,47 +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 ScriptCanvas -{ - namespace Nodes - { - namespace Entity - { - class EntityID - : public NativeDatumNode - { - public: - using ParentType = NativeDatumNode; - AZ_COMPONENT(EntityID, "{37F26070-F29B-412A-9228-86D8D10F3C32}", ParentType); - - static void Reflect(AZ::ReflectContext* reflection) - { - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) - { - serializeContext->Class() - ->Version(0) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("EntityID", "Stores a reference to an entity") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/EntityID.png") - ->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly) - ; - } - } - } - - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/EntityRef.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/EntityRef.h deleted file mode 100644 index 720205a158..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/EntityRef.h +++ /dev/null @@ -1,79 +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 ScriptCanvas -{ - namespace Nodes - { - namespace Entity - { - class EntityRef - : public NativeDatumNode - { - public: - using ParentType = NativeDatumNode; - AZ_COMPONENT(EntityRef, "{0EE5782F-B241-4127-AE53-E6746B00447F}", ParentType); - - static void Reflect(AZ::ReflectContext* reflection) - { - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) - { - serializeContext->Class() - ->Version(2) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - // EntityRef node is special in that it's only created when we drag in an entity from the main scene. - // And is unmodifiable(essentially an external constant). As such, we hide it from the node palette. - editContext->Class("EntityID", "Stores a reference to an entity") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/EntityRef.png") - ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::List) - ; - } - } - } - - AZ_INLINE void SetEntityRef(const AZ::EntityId& id) - { - ModifiableDatumView datumView; - FindModifiableDatumView(GetSlotId(k_setThis), datumView); - - if (datumView.IsValid()) - { - // only called on edit time creation, so no need to push out the data, consider cutting this function if possible - datumView.SetAs(id); - OnOutputChanged((*datumView.GetDatum())); - } - } - - AZ_INLINE AZ::EntityId GetEntityRef() const - { - AZ::EntityId retVal; - if (auto input = FindDatum(GetSlotId(k_setThis))) - { - const AZ::EntityId* inputId = input->GetAs(); - - if (inputId) - { - retVal = (*inputId); - } - } - - return retVal; - } - - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Rotate.ScriptCanvasGrammar.xml b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Rotate.ScriptCanvasGrammar.xml deleted file mode 100644 index 0b2c5714d7..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Rotate.ScriptCanvasGrammar.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Rotate.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Rotate.cpp deleted file mode 100644 index b1df21ea52..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Rotate.cpp +++ /dev/null @@ -1,56 +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 - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Entity - { - void Rotate::OnInputSignal(const SlotId&) - { - AZ::EntityId targetEntity = RotateProperty::GetEntity(this); - - if (!targetEntity.IsValid()) - { - SCRIPTCANVAS_REPORT_ERROR((*this), "Invalid entity specified"); - return; - } - - AZ::Entity* entity = nullptr; - AZ::ComponentApplicationBus::BroadcastResult(entity, &AZ::ComponentApplicationRequests::FindEntity, targetEntity); - if (entity) - { - AZ::Vector3 angles = AZ::Vector3::CreateZero(); - if (entity->GetState() == AZ::Entity::State::Active) - { - angles = RotateProperty::GetEulerAngles(this); - - AZ::Quaternion rotation = AZ::ConvertEulerDegreesToQuaternion(angles); - - AZ::Transform currentTransform = AZ::Transform::CreateIdentity(); - AZ::TransformBus::EventResult(currentTransform, targetEntity, &AZ::TransformInterface::GetWorldTM); - - currentTransform.SetRotation((rotation * currentTransform.GetRotation().GetNormalized())); - - AZ::TransformBus::Event(targetEntity, &AZ::TransformInterface::SetWorldTM, currentTransform); - } - } - - SignalOutput(RotateProperty::GetOutSlotId(this)); - } - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Rotate.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Rotate.h deleted file mode 100644 index cf6c19c417..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Rotate.h +++ /dev/null @@ -1,44 +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 - -// LY-103055 Temporary workaround to fix compile error when building Android NDK 19 and above due to AzCodeGenerator -// not receiving the correct clang system includes -namespace AZ -{ - class EntityId; - class Vector3; -} - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Entity - { - //! Deprecated: see Entity Transform class' reflection of method "Rotate" - class Rotate - : public Node - { - - public: - - SCRIPTCANVAS_NODE(Rotate); - - void OnInputSignal(const SlotId&) override; - - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Libraries.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Libraries.h index e75191a4f6..529b74d7ab 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Libraries.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Libraries.h @@ -12,6 +12,21 @@ #include #include +#define REFLECT_MATH_LIBRARY_TYPE(MathType, Guid)\ + struct MathType\ + {\ + AZ_TYPE_INFO(MathType, Guid);\ + static void Reflect(AZ::ReflectContext* reflection)\ + {\ + if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection))\ + {\ + serializeContext->Class()\ + ->Version(0)\ + ;\ + }\ + }\ + }; + namespace AZ { class ReflectContext; @@ -45,7 +60,7 @@ namespace ScriptCanvas virtual ~LibraryDefinition() = default; static const NodeRegistry::NodeList GetNodes(const AZ::Uuid& libraryType) - { + { NodeRegistry& registry = (*GetNodeRegistry()); const auto& libraryIterator = registry.m_nodeMap.find(libraryType); if (libraryIterator != registry.m_nodeMap.end()) diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/And.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/And.h index fa553036f5..f33c6acde4 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/And.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/And.h @@ -52,11 +52,6 @@ namespace ScriptCanvas ////////////////////////////////////////////////////////////////////////// protected: - Datum Evaluate(const Datum& lhs, const Datum& rhs) override - { - return Datum(*lhs.GetAs() && *rhs.GetAs()); - } - void InitializeBooleanExpression() override { { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Any.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Any.cpp index 29fd8a5075..54430a3794 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Any.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Any.cpp @@ -28,7 +28,7 @@ namespace ScriptCanvas return AZ::Success(DependencyReport{}); } - bool Any::IsNoOp() const + bool Any::IsNoOp() const { return true; } @@ -60,12 +60,6 @@ namespace ScriptCanvas RegisterExtension(visualExtensions); } } - - void Any::OnInputSignal([[maybe_unused]] const SlotId& slotId) - { - const SlotId outSlotId = AnyProperty::GetOutSlotId(this); - SignalOutput(outSlotId); - } SlotId Any::HandleExtension(AZ::Crc32 extensionId) { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Any.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Any.h index aca5b2bb51..efc8be90d0 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Any.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Any.h @@ -30,7 +30,7 @@ namespace ScriptCanvas Current }; - + public: SCRIPTCANVAS_NODE(Any); @@ -44,8 +44,6 @@ namespace ScriptCanvas void OnInit() override; void ConfigureVisualExtensions() override; - void OnInputSignal(const SlotId& slot) override; - SlotId HandleExtension(AZ::Crc32 extensionId) override; bool CanDeleteSlot(const SlotId& slotId) const override; @@ -56,10 +54,8 @@ namespace ScriptCanvas /// Translation bool IsNoOp() const override; - - AZ::Outcome GetDependencies() const override; - + protected: ConstSlotsOutcome GetSlotsInExecutionThreadByTypeImpl(const Slot&, CombinedSlotType targetSlotType, const Slot*) const override { @@ -69,9 +65,7 @@ namespace ScriptCanvas AZ::Crc32 GetInputExtensionId() const { return AZ_CRC("Output", 0xccde149e); } private: - AZStd::string GenerateInputName(int counter); - SlotId AddInputSlot(); void FixupStateNames(); }; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Boolean.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Boolean.h deleted file mode 100644 index 5a118d9374..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Boolean.h +++ /dev/null @@ -1,48 +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 ScriptCanvas -{ - namespace Nodes - { - namespace Logic - { - class Boolean - : public NativeDatumNode - { - public: - using ParentType = NativeDatumNode; - AZ_COMPONENT(Boolean, "{263E8CAE-9F20-4198-A937-14761A46D996}", ParentType); - - static void Reflect(AZ::ReflectContext* reflection) - { - ParentType::Reflect(reflection); - - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) - { - serializeContext->Class() - ->Version(4) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("Boolean", "A boolean value (true/false)") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/Boolean.png") - ; - } - } - } - - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Break.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Break.h index 6d0718ff2e..3555fea2e2 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Break.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Break.h @@ -27,11 +27,11 @@ namespace ScriptCanvas SCRIPTCANVAS_NODE(Break); - Break() = default; + Break() = default; AZ::Outcome GetDependencies() const override; - + }; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Cycle.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Cycle.cpp index a5a75e259c..1149c19230 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Cycle.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Cycle.cpp @@ -98,26 +98,6 @@ namespace ScriptCanvas return AddSlot(executionConfiguration); } - void Cycle::OnInputSignal(const SlotId& slot) - { - if (slot != CycleProperty::GetInSlotId(this)) - { - return; - } - - if (!m_orderedOutputSlots.empty()) - { - const SlotId& slotId = m_orderedOutputSlots[m_executionSlot]; - SignalOutput(slotId); - - if (++m_executionSlot >= m_orderedOutputSlots.size()) - { - m_executionSlot = 0; - } - } - - } - void Cycle::OnSlotRemoved([[maybe_unused]] const SlotId& slotId) { FixupStateNames(); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Cycle.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Cycle.h index c275b8031c..3d903018d0 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Cycle.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Cycle.h @@ -43,13 +43,9 @@ namespace ScriptCanvas ConstSlotsOutcome GetSlotsInExecutionThreadByTypeImpl(const Slot& executionSlot, CombinedSlotType targetSlotType, const Slot* /*executionChildSlot*/) const override; - - protected: AZStd::string GetDisplayGroup() const { return "OutputGroup"; } - - void OnInputSignal(const SlotId& slot) override; void OnSlotRemoved(const SlotId& slotId) override; private: @@ -58,7 +54,7 @@ namespace ScriptCanvas void FixupStateNames(); int m_numOutputs; - + size_t m_executionSlot; AZStd::vector< SlotId > m_orderedOutputSlots; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Gate.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Gate.cpp index 3a36a265c2..a0462ae69a 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Gate.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Gate.cpp @@ -17,29 +17,12 @@ namespace ScriptCanvas { Gate::Gate() : Node() - , m_condition(false) {} AZ::Outcome Gate::GetDependencies() const { return AZ::Success(DependencyReport{}); } - - void Gate::OnInputSignal(const SlotId&) - { - SlotId trueSlot = GateProperty::GetTrueSlotId(this); - SlotId falseSlot = GateProperty::GetFalseSlotId(this); - - m_condition = GateProperty::GetCondition(this); - if (m_condition) - { - SignalOutput(trueSlot); - } - else - { - SignalOutput(falseSlot); - } - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Gate.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Gate.h index 0480db1f32..ae9c25573b 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Gate.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Gate.h @@ -9,7 +9,6 @@ #include #include -#include #include @@ -24,7 +23,6 @@ namespace ScriptCanvas : public Node { public: - SCRIPTCANVAS_NODE(Gate); Gate(); @@ -36,22 +34,11 @@ namespace ScriptCanvas bool IsIfBranch() const override { return true; } - - protected: ConstSlotsOutcome GetSlotsInExecutionThreadByTypeImpl(const Slot& /*executionSlot*/, CombinedSlotType targetSlotType, const Slot* /*executionChildSlot*/) const override { return AZ::Success(GetSlotsByType(targetSlotType)); } - - ////////////////////////////////////////////////////////////////////////// - - void OnInputSignal(const SlotId&) override; - - private: - - bool m_condition; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Indexer.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Indexer.cpp deleted file mode 100644 index 85898ad042..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Indexer.cpp +++ /dev/null @@ -1,37 +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 "Indexer.h" - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Logic - { - void Indexer::OnInputSignal(const SlotId& slotId) - { - auto slotIndex = FindSlotIndex(slotId); - if (slotIndex < 0) - { - AZ_Warning("Script Canvas", false, "Could not find slot with id %s", slotId.ToString().c_str()); - return; - } - - const Datum output(slotIndex); - - const SlotId outSlotId = IndexerProperty::GetOutSlotId(this); - if (auto outSlot = GetSlot(outSlotId)) - { - PushOutput(output, *outSlot); - } - - SignalOutput(outSlotId); - } - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Indexer.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Indexer.h index bea41a4e14..6a6d335a87 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Indexer.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Indexer.h @@ -21,16 +21,8 @@ namespace ScriptCanvas class Indexer : public Node { - public: - SCRIPTCANVAS_NODE(Indexer); - - Indexer() = default; - - protected: - - void OnInputSignal(const SlotId& slot) override; }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/IsNull.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/IsNull.cpp index 480d51643b..851ccb24dd 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/IsNull.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/IsNull.cpp @@ -39,7 +39,7 @@ namespace ScriptCanvas { { auto func = []() { return aznew IsReferenceTypeContract(); }; - ContractDescriptor descriptor{ AZStd::move(func) }; + ContractDescriptor descriptor{ AZStd::move(func) }; DynamicDataSlotConfiguration slotConfiguration; @@ -61,13 +61,6 @@ namespace ScriptCanvas AddSlot(slotConfiguration); } } - - void IsNull::OnInputSignal(const SlotId&) - { - const bool isNull = FindDatum(GetSlotId("Reference"))->Empty(); - PushOutput(Datum(isNull), *GetSlot(GetSlotId("Is Null"))); - SignalOutput(isNull ? IsNullProperty::GetTrueSlotId(this) : IsNullProperty::GetFalseSlotId(this)); - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/IsNull.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/IsNull.h index 12f996003c..36d608191f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/IsNull.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/IsNull.h @@ -34,8 +34,6 @@ namespace ScriptCanvas bool IsIfBranchPrefacedWithBooleanExpression() const override; - - protected: ConstSlotsOutcome GetSlotsInExecutionThreadByTypeImpl(const Slot&, CombinedSlotType targetSlotType, const Slot*) const override { @@ -43,9 +41,6 @@ namespace ScriptCanvas } void OnInit() override; - - void OnInputSignal(const SlotId&) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Logic.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Logic.cpp index 8bd587ee4b..96e511fa49 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Logic.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Logic.cpp @@ -43,7 +43,6 @@ namespace ScriptCanvas using namespace ScriptCanvas::Nodes::Logic; AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); @@ -54,7 +53,7 @@ namespace ScriptCanvas AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); + AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); @@ -65,7 +64,6 @@ namespace ScriptCanvas return AZStd::vector({ ScriptCanvas::Nodes::Logic::And::CreateDescriptor(), ScriptCanvas::Nodes::Logic::Any::CreateDescriptor(), - ScriptCanvas::Nodes::Logic::Boolean::CreateDescriptor(), ScriptCanvas::Nodes::Logic::Break::CreateDescriptor(), ScriptCanvas::Nodes::Logic::Cycle::CreateDescriptor(), ScriptCanvas::Nodes::Logic::Gate::CreateDescriptor(), @@ -80,7 +78,7 @@ namespace ScriptCanvas ScriptCanvas::Nodes::Logic::TargetedSequencer::CreateDescriptor(), ScriptCanvas::Nodes::Logic::WeightedRandomSequencer::CreateDescriptor(), ScriptCanvas::Nodes::Logic::While::CreateDescriptor(), - }); + }); } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Logic.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Logic.h index a59a4e4a88..26fa846885 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Logic.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Logic.h @@ -12,7 +12,6 @@ #include "And.h" #include "Any.h" -#include "Boolean.h" #include "Break.h" #include "Cycle.h" #include "Gate.h" diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Multiplexer.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Multiplexer.cpp deleted file mode 100644 index c8af5ae7a4..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Multiplexer.cpp +++ /dev/null @@ -1,42 +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 "Multiplexer.h" - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Logic - { - Multiplexer::Multiplexer() - {} - - void Multiplexer::OnInputSignal(const SlotId& slotId) - { - auto slotIndex = FindSlotIndex(slotId); - if (!slotIndex) - { - AZ_Warning("Script Canvas", false, "Could not find slot with Id %s", slotId.ToString().c_str()); - return; - } - - // These are generated from CodeGen, they essentially - // check if there's anything connected on the slot and - // they assign the local member with the value, otherwise - // they use the default property value. - const AZ::s64 selectedIndex = MultiplexerProperty::GetIndex(this); - - if (selectedIndex == slotIndex) - { - const SlotId outSlotId = MultiplexerProperty::GetOutSlotId(this); - SignalOutput(outSlotId); - } - } - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Multiplexer.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Multiplexer.h index 00a974ab8a..e6df414398 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Multiplexer.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Multiplexer.h @@ -26,12 +26,6 @@ namespace ScriptCanvas SCRIPTCANVAS_NODE(Multiplexer); - Multiplexer(); - - protected: - - void OnInputSignal(const SlotId& slot) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Not.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Not.h index 58e0d747c7..119a36e682 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Not.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Not.h @@ -8,7 +8,6 @@ #pragma once #include -#include namespace ScriptCanvas { @@ -64,15 +63,7 @@ namespace ScriptCanvas } // Translation ////////////////////////////////////////////////////////////////////////// - - protected: - - Datum Evaluate(const Datum& value) override - { - const bool* boolValue = value.GetAs(); - return Datum(boolValue && (!(*boolValue))); - } - }; + }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Once.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Once.h index e216b7e793..fc06fafbbe 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Once.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Once.h @@ -9,7 +9,6 @@ #include #include -#include #include @@ -32,8 +31,6 @@ namespace ScriptCanvas AZ::Outcome GetDependencies() const override; - - protected: ExecutionNameMap GetExecutionNameMap() const override; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Or.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Or.h index 6868dc6e6b..315d254d50 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Or.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Or.h @@ -50,11 +50,6 @@ namespace ScriptCanvas ////////////////////////////////////////////////////////////////////////// protected: - Datum Evaluate(const Datum& lhs, const Datum& rhs) override - { - return Datum(*lhs.GetAs() || *rhs.GetAs()); - } - void InitializeBooleanExpression() override { { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/OrderedSequencer.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/OrderedSequencer.cpp index c7c3834594..4061b9adbe 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/OrderedSequencer.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/OrderedSequencer.cpp @@ -18,7 +18,7 @@ namespace ScriptCanvas OrderedSequencer::OrderedSequencer() : Node() , m_numOutputs(0) - { + { } AZ::Outcome OrderedSequencer::GetDependencies() const @@ -67,15 +67,15 @@ namespace ScriptCanvas visualExtensions.m_connectionType = ConnectionType::Output; visualExtensions.m_identifier = AZ::Crc32("AddOutputGroup"); visualExtensions.m_displayGroup = GetDisplayGroup(); - + RegisterExtension(visualExtensions); } } - + bool OrderedSequencer::CanDeleteSlot(const SlotId& slotId) const { - Slot* slot = GetSlot(slotId); - + Slot* slot = GetSlot(slotId); + // Only remove execution out slots when we have more then 1 output slot. if (slot && slot->IsExecution() && slot->IsOutput()) { @@ -88,17 +88,17 @@ namespace ScriptCanvas SlotId OrderedSequencer::HandleExtension([[maybe_unused]] AZ::Crc32 extensionId) { ExecutionSlotConfiguration executionConfiguration(GenerateOutputName(m_numOutputs), ConnectionType::Output); - + executionConfiguration.m_addUniqueSlotByNameAndType = false; executionConfiguration.m_displayGroup = GetDisplayGroup(); - + ++m_numOutputs; - + return AddSlot(executionConfiguration); } void OrderedSequencer::OnSlotRemoved([[maybe_unused]] const SlotId& slotId) - { + { FixupStateNames(); } @@ -107,12 +107,12 @@ namespace ScriptCanvas AZStd::string slotName = AZStd::string::format("Out %i", counter); return AZStd::move(slotName); } - + void OrderedSequencer::FixupStateNames() { auto outputSlots = GetAllSlotsByDescriptor(SlotDescriptors::ExecutionOut()); m_numOutputs = static_cast(outputSlots.size()); - + for (int i = 0; i < outputSlots.size(); ++i) { Slot* slot = GetSlot(outputSlots[i]->GetId()); @@ -122,7 +122,7 @@ namespace ScriptCanvas slot->Rename(GenerateOutputName(i)); } } - } + } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/OrderedSequencer.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/OrderedSequencer.h index f973446702..ca07b60834 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/OrderedSequencer.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/OrderedSequencer.h @@ -22,7 +22,7 @@ namespace ScriptCanvas class OrderedSequencer : public Node { - + public: SCRIPTCANVAS_NODE(OrderedSequencer); @@ -43,10 +43,10 @@ namespace ScriptCanvas void ConfigureVisualExtensions() override; - + protected: - + AZStd::string GetDisplayGroup() const { return "OutputGroup"; } protected: @@ -57,11 +57,11 @@ namespace ScriptCanvas AZStd::string GenerateOutputName(int counter) const; void FixupStateNames(); - + int m_numOutputs; - + AZStd::vector< SlotId > m_orderedOutputSlots; }; } - } + } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Sequencer.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Sequencer.cpp index 75693f994c..1612727fc3 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Sequencer.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Sequencer.cpp @@ -29,7 +29,7 @@ namespace ScriptCanvas { auto inSlot = SequencerProperty::GetInSlot(this); auto nextSlot = SequencerProperty::GetNextSlot(this); - + if (inSlot && inSlot->IsConnected()) { // Replace by TargetedSequencer @@ -107,50 +107,6 @@ namespace ScriptCanvas } } - void Sequencer::OnInputSignal(const SlotId& slot) - { - m_selectedIndex = SequencerProperty::GetIndex(this); - m_order = SequencerProperty::GetOrder(this); - - const SlotId inSlot = SequencerProperty::GetInSlotId(this); - const SlotId nextSlot = SequencerProperty::GetNextSlotId(this); - - if (slot == inSlot) - { - m_currentIndex = m_selectedIndex; - } - else if (slot == nextSlot) - { - int step = m_order == Order::Forward ? 1 : -1; - - m_outputIsValid = false; - int startIndex = m_currentIndex; - while (!m_outputIsValid) - { - m_currentIndex = (m_currentIndex + step + NUMBER_OF_OUTPUTS) % NUMBER_OF_OUTPUTS; - SlotId outSlotId = GetCurrentSlotId(); - Slot* outSlot = GetSlot(outSlotId); - if (outSlot) - { - m_outputIsValid = !GetConnectedNodes(*outSlot).empty(); - } - - //Avoid infinite loop when none of the outputs or only the current output connects to other nodes. - if (m_currentIndex == startIndex) - { - m_outputIsValid = false; - break; - } - } - } - - if (m_outputIsValid) - { - SlotId outSlotId = GetCurrentSlotId(); - SignalOutput(outSlotId); - } - } - SlotId Sequencer::GetCurrentSlotId() const { AZStd::string slotName = "Out" + AZStd::to_string(m_currentIndex); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Sequencer.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Sequencer.h index 347d21baa2..a4fe3f358d 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Sequencer.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Sequencer.h @@ -43,10 +43,6 @@ namespace ScriptCanvas int m_order; int m_selectedIndex; - protected: - - void OnInputSignal(const SlotId& slot) override; - private: int m_currentIndex; bool m_outputIsValid; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/TargetedSequencer.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/TargetedSequencer.cpp index ec55784a33..5e47397e46 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/TargetedSequencer.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/TargetedSequencer.cpp @@ -18,9 +18,9 @@ namespace ScriptCanvas TargetedSequencer::TargetedSequencer() : Node() , m_numOutputs(0) - { + { } - + void TargetedSequencer::OnInit() { m_numOutputs = static_cast(GetAllSlotsByDescriptor(SlotDescriptors::ExecutionOut()).size()); @@ -45,11 +45,11 @@ namespace ScriptCanvas RegisterExtension(visualExtensions); } } - + bool TargetedSequencer::CanDeleteSlot(const SlotId& slotId) const { - Slot* slot = GetSlot(slotId); - + Slot* slot = GetSlot(slotId); + // Only remove execution out slots when we have more then 1 output slot. if (slot && slot->IsExecution() && slot->IsOutput()) { @@ -62,42 +62,17 @@ namespace ScriptCanvas SlotId TargetedSequencer::HandleExtension([[maybe_unused]] AZ::Crc32 extensionId) { ExecutionSlotConfiguration executionConfiguration(GenerateOutputName(m_numOutputs), ConnectionType::Output); - + executionConfiguration.m_addUniqueSlotByNameAndType = false; executionConfiguration.m_displayGroup = GetDisplayGroup(); - + ++m_numOutputs; - + return AddSlot(executionConfiguration); } - void TargetedSequencer::OnInputSignal(const SlotId& slot) - { - if (slot != TargetedSequencerProperty::GetInSlotId(this)) - { - return; - } - - int targetIndex = TargetedSequencerProperty::GetIndex(this); - - if (targetIndex < 0 - || targetIndex >= m_numOutputs) - { - SCRIPTCANVAS_REPORT_ERROR((*this), "Switch node was given an out of bound index."); - return; - } - - AZStd::string slotName = GenerateOutputName(targetIndex); - SlotId outSlotId = GetSlotId(slotName.c_str()); - - if (outSlotId.IsValid()) - { - SignalOutput(outSlotId); - } - } - void TargetedSequencer::OnSlotRemoved([[maybe_unused]] const SlotId& slotId) - { + { FixupStateNames(); } @@ -106,12 +81,12 @@ namespace ScriptCanvas AZStd::string slotName = AZStd::string::format("Out %i", counter); return AZStd::move(slotName); } - + void TargetedSequencer::FixupStateNames() { auto outputSlots = GetAllSlotsByDescriptor(SlotDescriptors::ExecutionOut()); m_numOutputs = static_cast(outputSlots.size()); - + for (int i = 0; i < outputSlots.size(); ++i) { Slot* slot = GetSlot(outputSlots[i]->GetId()); @@ -121,7 +96,7 @@ namespace ScriptCanvas slot->Rename(GenerateOutputName(i)); } } - } + } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/TargetedSequencer.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/TargetedSequencer.h index 7f50fbeb11..f263d8d9e4 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/TargetedSequencer.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/TargetedSequencer.h @@ -31,10 +31,10 @@ namespace ScriptCanvas void OnInit() override; void OnConfigured() override; void ConfigureVisualExtensions() override; - + bool CanDeleteSlot(const SlotId& slotId) const; - SlotId HandleExtension(AZ::Crc32 extensionId); + SlotId HandleExtension(AZ::Crc32 extensionId); // Script Canvas Translation... bool IsSwitchStatement() const override { return true; } @@ -51,17 +51,16 @@ namespace ScriptCanvas ////////////////////////////////////////////////////////////////////////// protected: - + AZStd::string GetDisplayGroup() const { return "OutputGroup"; } - void OnInputSignal(const SlotId& slot) override; void OnSlotRemoved(const SlotId& slotId) override; private: AZStd::string GenerateOutputName(int counter); void FixupStateNames(); - + int m_numOutputs; }; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/WeightedRandomSequencer.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/WeightedRandomSequencer.cpp index 80646e66a1..1954821587 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/WeightedRandomSequencer.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/WeightedRandomSequencer.cpp @@ -30,7 +30,7 @@ namespace ScriptCanvas return AZ::Success(DependencyReport()); } - ConstSlotsOutcome WeightedRandomSequencer::GetSlotsInExecutionThreadByTypeImpl(const Slot& , CombinedSlotType targetSlotType, const Slot* /*executionChildSlot*/) const + ConstSlotsOutcome WeightedRandomSequencer::GetSlotsInExecutionThreadByTypeImpl(const Slot&, CombinedSlotType targetSlotType, const Slot* /*executionChildSlot*/) const { return AZ::Success(GetSlotsByType(targetSlotType)); } @@ -45,7 +45,7 @@ namespace ScriptCanvas ->Version(1) ->Field("WeightSlotId", &WeightedPairing::m_weightSlotId) ->Field("ExecutionSlotId", &WeightedPairing::m_executionSlotId) - ; + ; } } } @@ -57,7 +57,7 @@ namespace ScriptCanvas EndpointNotificationBus::MultiHandler::BusConnect({ GetEntityId(), weightedPairing.m_weightSlotId }); EndpointNotificationBus::MultiHandler::BusConnect({ GetEntityId(), weightedPairing.m_executionSlotId }); } - + // We always want at least one weighted transition state if (m_weightedPairings.empty()) { @@ -130,63 +130,6 @@ namespace ScriptCanvas return isValid; } - - void WeightedRandomSequencer::OnInputSignal(const SlotId& slotId) - { - const SlotId inSlotId = WeightedRandomSequencerProperty::GetInSlotId(this); - - if (slotId == inSlotId) - { - int runningTotal = 0; - - AZStd::vector< WeightedStruct > weightedStructs; - weightedStructs.reserve(m_weightedPairings.size()); - - for (const WeightedPairing& weightedPairing : m_weightedPairings) - { - const Datum* datum = FindDatum(weightedPairing.m_weightSlotId); - - if (datum) - { - WeightedStruct weightedStruct; - weightedStruct.m_executionSlotId = weightedPairing.m_executionSlotId; - - if (datum->GetType().IS_A(ScriptCanvas::Data::Type::Number())) - { - int weight = aznumeric_cast((*datum->GetAs())); - - runningTotal += weight; - weightedStruct.m_totalWeight = runningTotal; - } - - weightedStructs.emplace_back(weightedStruct); - } - } - - // We have no weights. So just trigger the first execution output - // Weighted pairings is controlled to never be empty. - if (runningTotal == 0) - { - if (!m_weightedPairings.empty()) - { - SignalOutput(m_weightedPairings.front().m_executionSlotId); - } - - return; - } - - int weightedResult = MathNodeUtilities::GetRandomIntegral(1, runningTotal); - - for (const WeightedStruct& weightedStruct : weightedStructs) - { - if (weightedResult <= weightedStruct.m_totalWeight) - { - SignalOutput(weightedStruct.m_executionSlotId); - break; - } - } - } - } SlotId WeightedRandomSequencer::HandleExtension(AZ::Crc32 extensionId) { @@ -219,9 +162,9 @@ namespace ScriptCanvas { for (auto pairIter = m_weightedPairings.begin(); pairIter != m_weightedPairings.end(); ++pairIter) { - + if (pairIter->m_executionSlotId == slotId - || pairIter->m_weightSlotId == slotId) + || pairIter->m_weightSlotId == slotId) { SlotId executionSlot = pairIter->m_executionSlotId; SlotId weightSlot = pairIter->m_weightSlotId; @@ -235,15 +178,15 @@ namespace ScriptCanvas else if (slotId == weightSlot) { RemoveSlot(executionSlot); - } - + } + break; } } - + FixupStateNames(); } - + bool WeightedRandomSequencer::AllWeightsFilled() const { bool isFilled = true; @@ -254,7 +197,7 @@ namespace ScriptCanvas isFilled = false; break; } - } + } return isFilled; } @@ -282,15 +225,15 @@ namespace ScriptCanvas return hasExcess; } - + WeightedRandomSequencer::WeightedPairing WeightedRandomSequencer::AddWeightedPair() { int counterWeight = static_cast(m_weightedPairings.size()) + 1; - - WeightedPairing weightedPairing; + + WeightedPairing weightedPairing; DataSlotConfiguration dataSlotConfiguration; - + dataSlotConfiguration.SetConnectionType(ConnectionType::Input); dataSlotConfiguration.m_name = GenerateDataName(counterWeight); dataSlotConfiguration.m_toolTip = "The weight associated with the execution state."; @@ -299,24 +242,24 @@ namespace ScriptCanvas dataSlotConfiguration.SetDefaultValue(1.0f); dataSlotConfiguration.m_displayGroup = GetDisplayGroup(); - + weightedPairing.m_weightSlotId = AddSlot(dataSlotConfiguration); - + ExecutionSlotConfiguration slotConfiguration; - + slotConfiguration.m_name = GenerateOutName(counterWeight); slotConfiguration.m_addUniqueSlotByNameAndType = false; slotConfiguration.SetConnectionType(ConnectionType::Output); slotConfiguration.m_displayGroup = GetDisplayGroup(); - - weightedPairing.m_executionSlotId = AddSlot(slotConfiguration); - + + weightedPairing.m_executionSlotId = AddSlot(slotConfiguration); + m_weightedPairings.push_back(weightedPairing); return weightedPairing; } - + void WeightedRandomSequencer::FixupStateNames() { int counter = 1; @@ -324,30 +267,30 @@ namespace ScriptCanvas { AZStd::string dataName = GenerateDataName(counter); AZStd::string executionName = GenerateOutName(counter); - + Slot* dataSlot = GetSlot(weightedPairing.m_weightSlotId); - + if (dataSlot) { dataSlot->Rename(dataName); } - + Slot* executionSlot = GetSlot(weightedPairing.m_executionSlotId); - + if (executionSlot) { executionSlot->Rename(executionName); } - + ++counter; } } - + AZStd::string WeightedRandomSequencer::GenerateDataName(int counter) { return AZStd::string::format("Weight %i", counter); } - + AZStd::string WeightedRandomSequencer::GenerateOutName(int counter) { return AZStd::string::format("Out %i", counter); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/WeightedRandomSequencer.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/WeightedRandomSequencer.h index f58f89690d..cffd7569c3 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/WeightedRandomSequencer.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/WeightedRandomSequencer.h @@ -22,16 +22,14 @@ namespace ScriptCanvas class WeightedRandomSequencer : public Node { - public: - SCRIPTCANVAS_NODE(WeightedRandomSequencer); static void ReflectDataTypes(AZ::ReflectContext* reflectContext); - + WeightedRandomSequencer() = default; ~WeightedRandomSequencer() = default; - + AZ::Outcome GetDependencies() const override; ConstSlotsOutcome GetSlotsInExecutionThreadByTypeImpl(const Slot& executionSlot, CombinedSlotType targetSlotType, const Slot* /*executionChildSlot*/) const override; @@ -41,24 +39,20 @@ namespace ScriptCanvas void ConfigureVisualExtensions() override; bool OnValidateNode(ValidationResults& validationResults); - - void OnInputSignal(const SlotId& slot); SlotId HandleExtension(AZ::Crc32 extensionId) override; - - bool CanDeleteSlot(const SlotId& slotId) const override; void OnSlotRemoved(const SlotId& slotId) override; //// - + protected: AZ::Crc32 GetWeightExtensionId() const { return AZ_CRC("WRS_Weight_Extension", 0xd17b9467); } AZ::Crc32 GetExecutionExtensionId() const { return AZ_CRC("WRS_Execution_Extension", 0x0706035e); } - AZStd::string GetDisplayGroup() const { return "WeightedExecutionGroup"; } - + AZStd::string GetDisplayGroup() const { return "WeightedExecutionGroup"; } + private: struct WeightedPairing @@ -74,22 +68,22 @@ namespace ScriptCanvas int m_totalWeight; SlotId m_executionSlotId; }; - + void RemoveWeightedPair(SlotId slotId); - + bool AllWeightsFilled() const; bool HasExcessEndpoints() const; - + WeightedPairing AddWeightedPair(); void FixupStateNames(); - + AZStd::string GenerateDataName(int counter); - AZStd::string GenerateOutName(int counter); + AZStd::string GenerateOutName(int counter); using WeightedPairingList = AZStd::vector; WeightedPairingList m_weightedPairings; }; } - } + } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/While.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/While.cpp index 25535d3102..ffc3af4832 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/While.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/While.cpp @@ -19,7 +19,7 @@ namespace ScriptCanvas { return AZ::Success(DependencyReport{}); } - + SlotId While::GetLoopFinishSlotId() const { return WhileProperty::GetOutSlotId(const_cast(this)); @@ -31,8 +31,8 @@ namespace ScriptCanvas } bool While::IsFormalLoop() const - { - return true; + { + return true; } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/While.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/While.h index 68a6b9fdfc..b4ce578bee 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/While.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/While.h @@ -29,19 +29,16 @@ namespace ScriptCanvas AZ::Outcome GetDependencies() const override; SlotId GetLoopFinishSlotId() const override; - + SlotId GetLoopSlotId() const override; - + bool IsFormalLoop() const override; - - protected: ConstSlotsOutcome GetSlotsInExecutionThreadByTypeImpl(const Slot& /*executionSlot*/, CombinedSlotType targetSlotType, const Slot* /*executionChildSlot*/) const override { return AZ::Success(GetSlotsByType(targetSlotType)); } - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/AABBNode.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/AABBNode.h deleted file mode 100644 index fb138194c5..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/AABBNode.h +++ /dev/null @@ -1,48 +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 ScriptCanvas -{ - namespace Nodes - { - namespace Math - { - class AABB - : public NativeDatumNode - { - public: - using ParentType = NativeDatumNode; - AZ_COMPONENT(AABB, "{AB0C2753-680E-47AD-8277-66B3AC01C659}", ParentType); - - static void Reflect(AZ::ReflectContext* reflection) - { - ParentType::Reflect(reflection); - - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) - { - serializeContext->Class() - ->Version(0) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("AABB", "An axis-aligned bounding box value") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/AABB.png") - ; - } - } - } - - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/CRCNode.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/CRCNode.h deleted file mode 100644 index b1824d0e70..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/CRCNode.h +++ /dev/null @@ -1,48 +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 ScriptCanvas -{ - namespace Nodes - { - namespace Math - { - class CRC - : public NativeDatumNode - { - public: - using ParentType = NativeDatumNode; - AZ_COMPONENT(CRC, "{AC47D631-38C3-4B03-A987-425189D1D165}", ParentType); - - static void Reflect(AZ::ReflectContext* reflection) - { - ParentType::Reflect(reflection); - - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) - { - serializeContext->Class() - ->Version(0) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("CRC", "A CRC value") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/CRC.png") - ; - } - } - } - - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/ColorNode.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/ColorNode.h deleted file mode 100644 index 84b9b38b69..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/ColorNode.h +++ /dev/null @@ -1,48 +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 ScriptCanvas -{ - namespace Nodes - { - namespace Math - { - class Color - : public NativeDatumNode - { - public: - using ParentType = NativeDatumNode; - AZ_COMPONENT(Color, "{26FBE6FF-C4B4-4D62-9474-3B2EE1B3E165}", ParentType); - - static void Reflect(AZ::ReflectContext* reflection) - { - ParentType::Reflect(reflection); - - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) - { - serializeContext->Class() - ->Version(0) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("Color", "A four channel color value") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/Color.png") - ; - } - } - } - - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Divide.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Divide.h index 7320fff037..fad147241a 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Divide.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Divide.h @@ -51,21 +51,6 @@ namespace ScriptCanvas nodeConfig.m_type = AZ::Uuid("DC17E19F-3829-410D-9A0B-AD60C6066DAA"); return nodeConfig; } - - protected: - Datum Evaluate(const Datum& lhs, const Datum& rhs) override - { - const Data::NumberType lhsValue = *lhs.GetAs(); - const Data::NumberType rhsValue = *rhs.GetAs(); - - if (AZ::IsClose(rhsValue, 0.0, 0.0001)) - { - SCRIPTCANVAS_REPORT_ERROR((*this), "Divide by zero"); - return Datum(); - } - - return Datum(lhsValue / rhsValue); - } }; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Math.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Math.cpp index 6fa228c3b9..fd3f325ee0 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Math.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Math.cpp @@ -13,6 +13,26 @@ namespace ScriptCanvas { + namespace Nodes + { + namespace Math + { + REFLECT_MATH_LIBRARY_TYPE(AABB, "{AB0C2753-680E-47AD-8277-66B3AC01C659}"); + REFLECT_MATH_LIBRARY_TYPE(Color, "{6CC7B2F9-F551-4CB8-A713-4149959AE337}"); + REFLECT_MATH_LIBRARY_TYPE(CRC, "{D8B65A5B-38FF-4B41-9FA4-FCA080D75625}"); + REFLECT_MATH_LIBRARY_TYPE(Matrix3x3, "{8C5F6959-C2C4-46D9-9FCD-4DC234E7732D}"); + REFLECT_MATH_LIBRARY_TYPE(Matrix4x4, "{537AB179-E23C-492D-8EF7-53845A2DB163}"); + REFLECT_MATH_LIBRARY_TYPE(OBB, "{8CBDA3B7-9DCD-4A04-A12C-123C322CA63A}"); + REFLECT_MATH_LIBRARY_TYPE(Plane, "{F2C799DF-2CC1-4DD8-91DC-18C2D517BAB0}"); + REFLECT_MATH_LIBRARY_TYPE(Quaternion, "{9BE75E2E-AA07-4767-9BF3-905C289EB38A}"); + REFLECT_MATH_LIBRARY_TYPE(Random, "{D9DF1385-6C5C-4E41-94CA-8B10E9D8FAAF}"); + REFLECT_MATH_LIBRARY_TYPE(Transform, "{59E0EF87-352C-4CFB-A810-5B8752BDD1EF}"); + REFLECT_MATH_LIBRARY_TYPE(Vector2, "{FD1BFADF-BA1F-4AFC-819B-ABA1F22AE6E6}"); + REFLECT_MATH_LIBRARY_TYPE(Vector3, "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}"); + REFLECT_MATH_LIBRARY_TYPE(Vector4, "{66027D7A-FCD1-4592-93E5-EB4B7F4BD671}"); + } + } + namespace Library { void Math::Reflect(AZ::ReflectContext* reflection) @@ -38,8 +58,8 @@ namespace ScriptCanvas { using namespace ScriptCanvas::Nodes::Math; SCRIPT_CANVAS_GENERICS_TO_VM(AABBNodes::Registrar, AABB, behaviorContext, AABBNodes::k_categoryName); - SCRIPT_CANVAS_GENERICS_TO_VM(CRCNodes::Registrar, CRC, behaviorContext, CRCNodes::k_categoryName); SCRIPT_CANVAS_GENERICS_TO_VM(ColorNodes::Registrar, Color, behaviorContext, ColorNodes::k_categoryName); + SCRIPT_CANVAS_GENERICS_TO_VM(CRCNodes::Registrar, CRC, behaviorContext, CRCNodes::k_categoryName); SCRIPT_CANVAS_GENERICS_TO_VM(MathNodes::Registrar, Math, behaviorContext, MathNodes::k_categoryName); SCRIPT_CANVAS_GENERICS_TO_VM(Matrix3x3Nodes::Registrar, Matrix3x3, behaviorContext, Matrix3x3Nodes::k_categoryName); SCRIPT_CANVAS_GENERICS_TO_VM(Matrix4x4Nodes::Registrar, Matrix4x4, behaviorContext, Matrix4x4Nodes::k_categoryName); @@ -59,25 +79,12 @@ namespace ScriptCanvas void Math::InitNodeRegistry(NodeRegistry& nodeRegistry) { using namespace ScriptCanvas::Nodes::Math; - AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); + AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); AABBNodes::Registrar::AddToRegistry(nodeRegistry); ColorNodes::Registrar::AddToRegistry(nodeRegistry); @@ -94,29 +101,15 @@ namespace ScriptCanvas Vector3Nodes::Registrar::AddToRegistry(nodeRegistry); Vector4Nodes::Registrar::AddToRegistry(nodeRegistry); } - + AZStd::vector Math::GetComponentDescriptors() { AZStd::vector descriptors = { - ScriptCanvas::Nodes::Math::AABB::CreateDescriptor(), - ScriptCanvas::Nodes::Math::CRC::CreateDescriptor(), - ScriptCanvas::Nodes::Math::Color::CreateDescriptor(), ScriptCanvas::Nodes::Math::Divide::CreateDescriptor(), - ScriptCanvas::Nodes::Math::Matrix3x3::CreateDescriptor(), - ScriptCanvas::Nodes::Math::Matrix4x4::CreateDescriptor(), ScriptCanvas::Nodes::Math::MathExpression::CreateDescriptor(), ScriptCanvas::Nodes::Math::Multiply::CreateDescriptor(), - ScriptCanvas::Nodes::Math::Number::CreateDescriptor(), - ScriptCanvas::Nodes::Math::OBB::CreateDescriptor(), - ScriptCanvas::Nodes::Math::Plane::CreateDescriptor(), - ScriptCanvas::Nodes::Math::Random::CreateDescriptor(), - ScriptCanvas::Nodes::Math::Quaternion::CreateDescriptor(), ScriptCanvas::Nodes::Math::Subtract::CreateDescriptor(), ScriptCanvas::Nodes::Math::Sum::CreateDescriptor(), - ScriptCanvas::Nodes::Math::Transform::CreateDescriptor(), - ScriptCanvas::Nodes::Math::Vector2::CreateDescriptor(), - ScriptCanvas::Nodes::Math::Vector3::CreateDescriptor(), - ScriptCanvas::Nodes::Math::Vector4::CreateDescriptor(), }; AABBNodes::Registrar::AddDescriptors(descriptors); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Math.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Math.h index e9b39c582f..cc4795498a 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Math.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Math.h @@ -10,34 +10,22 @@ // This header is only meant to include the nodes and should not contain // shared code -#include "AABBNode.h" #include "AABBNodes.h" -#include "ColorNode.h" #include "ColorNodes.h" -#include "CRCNode.h" #include "CRCNodes.h" #include "Divide.h" #include "MathGenerics.h" #include "MathRandom.h" -#include "Matrix3x3Node.h" #include "Matrix3x3Nodes.h" -#include "Matrix4x4Node.h" #include "Matrix4x4Nodes.h" #include "MathExpression.h" #include "Multiply.h" -#include "Number.h" -#include "OBBNode.h" #include "OBBNodes.h" -#include "PlaneNode.h" #include "PlaneNodes.h" -#include "Random.h" -#include "Rotation.h" #include "RotationNodes.h" #include "Subtract.h" #include "Sum.h" -#include "Transform.h" #include "TransformNodes.h" -#include "Vector.h" #include "Vector2Nodes.h" #include "Vector3Nodes.h" #include "Vector4Nodes.h" diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathExpression.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathExpression.cpp index 83cf0621fb..86fe9681e1 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathExpression.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathExpression.cpp @@ -12,17 +12,6 @@ namespace ScriptCanvas { namespace Math { - void MathExpression::OnResult(const ExpressionEvaluation::ExpressionResult& result) - { - if (result.is()) - { - Datum output; - output.Set(AZStd::any_cast(result)); - PushOutput(output, (*MathExpressionProperty::GetResultSlot(this))); - SignalOutput(MathExpressionProperty::GetOutSlotId(this)); - } - } - ExpressionEvaluation::ParseOutcome MathExpression::ParseExpression(const AZStd::string& formatString) { const AZStd::unordered_set mathInterfaceSet = { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathExpression.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathExpression.h index 76d952b92c..eb091cc095 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathExpression.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathExpression.h @@ -37,7 +37,6 @@ namespace ScriptCanvas return AZ::Success(GetSlotsByType(targetSlotType)); } - void OnResult(const ExpressionEvaluation::ExpressionResult& result) override; ExpressionEvaluation::ParseOutcome ParseExpression(const AZStd::string& formatString) override; AZStd::string GetExpressionSeparator() const override; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathGenerics.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathGenerics.h index 1cd73b770c..baa287488d 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathGenerics.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathGenerics.h @@ -42,5 +42,5 @@ namespace ScriptCanvas StringToNumberNode >; } -} +} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathNodeUtilities.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathNodeUtilities.cpp index 5d652c2919..6deb1420e2 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathNodeUtilities.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathNodeUtilities.cpp @@ -58,7 +58,7 @@ namespace ScriptCanvas AZ_Assert(randomEngineVar.IsConstructed(), "random engine is not initialized"); return dis(randomEngineVar->m_randomEngine); } - + AZ::s64 GetRandom(AZ::s64 lhs, AZ::s64 rhs) { if (lhs == rhs) @@ -74,5 +74,5 @@ namespace ScriptCanvas } } -} +} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathNodeUtilities.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathNodeUtilities.h index 1d5c18ecdf..4a6e7713e8 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathNodeUtilities.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathNodeUtilities.h @@ -24,11 +24,11 @@ namespace ScriptCanvas template AZ_INLINE void DefaultToleranceEpsilon(Node& node) { SetDefaultValuesByIndex::_(node, Data::ToleranceEpsilon()); } - + Data::NumberType GetRandom(Data::NumberType lhs, Data::NumberType rhs); - AZ::s64 GetRandom(AZ::s64 lhs, AZ::s64 rhs); - + AZ::s64 GetRandom(AZ::s64 lhs, AZ::s64 rhs); + template AZ_INLINE NumberType GetRandomIntegral(NumberType lhs, NumberType rhs) { @@ -56,5 +56,5 @@ namespace ScriptCanvas void RandomEngineInit(); void RandomEngineReset(); } -} +} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathRandom.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathRandom.h index 1e304dc898..74d1abb269 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathRandom.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathRandom.h @@ -26,9 +26,9 @@ namespace ScriptCanvas AZ_INLINE Data::ColorType RandomColor(Data::ColorType minValue, Data::ColorType maxValue) { return Data::ColorType(MathNodeUtilities::GetRandomReal(minValue.GetR(), maxValue.GetR()), - MathNodeUtilities::GetRandomReal(minValue.GetG(), maxValue.GetG()), - MathNodeUtilities::GetRandomReal(minValue.GetB(), maxValue.GetB()), - MathNodeUtilities::GetRandomReal(minValue.GetA(), maxValue.GetA())); + MathNodeUtilities::GetRandomReal(minValue.GetG(), maxValue.GetG()), + MathNodeUtilities::GetRandomReal(minValue.GetB(), maxValue.GetB()), + MathNodeUtilities::GetRandomReal(minValue.GetA(), maxValue.GetA())); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE_WITH_DEFAULTS(RandomColor, SetRandomColorDefaults, k_categoryName, "{0A984F40-322B-44A6-8753-6D2056A96659}", "Returns a random color [Min, Max]", "Min", "Max"); @@ -81,8 +81,8 @@ namespace ScriptCanvas { Data::Vector3Type halfDimensions = 0.5f * dimensions; Data::Vector3Type point(MathNodeUtilities::GetRandomReal(-halfDimensions.GetX(), halfDimensions.GetX()), - MathNodeUtilities::GetRandomReal(-halfDimensions.GetY(), halfDimensions.GetY()), - MathNodeUtilities::GetRandomReal(-halfDimensions.GetZ(), halfDimensions.GetZ())); + MathNodeUtilities::GetRandomReal(-halfDimensions.GetY(), halfDimensions.GetY()), + MathNodeUtilities::GetRandomReal(-halfDimensions.GetZ(), halfDimensions.GetZ())); return point; } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE_WITH_DEFAULTS(RandomPointInBox, SetRandomPointInBoxDefaults, k_categoryName, "{6785C5F8-2F87-4AD6-AE15-87FE5E72D142}", "returns a random point in a box", "Dimensions"); @@ -99,8 +99,8 @@ namespace ScriptCanvas float theta = MathNodeUtilities::GetRandomReal(0.f, AZ::Constants::TwoPi - std::numeric_limits::epsilon()); Data::Vector3Type point(fRadius * cosf(theta), - fRadius * sinf(theta), - 0.f); + fRadius * sinf(theta), + 0.f); return point; } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE_WITH_DEFAULTS(RandomPointOnCircle, SetRandomPointOnCircleDefaults, k_categoryName, "{2F079E35-216D-42B3-AA81-C9823F732893}", "returns a random point on the circumference of a circle", "Radius"); @@ -150,8 +150,8 @@ namespace ScriptCanvas float theta = MathNodeUtilities::GetRandomReal(0.f, AZ::Constants::TwoPi - std::numeric_limits::epsilon()); Data::Vector3Type point(r * cosf(theta), - r * sinf(theta), - MathNodeUtilities::GetRandomReal(fNegHalfHeight, fHalfHeight)); + r * sinf(theta), + MathNodeUtilities::GetRandomReal(fNegHalfHeight, fHalfHeight)); return point; } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE_WITH_DEFAULTS(RandomPointInCylinder, SetRandomPointInCylinderDefaults, k_categoryName, "{BD81133C-AAC0-44B0-9C9A-D06E780F4CCE}", "returns a random point in a cylinder", "Radius", "Height"); @@ -168,8 +168,8 @@ namespace ScriptCanvas float theta = MathNodeUtilities::GetRandomReal(0.f, AZ::Constants::TwoPi - std::numeric_limits::epsilon()); Data::Vector3Type point(r * cosf(theta), - r * sinf(theta), - 0.f); + r * sinf(theta), + 0.f); return point; } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE_WITH_DEFAULTS(RandomPointInCircle, SetRandomPointInCircleDefaults, k_categoryName, "{93378981-85DD-42B9-9D2D-826BE68BBE8F}", "returns a random point inside the area of a circle", "Radius"); @@ -234,8 +234,8 @@ namespace ScriptCanvas { Data::Vector2Type halfDimensions = 0.5f * dimensions; Data::Vector3Type point(MathNodeUtilities::GetRandomReal(-halfDimensions.GetX(), halfDimensions.GetX()), - MathNodeUtilities::GetRandomReal(-halfDimensions.GetY(), halfDimensions.GetY()), - 0.f); + MathNodeUtilities::GetRandomReal(-halfDimensions.GetY(), halfDimensions.GetY()), + 0.f); return point; } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE_WITH_DEFAULTS(RandomPointInSquare, SetRandomPointInSquareDefaults, k_categoryName, "{B81B4049-CBD2-460E-A4AB-155AB8FFDCB9}", "returns a random point in a square", "Dimensions"); @@ -295,7 +295,7 @@ namespace ScriptCanvas { float theta = MathNodeUtilities::GetRandomReal(0.f, AZ::Constants::TwoPi - std::numeric_limits::epsilon()); return Data::Vector2Type(cosf(theta), - sinf(theta)); + sinf(theta)); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(RandomUnitVector2, k_categoryName, "{02CE950A-06F8-485D-87E9-77FDE808B160}", "returns a random Vector2 direction"); @@ -324,7 +324,7 @@ namespace ScriptCanvas AZ_INLINE Data::Vector2Type RandomVector2(Data::Vector2Type minValue, Data::Vector2Type maxValue) { return Data::Vector2Type(MathNodeUtilities::GetRandomReal(minValue.GetX(), maxValue.GetX()), - MathNodeUtilities::GetRandomReal(minValue.GetY(), maxValue.GetY())); + MathNodeUtilities::GetRandomReal(minValue.GetY(), maxValue.GetY())); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE_WITH_DEFAULTS(RandomVector2, SetRandomVector2Defaults, k_categoryName, "{6F9982F5-D6F6-4568-8A83-D5A35390D425}", "returns a random Vector2", "Min", "Max"); @@ -337,8 +337,8 @@ namespace ScriptCanvas AZ_INLINE Data::Vector3Type RandomVector3(Data::Vector3Type minValue, Data::Vector3Type maxValue) { return Data::Vector3Type(MathNodeUtilities::GetRandomReal(minValue.GetX(), maxValue.GetX()), - MathNodeUtilities::GetRandomReal(minValue.GetY(), maxValue.GetY()), - MathNodeUtilities::GetRandomReal(minValue.GetZ(), maxValue.GetZ())); + MathNodeUtilities::GetRandomReal(minValue.GetY(), maxValue.GetY()), + MathNodeUtilities::GetRandomReal(minValue.GetZ(), maxValue.GetZ())); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE_WITH_DEFAULTS(RandomVector3, SetRandomVector3Defaults, k_categoryName, "{FF5526DC-E56D-4101-B7DE-4E7283E31B10}", "returns a random Vector3", "Min", "Max"); @@ -351,15 +351,15 @@ namespace ScriptCanvas AZ_INLINE Data::Vector4Type RandomVector4(Data::Vector4Type minValue, Data::Vector4Type maxValue) { return Data::Vector4Type(MathNodeUtilities::GetRandomReal(minValue.GetX(), maxValue.GetX()), - MathNodeUtilities::GetRandomReal(minValue.GetY(), maxValue.GetY()), - MathNodeUtilities::GetRandomReal(minValue.GetZ(), maxValue.GetZ()), - MathNodeUtilities::GetRandomReal(minValue.GetW(), maxValue.GetW())); + MathNodeUtilities::GetRandomReal(minValue.GetY(), maxValue.GetY()), + MathNodeUtilities::GetRandomReal(minValue.GetZ(), maxValue.GetZ()), + MathNodeUtilities::GetRandomReal(minValue.GetW(), maxValue.GetW())); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE_WITH_DEFAULTS(RandomVector4, SetRandomVector4Defaults, k_categoryName, "{76FCA9CF-7BBF-471C-9D4A-67FE8E9C6298}", "returns a random Vector4", "Min", "Max"); AZ_INLINE void SetRandomPointInArcDefaults(Node& node) { - SetDefaultValuesByIndex<0>::_(node, Data::Vector3Type(0.f,0.f,0.f)); + SetDefaultValuesByIndex<0>::_(node, Data::Vector3Type(0.f, 0.f, 0.f)); SetDefaultValuesByIndex<1>::_(node, Data::Vector3Type(1.f, 0.f, 0.f)); SetDefaultValuesByIndex<2>::_(node, Data::Vector3Type(0.f, 0.f, 1.f)); SetDefaultValuesByIndex<3>::_(node, Data::NumberType(1.0)); @@ -405,7 +405,7 @@ namespace ScriptCanvas SCRIPT_CANVAS_GENERIC_FUNCTION_NODE_WITH_DEFAULTS(RandomPointInWedge, SetRandomPointInWedgeDefaults, k_categoryName, "{F224DA37-240D-4ABB-A97A-3565197B94B4}", "returns a random point in the specified wedge", "Origin", "Direction", "Normal", "Radius", "Height", "Angle"); - using Registrar = RegistrarGeneric< + using Registrar = RegistrarGeneric < RandomColorNode , RandomGrayscaleNode , RandomIntegerNode @@ -427,6 +427,6 @@ namespace ScriptCanvas , RandomVector4Node , RandomPointInArcNode , RandomPointInWedgeNode - >; + > ; } -} +} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Matrix3x3Node.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Matrix3x3Node.h deleted file mode 100644 index 4417413567..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Matrix3x3Node.h +++ /dev/null @@ -1,49 +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 ScriptCanvas -{ - namespace Nodes - { - namespace Math - { - class Matrix3x3 - : public NativeDatumNode - { - public: - using ParentType = NativeDatumNode; - AZ_COMPONENT(Matrix3x3, "{9FDA1949-A74F-4D27-BBD0-8E6F165291FE}", ParentType); - - static void Reflect(AZ::ReflectContext* reflection) - { - ParentType::Reflect(reflection); - - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) - { - serializeContext->Class() - ->Version(0) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("Matrix3x3", "A 3x3 matrix value") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/Matrix3x3.png") - ; - } - } - } - - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Matrix4x4Node.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Matrix4x4Node.h deleted file mode 100644 index da7d5983f4..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Matrix4x4Node.h +++ /dev/null @@ -1,48 +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 ScriptCanvas -{ - namespace Nodes - { - namespace Math - { - class Matrix4x4 - : public NativeDatumNode - { - public: - using ParentType = NativeDatumNode; - AZ_COMPONENT(Matrix4x4, "{CF059648-8BE5-4CC6-B909-4D3EBD945071}", ParentType); - - static void Reflect(AZ::ReflectContext* reflection) - { - ParentType::Reflect(reflection); - - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) - { - serializeContext->Class() - ->Version(0) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("Matrix4x4", "A 4x4 matrix value") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/Matrix4x4.png") - ; - } - } - } - - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Multiply.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Multiply.h index c0761502c0..76ccf3cd96 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Multiply.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Multiply.h @@ -50,12 +50,6 @@ namespace ScriptCanvas nodeConfig.m_type = AZ::Uuid("E9BB45A1-AE96-47B0-B2BF-2927D420A28C"); return nodeConfig; } - - protected: - Datum Evaluate(const Datum& lhs, const Datum& rhs) override - { - return Datum(*lhs.GetAs() * *rhs.GetAs()); - } }; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Number.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Number.h deleted file mode 100644 index 9639f1fce7..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Number.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Math - { - class Number - : public NativeDatumNode - { - public: - using ParentType = NativeDatumNode; - AZ_COMPONENT(Number, "{E1E746E9-2761-431E-9D06-717381F9822D}", ParentType); - - static void Reflect(AZ::ReflectContext* reflection) - { - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) - { - serializeContext->Class() - ->Version(3) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("Number", "A numeric value") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/Number.png") - ; - } - } - } - - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/OBBNode.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/OBBNode.h deleted file mode 100644 index 24718c82f4..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/OBBNode.h +++ /dev/null @@ -1,48 +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 ScriptCanvas -{ - namespace Nodes - { - namespace Math - { - class OBB - : public NativeDatumNode - { - public: - using ParentType = NativeDatumNode; - AZ_COMPONENT(OBB, "{C63E8C27-412B-4CEE-959B-3D97E1D17370}", ParentType); - - static void Reflect(AZ::ReflectContext* reflection) - { - ParentType::Reflect(reflection); - - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) - { - serializeContext->Class() - ->Version(0) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("OBB", "An oriented bounding box value") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/OBB.png") - ; - } - } - } - - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/PlaneNode.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/PlaneNode.h deleted file mode 100644 index c429eb1dc3..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/PlaneNode.h +++ /dev/null @@ -1,48 +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 ScriptCanvas -{ - namespace Nodes - { - namespace Math - { - class Plane - : public NativeDatumNode - { - public: - using ParentType = NativeDatumNode; - AZ_COMPONENT(Plane, "{A756E230-B4DC-42E7-A160-20A803CC8FA1}", ParentType); - - static void Reflect(AZ::ReflectContext* reflection) - { - ParentType::Reflect(reflection); - - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) - { - serializeContext->Class() - ->Version(0) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("Plane", "A plane value according to the equation: Ax + By + Cz + D = 0") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/Plane.png") - ; - } - } - } - - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Random.ScriptCanvasGrammar.xml b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Random.ScriptCanvasGrammar.xml deleted file mode 100644 index d2f3aede03..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Random.ScriptCanvasGrammar.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Random.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Random.cpp deleted file mode 100644 index dba370fa7c..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Random.cpp +++ /dev/null @@ -1,42 +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 "Random.h" -#include - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Math - { - - void Random::OnInputSignal(const SlotId& slotId) - { - if (slotId == RandomProperty::GetInSlotId(this)) - { - const SlotId resultSlotId = RandomProperty::GetResultSlotId(this); - - if (Slot* resultSlot = GetSlot(resultSlotId)) - { - float minValue = RandomProperty::GetMin(this); - float maxValue = RandomProperty::GetMax(this); - - auto randVal = MathNodeUtilities::GetRandom(minValue, maxValue); - - Datum o(Data::Type::Number(), Datum::eOriginality::Copy); - o.Set(randVal); - PushOutput(o, *resultSlot); - } - } - - SignalOutput(RandomProperty::GetOutSlotId(this)); - } - - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Random.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Random.h deleted file mode 100644 index a5cc7d1aa9..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Random.h +++ /dev/null @@ -1,36 +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 ScriptCanvas -{ - namespace Nodes - { - namespace Math - { - //! Provides a random value within the specified range, uses std::uniform_real_distribution and std::mt19937 - class Random - : public Node - { - public: - - SCRIPTCANVAS_NODE(Random); - - void OnInputSignal(const SlotId& slotId); - - }; - } - } -} - diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Rotation.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Rotation.h deleted file mode 100644 index 9e23a206a1..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Rotation.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Math - { - class Quaternion - : public NativeDatumNode - { - public: - using ParentType = NativeDatumNode; - AZ_COMPONENT(Quaternion, "{E17FE11D-69F2-4746-B582-778B48D0BF47}", ParentType); - - static void Reflect(AZ::ReflectContext* reflection) - { - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) - { - serializeContext->Class() - ->Version(0) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("Quaternion", "imaginary(X, Y, Z), real W") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/Quaternion.png") - ; - } - } - } - - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/RotationNodes.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/RotationNodes.h index 0f20bcf8c9..9cf3320767 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/RotationNodes.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/RotationNodes.h @@ -20,7 +20,7 @@ namespace ScriptCanvas using namespace Data; using namespace MathNodeUtilities; static const char* k_categoryName = "Math/Quaternion"; - + AZ_INLINE QuaternionType Add(QuaternionType a, QuaternionType b) { return a + b; @@ -106,7 +106,7 @@ namespace ScriptCanvas return QuaternionType::CreateFromVector3AndValue(imaginary, aznumeric_cast(real)); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(FromVector3AndValue, k_categoryName, "{955FE6EB-7C38-4587-BBB7-9C886ACEAF94}", "returns a rotation with the imaginary elements from Imaginary and the real element from Real", "Imaginary", "Real"); - + AZ_INLINE NumberType GetElement(QuaternionType source, NumberType index) { return source.GetElement(AZ::GetClamp(aznumeric_cast(index), 0, 3)); @@ -172,7 +172,7 @@ namespace ScriptCanvas return a.Lerp(b, aznumeric_cast(t)); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(Lerp, k_categoryName, "{91CF1C54-89C6-4A00-A53D-20C58454C4EC}", "returns a the linear interpolation between From and To by the amount T", "From", "To", "T"); - + AZ_INLINE QuaternionType ModX(QuaternionType source, NumberType value) { source.SetX(aznumeric_cast(value)); @@ -228,7 +228,7 @@ namespace ScriptCanvas AZ_INLINE std::tuple NormalizeWithLength(QuaternionType source) { const float length = source.NormalizeWithLength(); - return std::make_tuple( source, length ); + return std::make_tuple(source, length); } SCRIPT_CANVAS_GENERIC_FUNCTION_MULTI_RESULTS_NODE(NormalizeWithLength, k_categoryName, "{E1A7F3F8-854E-4BA1-9DEA-7507BEC6D369}", "returns the normalized version of Source, and the length of Source", "Source", "Normalized", "Length"); @@ -249,7 +249,7 @@ namespace ScriptCanvas return QuaternionType::CreateRotationZ(AZ::DegToRad(aznumeric_caster(degrees))); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(RotationZDegrees, k_categoryName, "{8BC8B0FE-51A1-4ECC-AFF1-A828A0FC8F8F}", "creates a rotation of Degrees around the z-axis", "Degrees"); - + AZ_INLINE QuaternionType ShortestArc(Vector3Type from, Vector3Type to) { return QuaternionType::CreateShortestArc(from, to); @@ -279,7 +279,7 @@ namespace ScriptCanvas return aznumeric_caster(AZ::RadToDeg(source.GetAngle())); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(ToAngleDegrees, k_categoryName, "{3EA78793-9AFA-4857-8CB8-CD0D47E97D25}", "returns the angle of angle-axis pair that Source represents in degrees", "Source"); - + AZ_INLINE Vector3Type ToImaginary(QuaternionType source) { return source.GetImaginary(); @@ -301,7 +301,7 @@ namespace ScriptCanvas SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(RotateVector3, k_categoryName, "{DDF7C05C-7148-4860-93A3-D507C5896B6C}", "Returns a new Vector3 that is the source vector3 rotated by the given Quaternion", "Quaternion", "Vector"); - using Registrar = RegistrarGeneric< + using Registrar = RegistrarGeneric < AddNode , ConjugateNode , ConvertTransformToRotationNode @@ -369,5 +369,5 @@ namespace ScriptCanvas > ; } -} +} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Subtract.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Subtract.h index ecffc724cc..65563bec0b 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Subtract.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Subtract.h @@ -50,12 +50,6 @@ namespace ScriptCanvas nodeConfig.m_type = AZ::Uuid("D0615D0A-027F-47F6-A02B-E35DAF22F431"); return nodeConfig; } - - protected: - Datum Evaluate(const Datum& lhs, const Datum& rhs) override - { - return Datum(*lhs.GetAs() - *rhs.GetAs()); - } }; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Sum.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Sum.h index ed53b66878..b7cf6757e2 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Sum.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Sum.h @@ -24,7 +24,7 @@ namespace ScriptCanvas AZ_COMPONENT(Sum, "{6C52B2D1-3526-4855-A217-5106D54F6B90}", ArithmeticExpression); static void Reflect(AZ::ReflectContext* reflection) - { + { if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) { serializeContext->Class() @@ -52,12 +52,6 @@ namespace ScriptCanvas nodeConfig.m_type = AZ::Uuid("C1B42FEC-0545-4511-9FAC-11E0387FEDF0"); return nodeConfig; } - - protected: - Datum Evaluate(const Datum& lhs, const Datum& rhs) override - { - return Datum(*lhs.GetAs() + *rhs.GetAs()); - } }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Transform.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Transform.h deleted file mode 100644 index e4260966a9..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Transform.h +++ /dev/null @@ -1,45 +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 ScriptCanvas -{ - namespace Nodes - { - namespace Math - { - class Transform - : public NativeDatumNode - { - public: - using ParentType = NativeDatumNode; - AZ_COMPONENT(Transform, "{B74F127B-72E0-486B-86FF-2233767C2804}", ParentType); - - static void Reflect(AZ::ReflectContext* reflection) - { - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) - { - serializeContext->Class() - ->Version(0) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("Transform", "A 3D transform value") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/Transform.png") - ; - } - } - } - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/TransformNodes.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/TransformNodes.h index 0f0fdddcac..441be22702 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/TransformNodes.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/TransformNodes.h @@ -24,7 +24,7 @@ namespace ScriptCanvas AZ_INLINE std::tuple ExtractUniformScale(TransformType source) { auto scale(source.ExtractUniformScale()); - return std::make_tuple( scale, source ); + return std::make_tuple(scale, source); } SCRIPT_CANVAS_GENERIC_FUNCTION_MULTI_RESULTS_NODE(ExtractUniformScale, k_categoryName, "{8DFE5247-0950-4CD1-87E6-0CAAD42F1637}", "returns the uniform scale as a float, and a transform with the scale extracted ", "Source", "Uniform Scale", "Extracted"); @@ -114,7 +114,7 @@ namespace ScriptCanvas return source.IsFinite(); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(IsFinite, k_categoryName, "{B7D23934-0101-40B9-80E8-3D88C8580B25}", "returns true if every row of source is finite, else false", "Source"); - + AZ_INLINE BooleanType IsOrthogonal(const TransformType& source, NumberType tolerance) { return source.IsOrthogonal(aznumeric_cast(tolerance)); @@ -139,7 +139,7 @@ namespace ScriptCanvas return source.TransformVector(multiplier); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(Multiply3x3ByVector3, k_categoryName, "{4F2ABFC6-2E93-4A9D-8639-C7967DB318DB}", "returns Source's 3x3 upper matrix post multiplied by Multiplier", "Source", "Multiplier"); - + AZ_INLINE TransformType MultiplyByUniformScale(TransformType source, NumberType scale) { source.MultiplyByUniformScale(scale); @@ -170,7 +170,7 @@ namespace ScriptCanvas return source.GetOrthogonalized(); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(Orthogonalize, k_categoryName, "{2B4140CD-6E22-44D3-BDB5-309E69FE7CC2}", "returns an orthogonal matrix if the Source is almost orthogonal", "Source"); - + AZ_INLINE TransformType RotationXDegrees(NumberType degrees) { return TransformType::CreateRotationX(AZ::DegToRad(aznumeric_caster(degrees))); @@ -194,13 +194,13 @@ namespace ScriptCanvas return source.GetUniformScale(); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(ToScale, k_categoryName, "{063C58AD-F567-464D-A432-F298FE3953A6}", "returns the uniform scale of the Source", "Source"); - + using Registrar = RegistrarGeneric - < + < #if ENABLE_EXTENDED_MATH_SUPPORT - ExtractUniformScaleNode , + ExtractUniformScaleNode, #endif - FromMatrix3x3AndTranslationNode + FromMatrix3x3AndTranslationNode , FromMatrix3x3Node , FromRotationAndTranslationNode , FromRotationNode @@ -245,8 +245,8 @@ namespace ScriptCanvas , TransposedMultiply3x3Node , ZeroNode #endif - >; + > ; } -} +} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector.h deleted file mode 100644 index af5054c45e..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector.h +++ /dev/null @@ -1,106 +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 ScriptCanvas -{ - namespace Nodes - { - namespace Math - { - class Vector2 - : public NativeDatumNode - { - public: - using ParentType = NativeDatumNode; - AZ_COMPONENT(Vector2, "{EB647398-7F56-4727-9C7C-277593DB1F11}", ParentType); - - static void Reflect(AZ::ReflectContext* reflection) - { - ParentType::Reflect(reflection); - - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) - { - serializeContext->Class() - ->Version(0) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("Vector2", "A 2D vector value") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/Vector.png") - ; - } - } - } - - }; - - class Vector3 - : public NativeDatumNode - { - public: - using ParentType = NativeDatumNode; - AZ_COMPONENT(Vector3, "{95A12BDE-D4B4-47E8-A917-3E42F678E7FA}", ParentType); - - static void Reflect(AZ::ReflectContext* reflection) - { - ParentType::Reflect(reflection); - - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) - { - serializeContext->Class() - ->Version(0) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("Vector3", "A 3D vector value") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/Vector.png") - ; - } - } - } - - }; - - class Vector4 - : public NativeDatumNode - { - public: - using ParentType = NativeDatumNode; - AZ_COMPONENT(Vector4, "{9CAE50A1-C575-4DFC-95C5-FA0A12DABCBD}", ParentType); - - static void Reflect(AZ::ReflectContext* reflection) - { - ParentType::Reflect(reflection); - - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) - { - serializeContext->Class() - ->Version(0) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("Vector4", "A 4D vector value") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/Vector.png") - ; - } - } - } - - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector2Nodes.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector2Nodes.h index a807243f92..68fc2e729e 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector2Nodes.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector2Nodes.h @@ -165,7 +165,7 @@ namespace ScriptCanvas return a.GetMin(b); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(Min, k_categoryName, "{815685B8-B877-4D54-9E11-D0161185B4B9}", "returns the vector (min(A.x, B.x), min(A.y, B.y))", "A", "B"); - + AZ_INLINE Vector2Type SetX(Vector2Type source, NumberType value) { source.SetX(aznumeric_caster(value)); @@ -242,7 +242,7 @@ namespace ScriptCanvas } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(ToPerpendicular, k_categoryName, "{CC4DC102-8B50-4828-BA94-0586F34E0D37}", "returns the vector (-Source.y, Source.x), a 90 degree, positive rotation", "Source"); - using Registrar = RegistrarGeneric< + using Registrar = RegistrarGeneric < AbsoluteNode , AddNode , AngleNode @@ -294,8 +294,8 @@ namespace ScriptCanvas , SlerpNode , SubtractNode , ToPerpendicularNode - >; + > ; } -} +} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector3Nodes.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector3Nodes.h index a74ae45e67..3c6f4a65e7 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector3Nodes.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector3Nodes.h @@ -33,14 +33,14 @@ namespace ScriptCanvas return lhs + rhs; } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE_DEPRECATED(Add, k_categoryName, "{0F554E23-9AB6-4D17-A517-C885ECD024F0}", "This node is deprecated, use Add (+), it provides contextual type and slots", "A", "B"); - + AZ_INLINE Vector3Type AngleMod(const Vector3Type source) { return source.GetAngleMod(); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(AngleMod, k_categoryName, "{BF5C12A8-F42D-43E7-9CE3-D16D30B182D2}", "wraps the angle in each element into the range [-pi, pi]", "Source") - AZ_INLINE std::tuple BuildTangentBasis(Vector3Type source) + AZ_INLINE std::tuple BuildTangentBasis(Vector3Type source) { std::tuple tangentBitangent; source.NormalizeSafe(); @@ -48,13 +48,13 @@ namespace ScriptCanvas return tangentBitangent; } SCRIPT_CANVAS_GENERIC_FUNCTION_MULTI_RESULTS_NODE(BuildTangentBasis, k_categoryName, "{3EBA365F-063A-45A0-BDD1-ED0F995AD310}", "returns a tangent basis from the normal", "Normal", "Tangent", "Bitangent"); - + AZ_INLINE Vector3Type Clamp(const Vector3Type source, const Vector3Type min, const Vector3Type max) { return source.GetClamp(min, max); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(Clamp, k_categoryName, "{28305F88-0940-43C8-B0A8-B8CEB3B0B82A}", "returns vector clamped to [min, max] and equal to source if possible", "Source", "Min", "Max"); - + AZ_INLINE Vector3Type Cosine(const Vector3Type source) { return source.GetCos(); @@ -66,7 +66,7 @@ namespace ScriptCanvas return lhs.Cross(rhs); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(Cross, k_categoryName, "{6FAF4ACA-A100-4B71-ACF8-F1DB4674F51C}", "returns the vector cross product of A X B", "A", "B"); - + AZ_INLINE Vector3Type CrossXAxis(const Vector3Type source) { return source.CrossXAxis(); @@ -120,7 +120,7 @@ namespace ScriptCanvas return lhs.Dot(rhs); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(Dot, k_categoryName, "{5DFA6260-C044-4798-A55C-3CF5F3DB45CE}", "returns the vector dot product of A dot B", "A", "B"); - + AZ_INLINE Vector3Type FromElement(Vector3Type source, const NumberType index, const NumberType value) { source.SetElement(AZ::GetClamp(aznumeric_cast(index), 0, 2), aznumeric_cast(value)); @@ -200,7 +200,7 @@ namespace ScriptCanvas return from.Lerp(to, aznumeric_cast(t)); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(Lerp, k_categoryName, "{AA063267-DA0F-4407-9356-30B4E89A9FA4}", "returns the linear interpolation (From + ((To - From) * T)", "From", "To", "T"); - + AZ_INLINE Vector3Type Max(const Vector3Type a, const Vector3Type b) { return a.GetMax(b); @@ -297,7 +297,7 @@ namespace ScriptCanvas return std::make_tuple(sin, cos); } SCRIPT_CANVAS_GENERIC_FUNCTION_MULTI_RESULTS_NODE(SineCosine, k_categoryName, "{04EE253D-680D-4F95-A451-837EAE104E88}", "returns a vector from the sine of each element from the source, and from the cosine of each element from the source", "Source", "Sine", "Cosine"); - + AZ_INLINE Vector3Type Slerp(const Vector3Type from, const Vector3Type to, const NumberType t) { return from.Slerp(to, aznumeric_cast(t)); @@ -328,7 +328,7 @@ namespace ScriptCanvas } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(ZAxisCross, k_categoryName, "{29206E84-392C-412E-9DD5-781B2759260D}", "returns the vector cross product of Z-Axis X Source", "Source"); - using Registrar = RegistrarGeneric< + using Registrar = RegistrarGeneric < AbsoluteNode , AddNode @@ -409,8 +409,8 @@ namespace ScriptCanvas , ZAxisCrossNode #endif - >; + > ; } -} +} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector4Nodes.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector4Nodes.h index c8ce20fe14..284582be57 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector4Nodes.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector4Nodes.h @@ -74,13 +74,13 @@ namespace ScriptCanvas return Vector4Type(aznumeric_cast(x), aznumeric_cast(y), aznumeric_cast(z), aznumeric_cast(w)); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(FromValues, k_categoryName, "{725D79B8-1CB1-4473-8480-4DE584C75540}", "returns a vector from elements", "X", "Y", "Z", "W"); - + AZ_INLINE Vector4Type FromVector3AndNumber(Vector3Type source, const NumberType w) { return Vector4Type::CreateFromVector3AndFloat(source, aznumeric_cast(w)); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(FromVector3AndNumber, k_categoryName, "{577E2B26-BEC1-4CC7-B23B-5172ED1BFF6E}", "returns a vector with x,y,z from Source and w from W", "Source", "W"); - + AZ_INLINE NumberType GetElement(const Vector4Type source, const NumberType index) { return source.GetElement(AZ::GetClamp(aznumeric_cast(index), 0, 3)); @@ -99,7 +99,7 @@ namespace ScriptCanvas return source; } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(Homogenize, k_categoryName, "{9A3FAB19-0442-44A5-8454-12003BA146EE}", "returns a vector with all components divided by the w element", "Source"); - + AZ_INLINE BooleanType IsClose(const Vector4Type a, const Vector4Type b, NumberType tolerance) { return a.IsClose(b, aznumeric_cast(tolerance)); @@ -212,8 +212,8 @@ namespace ScriptCanvas return lhs - rhs; } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE_DEPRECATED(Subtract, k_categoryName, "{A5FA6465-9C39-4A44-BD7C-E8ECF9503E46}", "This node is deprecated, use Subtract (-), it provides contextual type and slots", "A", "B"); - - using Registrar = RegistrarGeneric< + + using Registrar = RegistrarGeneric < AbsoluteNode, AddNode, DivideByNumberNode, @@ -260,8 +260,8 @@ namespace ScriptCanvas ReciprocalNode, SubtractNode - >; + > ; } -} +} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorAt.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorAt.cpp index 6b5b2770de..ed676034d8 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorAt.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorAt.cpp @@ -91,70 +91,6 @@ namespace ScriptCanvas } } } - - void OperatorAt::KeyNotFound(const Datum* containerDatum) - { - Datum defaultDatum; - AZStd::vector types = ScriptCanvas::Data::GetContainedTypes(GetSourceAZType()); - - int index = Data::IsMapContainerType(containerDatum->GetType()) ? 1 : 0; - - Data::Type type = Data::FromAZType(types[index]); - defaultDatum.SetType(type); - - PushOutput(defaultDatum, *GetSlot(*m_outputSlots.begin())); - SignalOutput(GetSlotId("Key Not Found")); - } - - void OperatorAt::InvokeOperator() - { - Slot* inputSlot = GetFirstInputSourceSlot(); - - if (inputSlot) - { - SlotId sourceSlotId = inputSlot->GetId(); - const Datum* containerDatum = FindDatum(sourceSlotId); - - if (Datum::IsValidDatum(containerDatum)) - { - const Datum* inputKeyDatum = FindDatum(*m_inputSlots.begin()); - AZ::Outcome valueOutcome = BehaviorContextMethodHelper::CallMethodOnDatumUnpackOutcomeSuccess(*containerDatum, "At", *inputKeyDatum); - if (!valueOutcome.IsSuccess()) - { - KeyNotFound(containerDatum); - return; - } - - if (Data::IsVectorContainerType(containerDatum->GetType())) - { - PushOutput(valueOutcome.TakeValue(), *GetSlot(*m_outputSlots.begin())); - SignalOutput(GetSlotId("Out")); - } - else if (Data::IsSetContainerType(containerDatum->GetType()) || Data::IsMapContainerType(containerDatum->GetType())) - { - Datum keyDatum = valueOutcome.TakeValue(); - if (keyDatum.Empty()) - { - KeyNotFound(containerDatum); - } - else - { - PushOutput(keyDatum, *GetSlot(*m_outputSlots.begin())); - SignalOutput(GetSlotId("Out")); - } - } - } - } - } - - void OperatorAt::OnInputSignal(const SlotId& slotId) - { - const SlotId inSlotId = OperatorBaseProperty::GetInSlotId(this); - if (slotId == inSlotId) - { - InvokeOperator(); - } - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorAt.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorAt.h index e20de1a02b..ceae2211a0 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorAt.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorAt.h @@ -36,9 +36,6 @@ namespace ScriptCanvas void ConfigureContracts(SourceType sourceType, AZStd::vector& contractDescs) override; void OnSourceTypeChanged() override; - void OnInputSignal(const SlotId& slotId) override; - void InvokeOperator(); - void KeyNotFound(const Datum* containerDatum); }; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorBack.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorBack.cpp index 99607c37f3..658c561c8b 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorBack.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorBack.cpp @@ -41,50 +41,13 @@ namespace ScriptCanvas slotConfiguration.m_toolTip = "The value at the specified index"; slotConfiguration.m_displayGroup = GetSourceDisplayGroup(); slotConfiguration.SetType(type); - slotConfiguration.SetConnectionType(ConnectionType::Output); + slotConfiguration.SetConnectionType(ConnectionType::Output); m_outputSlots.insert(AddSlot(slotConfiguration)); } } } - void OperatorBack::InvokeOperator() - { - const SlotSet& slotSets = GetSourceSlots(); - - if (!slotSets.empty()) - { - SlotId sourceSlotId = (*slotSets.begin()); - const Datum* containerDatum = FindDatum(sourceSlotId); - - if (Datum::IsValidDatum(containerDatum)) - { - const Datum* inputKeyDatum = FindDatum(*m_inputSlots.begin()); - AZ::Outcome valueOutcome = BehaviorContextMethodHelper::CallMethodOnDatumUnpackOutcomeSuccess(*containerDatum, "Back", *inputKeyDatum); - if (!valueOutcome.IsSuccess()) - { - SCRIPTCANVAS_REPORT_ERROR((*this), "Failed to call Back on container: %s", valueOutcome.GetError().c_str()); - return; - } - - if (Data::IsVectorContainerType(containerDatum->GetType())) - { - PushOutput(valueOutcome.TakeValue(), *GetSlot(*m_outputSlots.begin())); - } - } - } - - SignalOutput(GetSlotId("Out")); - } - - void OperatorBack::OnInputSignal(const SlotId& slotId) - { - const SlotId inSlotId = OperatorBaseProperty::GetInSlotId(this); - if (slotId == inSlotId) - { - InvokeOperator(); - } - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorBack.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorBack.h index 41c4b2cbc1..068043975f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorBack.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorBack.h @@ -35,10 +35,7 @@ namespace ScriptCanvas void ConfigureContracts(SourceType sourceType, AZStd::vector& contractDescs) override; void OnSourceTypeChanged() override; - void OnInputSignal(const SlotId& slotId) override; - void InvokeOperator(); }; - } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorClear.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorClear.cpp index 36890c9720..38118ed8c1 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorClear.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorClear.cpp @@ -67,36 +67,6 @@ namespace ScriptCanvas } //// } - - void OperatorClear::OnInputSignal(const SlotId& slotId) - { - const SlotId inSlotId = OperatorBaseProperty::GetInSlotId(this); - - if (slotId != inSlotId) - { - return; - } - - SlotId sourceSlotId = OperatorClearProperty::GetSourceSlotId(this); - - if (const Datum* containerDatum = FindDatum(sourceSlotId)) - { - if (Datum::IsValidDatum(containerDatum)) - { - AZ::Outcome clearOutcome = BehaviorContextMethodHelper::CallMethodOnDatum(*containerDatum, "Clear"); - if (!clearOutcome.IsSuccess()) - { - SCRIPTCANVAS_REPORT_ERROR((*this), "Failed to call Clear on container: %s", clearOutcome.GetError().c_str()); - return; - } - - // Push the source container as an output to support chaining - PushOutput(*containerDatum, *OperatorClearProperty::GetContainerSlot(this)); - } - } - - SignalOutput(GetSlotId("Out")); - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorClear.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorClear.h index a0ccad1379..2b7e24682f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorClear.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorClear.h @@ -41,10 +41,6 @@ namespace ScriptCanvas OperatorClear() = default; void OnInit() override; - - protected: - - void OnInputSignal(const SlotId& slotId) override; }; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorEmpty.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorEmpty.cpp index 71ee545397..e62b671268 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorEmpty.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorEmpty.cpp @@ -70,49 +70,6 @@ namespace ScriptCanvas } //// } - - void OperatorEmpty::OnInputSignal(const SlotId& slotId) - { - const SlotId inSlotId = OperatorEmptyProperty::GetInSlotId(this); - if (slotId == inSlotId) - { - SlotId sourceSlotId = OperatorEmptyProperty::GetSourceSlotId(this); - - const Datum* containerDatum = FindDatum(sourceSlotId); - - if (Datum::IsValidDatum(containerDatum)) - { - // Is the container empty? - auto emptyOutcome = BehaviorContextMethodHelper::CallMethodOnDatum(*containerDatum, "Empty"); - if (!emptyOutcome) - { - SCRIPTCANVAS_REPORT_ERROR((*this), "Failed to call Empty on container: %s", emptyOutcome.GetError().c_str()); - return; - } - - Datum emptyResult = emptyOutcome.TakeValue(); - bool isEmpty = *emptyResult.GetAs(); - - PushOutput(Datum(isEmpty), *GetSlot(OperatorEmptyProperty::GetIsEmptySlotId(this))); - - if (isEmpty) - { - SignalOutput(OperatorEmptyProperty::GetTrueSlotId(this)); - } - else - { - SignalOutput(OperatorEmptyProperty::GetFalseSlotId(this)); - } - } - else - { - PushOutput(Datum(true), *GetSlot(OperatorEmptyProperty::GetIsEmptySlotId(this))); - SignalOutput(OperatorEmptyProperty::GetFalseSlotId(this)); - } - - SignalOutput(OperatorEmptyProperty::GetOutSlotId(this)); - } - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorEmpty.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorEmpty.h index 5cc26c126e..148142d3c8 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorEmpty.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorEmpty.h @@ -21,22 +21,15 @@ namespace ScriptCanvas class OperatorEmpty : public Node { public: - SCRIPTCANVAS_NODE(OperatorEmpty); - void CustomizeReplacementNode(Node* replacementNode, AZStd::unordered_map>& outSlotIdMap) const override; static bool OperatorEmptyVersionConverter(AZ::SerializeContext& context, AZ::SerializeContext::DataElementNode& classElement); OperatorEmpty() = default; - // Node... void OnInit() override; - //// - - void OnInputSignal(const SlotId& slotId) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorErase.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorErase.cpp index 15328b42fb..92c753c5b8 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorErase.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorErase.cpp @@ -95,47 +95,6 @@ namespace ScriptCanvas } } - void OperatorErase::InvokeOperator() - { - Slot* inputSlot = GetFirstInputSourceSlot(); - Slot* outputSlot = GetFirstOutputSourceSlot(); - - if (inputSlot && outputSlot) - { - SlotId sourceSlotId = inputSlot->GetId(); - const Datum* containerDatum = FindDatum(sourceSlotId); - - if (Datum::IsValidDatum(containerDatum)) - { - const Datum* inputKeyDatum = FindDatum(*m_inputSlots.begin()); - AZ::Outcome valueOutcome = BehaviorContextMethodHelper::CallMethodOnDatum(*containerDatum, "Erase", *inputKeyDatum); - - if (valueOutcome.IsSuccess()) - { - // Push the source container as an output to support chaining - PushOutput(*containerDatum, (*outputSlot)); - - auto outcomeInnerResult = valueOutcome.GetValue().GetAs< AZ::Outcome>(); - if (outcomeInnerResult && !outcomeInnerResult->IsSuccess()) - { - SignalOutput(GetSlotId("Element Not Found")); - return; - } - } - } - } - - SignalOutput(GetSlotId("Out")); - } - - void OperatorErase::OnInputSignal(const SlotId& slotId) - { - const SlotId inSlotId = OperatorBaseProperty::GetInSlotId(this); - if (slotId == inSlotId) - { - InvokeOperator(); - } - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorErase.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorErase.h index dc5d8c4c0c..95ddfcb275 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorErase.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorErase.h @@ -39,8 +39,6 @@ namespace ScriptCanvas void ConfigureContracts(SourceType sourceType, AZStd::vector& contractDescs) override; void OnSourceTypeChanged() override; - void OnInputSignal(const SlotId& slotId) override; - void InvokeOperator(); private: bool m_missedElementNotFound = false; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorFront.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorFront.cpp index 794ee8aeb0..bd97e4cd4e 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorFront.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorFront.cpp @@ -46,43 +46,6 @@ namespace ScriptCanvas } } - void OperatorFront::InvokeOperator() - { - const SlotSet& slotSets = GetSourceSlots(); - - if (!slotSets.empty()) - { - SlotId sourceSlotId = (*slotSets.begin()); - const Datum* containerDatum = FindDatum(sourceSlotId); - - if (Datum::IsValidDatum(containerDatum)) - { - const Datum* inputKeyDatum = FindDatum(*m_inputSlots.begin()); - AZ::Outcome valueOutcome = BehaviorContextMethodHelper::CallMethodOnDatumUnpackOutcomeSuccess(*containerDatum, "Front", *inputKeyDatum); - if (!valueOutcome.IsSuccess()) - { - SCRIPTCANVAS_REPORT_ERROR((*this), "Failed to call Front on container: %s", valueOutcome.GetError().c_str()); - return; - } - - if (Data::IsVectorContainerType(containerDatum->GetType())) - { - PushOutput(valueOutcome.TakeValue(), *GetSlot(*m_outputSlots.begin())); - } - } - } - - SignalOutput(GetSlotId("Out")); - } - - void OperatorFront::OnInputSignal(const SlotId& slotId) - { - const SlotId inSlotId = OperatorBaseProperty::GetInSlotId(this); - if (slotId == inSlotId) - { - InvokeOperator(); - } - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorFront.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorFront.h index cb41f6a479..64ea312f5d 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorFront.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorFront.h @@ -35,10 +35,7 @@ namespace ScriptCanvas void ConfigureContracts(SourceType sourceType, AZStd::vector& contractDescs) override; void OnSourceTypeChanged() override; - void OnInputSignal(const SlotId& slotId) override; - void InvokeOperator(); }; - } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorInsert.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorInsert.cpp index bce98a6776..7628aa10cc 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorInsert.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorInsert.cpp @@ -50,7 +50,7 @@ namespace ScriptCanvas slotConfiguration.m_name = Data::GetName(type); slotConfiguration.m_displayGroup = GetSourceDisplayGroup(); slotConfiguration.SetType(type); - slotConfiguration.SetConnectionType(ConnectionType::Input); + slotConfiguration.SetConnectionType(ConnectionType::Input); m_inputSlots.insert(AddSlot(slotConfiguration)); } @@ -84,108 +84,6 @@ namespace ScriptCanvas } } - void OperatorInsert::InvokeOperator() - { - Slot* inputSlot = GetFirstInputSourceSlot(); - Slot* outputSlot = GetFirstOutputSourceSlot(); - - if (inputSlot && outputSlot) - { - SlotId sourceSlotId = inputSlot->GetId(); - const Datum* containerDatum = FindDatum(sourceSlotId); - - if (Datum::IsValidDatum(containerDatum)) - { - AZ::BehaviorMethod* method = GetOperatorMethod("Insert"); - AZ_Assert(method, "The contract must have failed because you should not be able to invoke an operator for a type that does not have the method"); - - AZStd::array params; - - AZ::BehaviorValueParameter* paramFirst(params.begin()); - AZ::BehaviorValueParameter* paramIter = paramFirst; - - if (Data::IsVectorContainerType(GetSourceAZType())) - { - // Container - auto behaviorParameter = method->GetArgument(0); - AZ::Outcome param0 = containerDatum->ToBehaviorValueParameter(*behaviorParameter); - paramIter->Set(param0.GetValue()); - ++paramIter; - - // Get the size of the container - auto sizeOutcome = BehaviorContextMethodHelper::CallMethodOnDatum(*containerDatum, "Size"); - if (!sizeOutcome) - { - SCRIPTCANVAS_REPORT_ERROR((*this), "Failed to get size of container: %s", sizeOutcome.GetError().c_str()); - return; - } - - auto inputSlotIterator = m_inputSlots.begin(); - - // Index - behaviorParameter = method->GetArgument(1); - const Datum* indexDatum = FindDatum(*inputSlotIterator); - AZ::Outcome param2 = indexDatum->ToBehaviorValueParameter(*behaviorParameter); - - paramIter->Set(param2.GetValue()); - ++paramIter; - - // Value to insert - behaviorParameter = method->GetArgument(2); - ++inputSlotIterator; - const Datum* inputDatum = FindDatum(*inputSlotIterator); - AZ::Outcome param1 = inputDatum->ToBehaviorValueParameter(*behaviorParameter); - paramIter->Set(param1.GetValue()); - ++paramIter; - } - else if (Data::IsMapContainerType(GetSourceAZType())) - { - auto inputSlotIterator = m_inputSlots.begin(); - const Datum* keyDatum = FindDatum(*inputSlotIterator++); - const Datum* valueDatum = FindDatum(*inputSlotIterator); - - if (keyDatum && valueDatum) - { - // Container - const AZ::BehaviorParameter* behaviorParameter = method->GetArgument(0); - AZ::Outcome param0 = containerDatum->ToBehaviorValueParameter(*behaviorParameter); - paramIter->Set(param0.GetValue()); - ++paramIter; - - // Key - behaviorParameter = method->GetArgument(1); - AZ::Outcome param1 = keyDatum->ToBehaviorValueParameter(*behaviorParameter); - paramIter->Set(param1.GetValue()); - ++paramIter; - - // Value to insert - behaviorParameter = method->GetArgument(2); - AZ::Outcome param2 = valueDatum->ToBehaviorValueParameter(*behaviorParameter); - paramIter->Set(param2.GetValue()); - ++paramIter; - } - } - - AZStd::vector resultSlotIDs; - resultSlotIDs.push_back(); - BehaviorContextMethodHelper::Call(*this, false, method, paramFirst, paramIter, resultSlotIDs); - - // Push the source container as an output to support chaining - PushOutput(*containerDatum, (*outputSlot)); - } - } - - SignalOutput(GetSlotId("Out")); - } - - void OperatorInsert::OnInputSignal(const SlotId& slotId) - { - const SlotId inSlotId = OperatorBaseProperty::GetInSlotId(this); - if (slotId == inSlotId) - { - InvokeOperator(); - } - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorInsert.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorInsert.h index 970c8ab780..0fda9b0654 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorInsert.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorInsert.h @@ -33,9 +33,6 @@ namespace ScriptCanvas void ConfigureContracts(SourceType sourceType, AZStd::vector& contractDescs) override; void OnSourceTypeChanged() override; - void OnInputSignal(const SlotId& slotId) override; - void InvokeOperator(); - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorPushBack.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorPushBack.cpp index e449d04d34..cf8eb306c4 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorPushBack.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorPushBack.cpp @@ -42,73 +42,6 @@ namespace ScriptCanvas m_inputSlots.insert(AddSlot(slotConfiguration)); } } - - void OperatorPushBack::InvokeOperator() - { - Slot* inputSlot = GetFirstInputSourceSlot(); - Slot* outputSlot = GetFirstOutputSourceSlot(); - - if (inputSlot && outputSlot) - { - const Datum* containerDatum = FindDatum(inputSlot->GetId()); - - if (Datum::IsValidDatum(containerDatum)) - { - AZ::BehaviorMethod* method = GetOperatorMethod("PushBack"); - AZ_Assert(method, "The contract must have failed because you should not be able to invoke an operator for a type that does not have the method"); - - AZStd::array params; - - AZ::BehaviorValueParameter* paramFirst(params.begin()); - AZ::BehaviorValueParameter* paramIter = paramFirst; - - if (Data::IsVectorContainerType(GetSourceAZType())) - { - // Container - auto behaviorParameter = method->GetArgument(0); - - AZ::Outcome param0 = containerDatum->ToBehaviorValueParameter(*behaviorParameter); - paramIter->Set(param0.GetValue()); - ++paramIter; - - const auto& inputSlotIterator = m_inputSlots.begin(); - - // Value to push - behaviorParameter = method->GetArgument(1); - const Datum* inputDatum = FindDatum(*inputSlotIterator); - AZ_Assert(inputDatum, "Unable to GetInput for Input slot Id"); - if (inputDatum) - { - AZ::Outcome param1 = inputDatum->ToBehaviorValueParameter(*behaviorParameter); - paramIter->Set(param1.GetValue()); - ++paramIter; - } - } - else if (Data::IsMapContainerType(GetSourceAZType())) - { - SCRIPTCANVAS_REPORT_ERROR((*this), "PushBack is not a supported operation on maps"); - return; - } - - AZStd::vector resultSlotIDs; - resultSlotIDs.push_back(); - BehaviorContextMethodHelper::Call(*this, false, method, paramFirst, paramIter, resultSlotIDs); - - PushOutput(*containerDatum, (*outputSlot)); - } - } - - SignalOutput(GetSlotId("Out")); - } - - void OperatorPushBack::OnInputSignal(const SlotId& slotId) - { - const SlotId inSlotId = OperatorBaseProperty::GetInSlotId(this); - if (slotId == inSlotId) - { - InvokeOperator(); - } - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorPushBack.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorPushBack.h index 695d6a6f93..5f74dd9dc9 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorPushBack.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorPushBack.h @@ -32,9 +32,6 @@ namespace ScriptCanvas void ConfigureContracts(SourceType sourceType, AZStd::vector& contractDescs) override; void OnSourceTypeChanged() override; - void OnInputSignal(const SlotId& slotId) override; - void InvokeOperator(); - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorSize.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorSize.cpp index 29c5e61a21..f24bfb2890 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorSize.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorSize.cpp @@ -66,7 +66,7 @@ namespace ScriptCanvas AZ::SerializeContext::DataElementNode baseNodeElement = operatorBaseClass->GetSubElement(nodeElementIndex); classElement.RemoveElementByName(AZ::Crc32("BaseClass1")); - classElement.AddElement(baseNodeElement); + classElement.AddElement(baseNodeElement); } return true; @@ -85,42 +85,6 @@ namespace ScriptCanvas } //// } - - void OperatorSize::OnInputSignal(const SlotId& slotId) - { - const SlotId inSlotId = OperatorSizeProperty::GetInSlotId(this); - if (slotId == inSlotId) - { - - SlotId sourceSlotId = OperatorSizeProperty::GetSourceSlotId(this); - SlotId sizeSlotId = OperatorSizeProperty::GetSizeSlotId(this); - - const Datum* containerDatum = FindDatum(sourceSlotId); - - if (Datum::IsValidDatum(containerDatum)) - { - // Get the size of the container - auto sizeOutcome = BehaviorContextMethodHelper::CallMethodOnDatum(*containerDatum, "Size"); - if (!sizeOutcome) - { - SCRIPTCANVAS_REPORT_ERROR((*this), "Failed to get size of container: %s", sizeOutcome.GetError().c_str()); - return; - } - - // Index - Datum sizeResult = sizeOutcome.TakeValue(); - - PushOutput(sizeResult, *GetSlot(sizeSlotId)); - } - else - { - Datum zero(0); - PushOutput(zero, *GetSlot(sizeSlotId)); - } - - SignalOutput(OperatorSizeProperty::GetOutSlotId(this)); - } - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorSize.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorSize.h index 3199b09ebd..c323977d33 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorSize.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorSize.h @@ -33,10 +33,7 @@ namespace ScriptCanvas // Node... void OnInit() override; //// - - void OnInputSignal(const SlotId& slotId) override; - - }; + }; } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorAdd.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorAdd.cpp index a82e8f9871..0eaf7a9a85 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorAdd.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorAdd.cpp @@ -45,13 +45,13 @@ namespace ScriptCanvas Data::ColorType operator()(const Data::ColorType& lhs, const Datum& rhs) { const AZ::Color* dataRhs = rhs.GetAs(); - + float a = AZ::GetClamp(lhs.GetA(), 0.f, 1.f) + AZ::GetClamp(dataRhs->GetA(), 0.f, 1.f); float r = AZ::GetClamp(lhs.GetR(), 0.f, 1.f) + AZ::GetClamp(dataRhs->GetR(), 0.f, 1.f); float g = AZ::GetClamp(lhs.GetG(), 0.f, 1.f) + AZ::GetClamp(dataRhs->GetG(), 0.f, 1.f); float b = AZ::GetClamp(lhs.GetB(), 0.f, 1.f) + AZ::GetClamp(dataRhs->GetB(), 0.f, 1.f); - return AZ::Color(r, g, b, a); + return AZ::Color(r, g, b, a); } }; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorArithmetic.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorArithmetic.cpp index 7d6fb74768..a1dcbbc0e7 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorArithmetic.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorArithmetic.cpp @@ -55,68 +55,6 @@ namespace ScriptCanvas } } - void OperatorArithmetic::OnInputSignal([[maybe_unused]] const SlotId& slotId) - { - AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::ScriptCanvas); - - if (!m_scrapedInputs) - { - m_scrapedInputs = true; - - AZStd::vector< Slot* > groupedSlots = GetSlotsWithDynamicGroup(GetArithmeticDynamicTypeGroup()); - - SlotId fallbackId; - - for (Slot* groupedSlot : groupedSlots) - { - if (groupedSlot->IsInput()) - { - SlotId groupedSlotId = groupedSlot->GetId(); - - if (!fallbackId.IsValid()) - { - fallbackId = groupedSlotId; - } - - if ((groupedSlot->IsVariableReference() && groupedSlot->GetVariableReference().IsValid()) || IsConnected(groupedSlotId) || IsValidArithmeticSlot(groupedSlotId)) - { - const Datum* inputDatum = groupedSlot->FindDatum(); - - if (inputDatum && inputDatum->GetType().IsValid() && inputDatum->GetType().GetType() != Data::eType::BehaviorContextObject) - { - m_applicableInputs.emplace_back(inputDatum); - } - } - } - else if (groupedSlot->IsOutput()) - { - m_resultSlot = groupedSlot; - } - - m_outSlot = GetSlotByName("Out")->GetId(); - } - - // If none of our inputs are valid input slots. Just use the first one we found to fall into a default use case. - if (m_applicableInputs.empty()) - { - const Datum* inputDatum = FindDatum(fallbackId); - - if (inputDatum && inputDatum->GetType().IsValid()) - { - m_applicableInputs.emplace_back(inputDatum); - } - } - - if (!m_applicableInputs.empty()) - { - const Datum* datum = m_applicableInputs.front(); - m_result.SetType(datum->GetType()); - } - } - - InvokeOperator(); - } - void OperatorArithmetic::OnConfigured() { auto slotList = GetSlotsWithDynamicGroup(GetArithmeticDynamicTypeGroup()); @@ -135,7 +73,7 @@ namespace ScriptCanvas { // Version conversion for previous elements for (Slot& currentSlot : ModSlots()) - { + { if (currentSlot.IsData()) { auto& contracts = currentSlot.GetContracts(); @@ -151,7 +89,7 @@ namespace ScriptCanvas contract->SetSupportedOperator(OperatorFunction()); contract->SetSupportedNativeTypes(GetSupportedNativeDataTypes()); } - } + } } if (!currentSlot.IsDynamicSlot()) @@ -172,17 +110,17 @@ namespace ScriptCanvas void OperatorArithmetic::OnActivate() { if (m_scrapedInputs) - { + { m_scrapedInputs = false; m_applicableInputs.clear(); - m_result.ReconfigureDatumTo(AZStd::move(ScriptCanvas::Datum())); + m_result.ReconfigureDatumTo(AZStd::move(ScriptCanvas::Datum())); } } void OperatorArithmetic::ConfigureVisualExtensions() { - { + { VisualExtensionSlotConfiguration visualExtensions(VisualExtensionSlotConfiguration::VisualExtensionType::ExtenderSlot); visualExtensions.m_name = "Add Operand"; @@ -212,12 +150,12 @@ namespace ScriptCanvas bool OperatorArithmetic::CanDeleteSlot(const SlotId& slotId) const { - Slot* slot = GetSlot(slotId); + Slot* slot = GetSlot(slotId); if (slot && slot->GetDynamicGroup() == GetArithmeticDynamicTypeGroup()) { if (!slot->IsOutput()) - { + { auto slotList = GetSlotsWithDynamicGroup(GetArithmeticDynamicTypeGroup()); int inputCount = 0; @@ -247,14 +185,14 @@ namespace ScriptCanvas } else if (operands.size() == 1) { - const Datum* operand = operands.front(); + const Datum* operand = operands.front(); result = (*operand); return; } auto type = result.GetType(); - Operator(type.GetType(), operands, result); - } + Operator(type.GetType(), operands, result); + } void OperatorArithmetic::Operator(Data::eType type, const ArithmeticOperands& operands, Datum& result) { @@ -269,20 +207,6 @@ namespace ScriptCanvas AZ_UNUSED(dataType); } - void OperatorArithmetic::InvokeOperator() - { - if (!m_result.GetType().IsValid()) - { - return; - } - - Evaluate(m_applicableInputs, m_result); - - PushOutput(m_result, (*m_resultSlot)); - - SignalOutput(m_outSlot); - } - SlotId OperatorArithmetic::CreateSlot(AZStd::string_view name, AZStd::string_view toolTip, ConnectionType connectionType) { DynamicDataSlotConfiguration slotConfiguration; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorArithmetic.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorArithmetic.h index 716c9111af..86a5b17c52 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorArithmetic.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorArithmetic.h @@ -65,7 +65,7 @@ namespace ScriptCanvas AZ::Crc32 GetArithmeticExtensionId() const { return AZ_CRC("AddnewValueExtension", 0xea20301c); } AZ::Crc32 GetArithmeticDynamicTypeGroup() const { return AZ_CRC("ArithmeticGroup", 0x4271e41f); } AZStd::string GetArithmeticDisplayGroup() const { return "ArithmeticGroup"; } - + virtual AZStd::string_view OperatorFunction() const { return ""; } virtual AZStd::unordered_set< Data::Type > GetSupportedNativeDataTypes() const { @@ -81,15 +81,14 @@ namespace ScriptCanvas Data::Type::Matrix4x4() }; } - + // Node void OnSlotDisplayTypeChanged(const SlotId& slotId, const Data::Type& dataType) override final; void OnDynamicGroupDisplayTypeChanged(const AZ::Crc32& dynamicGroup, const Data::Type& dataType) override final; - void OnInputSignal(const SlotId& slotId) override; - + void OnConfigured() override; void OnInit() override; - void OnActivate() override; + void OnActivate() override; void ConfigureVisualExtensions() override; SlotId HandleExtension(AZ::Crc32 extensionId) override; @@ -101,7 +100,6 @@ namespace ScriptCanvas virtual void Operator(Data::eType type, const ArithmeticOperands& operands, Datum& result); virtual void InitializeSlot(const SlotId& slotId, const Data::Type& dataType); - virtual void InvokeOperator(); ////////////////////////////////////////////////////////////////////////// // Translation @@ -130,7 +128,7 @@ namespace ScriptCanvas Slot* m_resultSlot; SlotId m_outSlot; }; - + //! Deprecated: kept here for version conversion class OperatorArithmeticUnary : public OperatorArithmetic { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorDiv.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorDiv.cpp index b50d06e9e9..8d26ad221f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorDiv.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorDiv.cpp @@ -27,7 +27,7 @@ namespace ScriptCanvas Type operator()(const Type& a, const Datum& b) { const Type* dataB = b.GetAs(); - + const Type& divisor = (*dataB); if (AZ::IsClose(divisor, Type(0), std::numeric_limits::epsilon())) { @@ -35,7 +35,7 @@ namespace ScriptCanvas return Type(0); } - return a / divisor; + return a / divisor; } private: @@ -65,9 +65,9 @@ namespace ScriptCanvas SCRIPTCANVAS_REPORT_ERROR((*m_node), "Divide by Zero"); return VectorType(0); } - } - - return a / (*divisor); + } + + return a / (*divisor); } OperatorDivVectorTypes(Node* node) @@ -114,7 +114,7 @@ namespace ScriptCanvas { const AZ::Color* dataA = lhs.GetAs(); const AZ::Color* dataB = rhs.GetAs(); - + if (dataB->IsClose(AZ::Color(), std::numeric_limits::epsilon())) { // Divide by zero diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorDiv.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorDiv.h index 61121ff85d..37089fe5ec 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorDiv.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorDiv.h @@ -33,7 +33,7 @@ namespace ScriptCanvas protected: - void InitializeSlot(const SlotId& slotId, const ScriptCanvas::Data::Type& dataType) override; + void InitializeSlot(const SlotId& slotId, const ScriptCanvas::Data::Type& dataType) override; bool IsValidArithmeticSlot(const SlotId& slotId) const override; void OnResetDatumToDefaultValue(ModifiableDatumView& datumView) override; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorDivideByNumber.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorDivideByNumber.cpp index 27a8e5f846..9ba4a7f4ae 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorDivideByNumber.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorDivideByNumber.cpp @@ -104,98 +104,6 @@ namespace ScriptCanvas } } - void OperatorDivideByNumber::OnInputSignal(const SlotId& slotId) - { - if (slotId != OperatorDivideByNumberProperty::GetInSlotId(this)) - { - return; - } - - Data::Type type = GetDisplayType(AZ::Crc32("DivideGroup")); - - if (!type.IsValid()) - { - return; - } - - const Datum* operand = FindDatum(m_operandId); - - if (operand == nullptr) - { - SCRIPTCANVAS_REPORT_ERROR((*this), "Operand is nullptr"); - return; - } - - const float divisorValue = aznumeric_cast(OperatorDivideByNumberProperty::GetDivisor(this)); - - if (AZ::IsClose(divisorValue, 0.f, std::numeric_limits::epsilon())) - { - SCRIPTCANVAS_REPORT_ERROR((*this), "Division by zero"); - return; - } - - Datum result; - - switch (type.GetType()) - { - case Data::eType::Number: - { - const Data::NumberType* number = operand->GetAs(); - Data::NumberType resultValue = (*number) / divisorValue; - result = Datum(resultValue); - } - break; - case Data::eType::Vector2: - { - const Data::Vector2Type* vector = operand->GetAs(); - AZ::Vector2 resultValue = (*vector) / divisorValue; - result = Datum(resultValue); - } - break; - case Data::eType::Vector3: - { - const Data::Vector3Type* vector = operand->GetAs(); - AZ::Vector3 resultValue = (*vector) / divisorValue; - result = Datum(resultValue); - } - break; - case Data::eType::Vector4: - { - const Data::Vector4Type* vector = operand->GetAs(); - AZ::Vector4 resultValue = (*vector) / divisorValue; - result = Datum(resultValue); - } - break; - case Data::eType::Quaternion: - { - const Data::QuaternionType* quaternion = operand->GetAs(); - Data::QuaternionType resultValue = (*quaternion) / divisorValue; - result = Datum(resultValue); - } - break; - case Data::eType::Matrix3x3: - { - const Data::Matrix3x3Type* matrix = operand->GetAs(); - Data::Matrix3x3Type resultValue = (*matrix) / divisorValue; - result = Datum(resultValue); - } - break; - case Data::eType::Color: - { - const Data::ColorType *color = operand->GetAs(); - Data::ColorType resultValue = (*color) / divisorValue; - result = Datum(resultValue); - } - break; - default: - result = Datum(); - AZ_Error("Script Canvas", false, "Divide by Number does not support the provided data type."); - break; - } - - PushOutput(result, (*OperatorDivideByNumberProperty::GetResultSlot(this))); - SignalOutput(OperatorDivideByNumberProperty::GetOutSlotId(this)); - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorDivideByNumber.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorDivideByNumber.h index 10df09a42e..c1eb08fddc 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorDivideByNumber.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorDivideByNumber.h @@ -19,9 +19,9 @@ namespace ScriptCanvas #define DIVIDABLE_TYPES { Data::Type::Number(), Data::Type::Vector2(), Data::Type::Vector3(), Data::Type::Vector4() } //! Deprecated: see MethodOverloaded for "Divide by Number (/)" - class OperatorDivideByNumber + class OperatorDivideByNumber : public Node - { + { public: SCRIPTCANVAS_NODE(OperatorDivideByNumber); @@ -42,7 +42,6 @@ namespace ScriptCanvas // Nodes... void OnInit() override; - void OnInputSignal(const SlotId& slotId) override; //// protected: diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLength.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLength.cpp index b52b6d8da2..9cde2d7322 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLength.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLength.cpp @@ -70,58 +70,6 @@ namespace ScriptCanvas ConfigureSlots(); } } - - void OperatorLength::OnInputSignal(const SlotId& slotId) - { - if (slotId != OperatorLengthProperty::GetInSlotId(this)) - { - return; - } - - Data::Type type = GetDisplayType(AZ::Crc32("SourceGroup")); - - if (!type.IsValid()) - { - return; - } - - Datum result; - const Datum* operand = FindDatum(OperatorLengthProperty::GetSourceSlotId(this)); - - switch (type.GetType()) - { - case Data::eType::Vector2: - { - const AZ::Vector2* vector = operand->GetAs(); - result = Datum(vector->GetLength()); - } - break; - case Data::eType::Vector3: - { - const AZ::Vector3* vector = operand->GetAs(); - result = Datum(vector->GetLength()); - } - break; - case Data::eType::Vector4: - { - const AZ::Vector4* vector = operand->GetAs(); - result = Datum(vector->GetLength()); - } - break; - case Data::eType::Quaternion: - { - const AZ::Quaternion* vector = operand->GetAs(); - result = Datum(vector->GetLength()); - } - break; - default: - AZ_Assert(false, "Length operator not defined for type: %s", Data::ToAZType(type).ToString().c_str()); - break; - } - - PushOutput(result, (*OperatorLengthProperty::GetLengthSlot(this))); - SignalOutput(OperatorLengthProperty::GetOutSlotId(this)); - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLength.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLength.h index f49c384439..188d8c2583 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLength.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLength.h @@ -38,10 +38,7 @@ namespace ScriptCanvas OperatorLength() = default; ~OperatorLength() = default; - // Node... void OnInit() override; - void OnInputSignal(const SlotId& slotId) override; - //// }; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerp.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerp.cpp index 079073fa64..43b1be3f6d 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerp.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerp.cpp @@ -25,7 +25,7 @@ namespace ScriptCanvas SlotId stepId = LerpBetweenProperty::GetStepSlotId(this); if (stepId.IsValid()) - { + { for (const SlotId& slotId : { m_startSlotId, m_stopSlotId, m_speedSlotId, stepId }) { Slot* slot = GetSlot(slotId); @@ -51,133 +51,10 @@ namespace ScriptCanvas //////// } - void LerpBetween::OnDeactivate() - { - AZ::SystemTickBus::Handler::BusDisconnect(); - AZ::TickBus::Handler::BusDisconnect(); - } - void LerpBetween::OnConfigured() { SetupInternalSlotReferences(); } - - void LerpBetween::OnSystemTick() - { - // Ping pong between the system and the normal tick bus for a consistent starting point for the lerp - AZ::SystemTickBus::Handler::BusDisconnect(); - AZ::TickBus::Handler::BusConnect(); - } - - void LerpBetween::OnTick(float deltaTime, [[maybe_unused]] AZ::ScriptTimePoint timePoint) - { - bool lerpComplete = false; - - m_counter += deltaTime; - - if (m_counter >= m_duration) - { - lerpComplete = true; - m_counter = m_duration; - } - - float percent = m_counter/m_duration; - - SignalLerpStep(percent); - } - - void LerpBetween::OnInputSignal(const SlotId& slotId) - { - if (slotId == LerpBetweenProperty::GetCancelSlotId(this)) - { - CancelLerp(); - } - else if (slotId == LerpBetweenProperty::GetInSlotId(this)) - { - CancelLerp(); - - AZ::SystemTickBus::Handler::BusConnect(); - - float speedOnlyTime = 0.0; - float maxDuration = 0.0; - - const Datum* durationDatum = FindDatum(m_maximumTimeSlotId); - const Datum* speedDatum = FindDatum(m_speedSlotId); - - if (durationDatum) - { - maxDuration = static_cast((*durationDatum->GetAs())); - } - - Data::Type displayType = GetDisplayType(AZ::Crc32("LerpGroup")); - - if (displayType == Data::Type::Number()) - { - SetupStartStop(displayType); - - if (!m_differenceDatum.GetType().IsValid()) - { - return; - } - - Data::NumberType difference = (*m_differenceDatum.GetAs()); - Data::NumberType speed = (*speedDatum->GetAs()); - - if (AZ::IsClose(speed, 0.0, Data::ToleranceEpsilon())) - { - speedOnlyTime = -1.0f; - } - else - { - speedOnlyTime = fabsf(static_cast(difference)/static_cast(speed)); - } - } - else if (displayType == Data::Type::Vector2()) - { - SetupStartStop(displayType); - speedOnlyTime = CalculateVectorSpeedTime(speedDatum); - } - else if (displayType == Data::Type::Vector3()) - { - SetupStartStop(displayType); - speedOnlyTime = CalculateVectorSpeedTime(speedDatum); - } - else if (displayType == Data::Type::Vector4()) - { - SetupStartStop(displayType); - speedOnlyTime = CalculateVectorSpeedTime(speedDatum); - } - - m_counter = 0; - - if (speedOnlyTime >= 0.0f && maxDuration >= 0.0f) - { - m_duration = AZStd::min(speedOnlyTime, maxDuration); - } - else if (speedOnlyTime >= 0.0f) - { - m_duration = speedOnlyTime; - } - else if (maxDuration >= 0.0f) - { - m_duration = maxDuration; - } - else - { - AZ_Error("ScriptCanvas", false, "Lerp Between not given a valid speed or duration to perofrm the lerp at. Defaulting to 1 second duration"); - m_duration = 1.0; - } - - if (AZ::IsClose(m_duration, 0.0f, AZ::Constants::FloatEpsilon)) - { - CancelLerp(); - - SignalLerpStep(1.0f); - } - - SignalOutput(LerpBetweenProperty::GetOutSlotId(this)); - } - } void LerpBetween::SetupInternalSlotReferences() { @@ -189,52 +66,7 @@ namespace ScriptCanvas m_stepSlotId = LerpBetweenProperty::GetStepSlotId(this); m_percentSlotId = LerpBetweenProperty::GetPercentSlotId(this); } - - void LerpBetween::CancelLerp() - { - AZ::SystemTickBus::Handler::BusDisconnect(); - AZ::TickBus::Handler::BusDisconnect(); - } - - void LerpBetween::SignalLerpStep(float percent) - { - Data::Type displayType = GetDisplayType(AZ::Crc32("LerpGroup")); - Datum stepDatum(displayType, Datum::eOriginality::Original); - stepDatum.SetToDefaultValueOfType(); - - if (displayType == Data::Type::Number()) - { - CalculateLerpStep(percent, stepDatum); - } - else if (displayType == Data::Type::Vector2()) - { - CalculateLerpStep(percent, stepDatum); - } - else if (displayType == Data::Type::Vector3()) - { - CalculateLerpStep(percent, stepDatum); - } - else if (displayType == Data::Type::Vector4()) - { - CalculateLerpStep(percent, stepDatum); - } - - if (AZ::IsClose(percent, 1.0f, AZ::Constants::FloatEpsilon)) - { - SignalOutput(LerpBetweenProperty::GetLerpCompleteSlotId(this)); - AZ::TickBus::Handler::BusDisconnect(); - } - - Datum percentDatum(ScriptCanvas::Data::Type::Number(), Datum::eOriginality::Original); - percentDatum.Set(percent); - - PushOutput(percentDatum, *GetSlot(m_percentSlotId)); - PushOutput(stepDatum, *GetSlot(m_stepSlotId)); - - SignalOutput(LerpBetweenProperty::GetTickSlotId(this)); - } - bool LerpBetween::IsGroupConnected() const { bool hasConnections = false; @@ -246,10 +78,10 @@ namespace ScriptCanvas break; } } - + return hasConnections; } - + bool LerpBetween::IsInGroup(const SlotId& slotId) const { return m_groupedSlotIds.count(slotId) > 0; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerp.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerp.h index cb54f2f236..f6f67f30bf 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerp.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerp.h @@ -25,10 +25,8 @@ namespace ScriptCanvas #define LERPABLE_TYPES { Data::Type::Number(), Data::Type::Vector2(), Data::Type::Vector3(), Data::Type::Vector4() } //! Deprecated: see NodeableNodeOverloadedLerp - class LerpBetween + class LerpBetween : public Node - , public AZ::SystemTickBus::Handler - , public AZ::TickBus::Handler { public: @@ -52,105 +50,21 @@ namespace ScriptCanvas LerpBetween() = default; ~LerpBetween() override = default; - + void OnInit() override; - void OnDeactivate() override; void OnConfigured() override; - - // SystemTickBus... - void OnSystemTick() override; - //// - - // TickBus... - void OnTick(float deltaTime, AZ::ScriptTimePoint timePoint) override; - //// - - // Node... - void OnInputSignal(const SlotId& slotId) override; - //// - + private: void SetupInternalSlotReferences(); - - void CancelLerp(); - - void SignalLerpStep(float percent); - bool IsGroupConnected() const; - bool IsInGroup(const SlotId& slotId) const; - - template - void CalculateLerpStep(float percent, Datum& stepDatum) - { - const DataType* startValue = m_startDatum.GetAs(); - const DataType* differenceValue = m_differenceDatum.GetAs(); - - if (startValue == nullptr || differenceValue == nullptr) - { - return; - } + bool IsInGroup(const SlotId& slotId) const; - DataType stepValue = (*startValue) + (*differenceValue) * percent; - stepDatum.Set(stepValue); - } - - template - void SetupStartStop(Data::Type displayType) - { - const Datum* startDatum = FindDatum(m_startSlotId); - const Datum* endDatum = FindDatum(m_stopSlotId); - - m_startDatum = (*startDatum); - m_differenceDatum = Datum(displayType, Datum::eOriginality::Original); - - const DataType* startValue = startDatum->GetAs(); - const DataType* endValue = endDatum->GetAs(); - - if (startValue == nullptr || endValue == nullptr) - { - m_differenceDatum.SetToDefaultValueOfType(); - } - else - { - DataType difference = (*endValue) - (*startValue); - m_differenceDatum.Set(difference); - } - } - - template - float CalculateVectorSpeedTime(const Datum* speedDatum) - { - const DataType* dataType = speedDatum->GetAs(); - - float speedLength = 0.0f; - - if (dataType) - { - speedLength = dataType->GetLength(); - } - - if (AZ::IsClose(speedLength, 0.0f, AZ::Constants::FloatEpsilon)) - { - return -1.0; - } - - float differenceLength = 0.0; - const DataType* differenceValue = m_differenceDatum.GetAs(); - - if (differenceValue) - { - differenceLength = differenceValue->GetLength(); - } - - return fabsf(static_cast(differenceLength/speedLength)); - } - AZStd::unordered_set< SlotId > m_groupedSlotIds; - + float m_duration; float m_counter; - + Datum m_startDatum; Datum m_differenceDatum; }; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerpNodeable.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerpNodeable.h index 3807bff5e7..813c433a4f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerpNodeable.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerpNodeable.h @@ -129,7 +129,7 @@ namespace ScriptCanvas return AZ::TickBus::Handler::BusIsConnected() || AZ::SystemTickBus::Handler::BusIsConnected(); } - + protected: size_t GetRequiredOutCount() const override { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerpNodeableNode.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerpNodeableNode.cpp index 6082e768ef..4ae3ff8c1f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerpNodeableNode.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerpNodeableNode.cpp @@ -189,7 +189,7 @@ namespace ScriptCanvas dataSlotConfiguration.SetConnectionType(ScriptCanvas::ConnectionType::Output); dataSlotConfiguration.m_dynamicDataType = DynamicDataType::Value; - + SlotId slotIdStep = AddSlot(dataSlotConfiguration); AZ_Assert(slotIdStep.IsValid(), "Data slot is not created successfully."); latentOut.outputs.push_back(slotIdStep); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerpNodeableNode.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerpNodeableNode.h index 27b1f85612..1c2ed58403 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerpNodeableNode.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerpNodeableNode.h @@ -29,7 +29,7 @@ namespace ScriptCanvas AZ::Crc32 GetDataDynamicGroup() const { return AZ_CRC("LerpDataDynamicGroup", 0x62b5f89e); } }; - } + } -} +} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorMul.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorMul.cpp index 62d10ba58d..1eaba6bf17 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorMul.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorMul.cpp @@ -75,7 +75,7 @@ namespace ScriptCanvas break; case Data::eType::Matrix4x4: OperatorEvaluator::Evaluate(OperatorMulImpl(), operands, result); - break; + break; default: AZ_Assert(false, "Multiplication operator not defined for type: %s", Data::ToAZType(type).ToString().c_str()); break; @@ -88,7 +88,7 @@ namespace ScriptCanvas FindModifiableDatumView(slotId, datumView); OnResetDatumToDefaultValue(datumView); - } + } bool OperatorMul::IsValidArithmeticSlot(const SlotId& slotId) const { @@ -110,7 +110,7 @@ namespace ScriptCanvas return (datum != nullptr); } - void OperatorMul::OnResetDatumToDefaultValue(ModifiableDatumView& datumView) + void OperatorMul::OnResetDatumToDefaultValue(ModifiableDatumView& datumView) { Data::Type displayType = GetDisplayType(GetArithmeticDynamicTypeGroup()); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorMul.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorMul.h index e901aa519b..91ec6cc112 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorMul.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorMul.h @@ -29,7 +29,7 @@ namespace ScriptCanvas AZStd::unordered_set< Data::Type > GetSupportedNativeDataTypes() const override; void Operator(Data::eType type, const ArithmeticOperands& operands, Datum& result) override; - + protected: void InitializeSlot(const SlotId& slotId, const ScriptCanvas::Data::Type& dataType) override; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorSub.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorSub.cpp index 1246feb521..82e16591a3 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorSub.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorSub.cpp @@ -50,7 +50,7 @@ namespace ScriptCanvas { const AZ::Matrix3x3* dataRhs = rhs.GetAs(); - return AZ::Matrix3x3::CreateFromColumns(lhs.GetColumn(0) - dataRhs->GetColumn(0), lhs.GetColumn(1) - dataRhs->GetColumn(1), lhs.GetColumn(2) - dataRhs->GetColumn(2)); + return AZ::Matrix3x3::CreateFromColumns(lhs.GetColumn(0) - dataRhs->GetColumn(0), lhs.GetColumn(1) - dataRhs->GetColumn(1), lhs.GetColumn(2) - dataRhs->GetColumn(2)); } }; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorSub.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorSub.h index 2797a4fdea..bf1db9bfe2 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorSub.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorSub.h @@ -17,7 +17,7 @@ namespace ScriptCanvas namespace Operators { //! Node that provides subtraction - class OperatorSub: public OperatorArithmetic + class OperatorSub : public OperatorArithmetic { public: diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Operator.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Operator.cpp index 329b8d4c31..94b42d2829 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Operator.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Operator.cpp @@ -182,7 +182,7 @@ namespace ScriptCanvas break; } } - } + } if (!handledConfiguration) { @@ -250,7 +250,7 @@ namespace ScriptCanvas if (handledConfiguration) { - configurationIter = unhandledConfigurations.erase(configurationIter); + configurationIter = unhandledConfigurations.erase(configurationIter); } else { @@ -296,7 +296,7 @@ namespace ScriptCanvas m_sourceDisplayType = dataType; OnDisplayTypeChanged(dataType); } - } + } } void OperatorBase::OnSlotRemoved(const SlotId& slotId) @@ -319,7 +319,7 @@ namespace ScriptCanvas return nullptr; } - + Slot* OperatorBase::GetFirstOutputSourceSlot() const { for (const SlotId& slotId : m_sourceSlots) @@ -429,7 +429,7 @@ namespace ScriptCanvas bool isInBatchAdd = false; GraphRequestBus::EventResult(isInBatchAdd, GetOwningScriptCanvasId(), &GraphRequests::IsBatchAddingGraphData); - + if (IsSourceSlotId(currentSlotId)) { auto node = AZ::EntityUtils::FindFirstDerivedComponent(endpoint.GetNodeId()); @@ -493,7 +493,7 @@ namespace ScriptCanvas } SlotId OperatorBase::AddSlotWithSourceType() - { + { Data::Type type = Data::Type::Invalid(); if (!m_sourceTypes.empty()) diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Operator.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Operator.h index 7401b60d21..57efee7faf 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Operator.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Operator.h @@ -22,7 +22,7 @@ namespace ScriptCanvas { namespace Operators { - class OperatorBase + class OperatorBase : public ScriptCanvas::Node { public: @@ -41,7 +41,7 @@ namespace ScriptCanvas { SourceType m_sourceType = SourceType::SourceInput; - DynamicDataType m_dynamicDataType = DynamicDataType::Any; + DynamicDataType m_dynamicDataType = DynamicDataType::Any; AZStd::string m_name; AZStd::string m_tooltip; @@ -103,7 +103,7 @@ namespace ScriptCanvas virtual void OnInputSlotAdded(const SlotId& inputSlotId) { AZ_UNUSED(inputSlotId); }; virtual void OnDataInputSlotConnected([[maybe_unused]] const SlotId& slotId, [[maybe_unused]] const Endpoint& endpoint) {} - virtual void OnDataInputSlotDisconnected([[maybe_unused]] const SlotId& slotId, [[maybe_unused]] const Endpoint& endpoint) {} + virtual void OnDataInputSlotDisconnected([[maybe_unused]] const SlotId& slotId, [[maybe_unused]] const Endpoint& endpoint) {} AZ::BehaviorMethod* GetOperatorMethod(const char* methodName); @@ -121,13 +121,6 @@ namespace ScriptCanvas virtual void OnSourceConnected([[maybe_unused]] const SlotId& slotId) {} virtual void OnSourceDisconnected([[maybe_unused]] const SlotId& slotId) {} - //! Implements the operator's behavior, the vector of Datums represents the list of operands. - virtual void Evaluate(const OperatorOperands& operands, Datum& result) - { - AZ_UNUSED(operands); - AZ_UNUSED(result); - } - private: OperatorConfiguration m_operatorConfiguration; @@ -180,32 +173,6 @@ namespace ScriptCanvas } } }; - - // Base class for an small helper object that wraps the function to invoke - class OperationHelper - { - public: - - Datum operator()(const AZStd::vector& operands, Datum& result) - { - AZStd::vector::const_iterator operand = operands.begin(); - result = *operand; - for (++operand; operand != operands.end(); ++operand) - { - result = Operator(result, *operand); - } - - return result; - } - - protected: - virtual Datum Operator(const Datum&, const Datum&) = 0; - }; - -// Helper macro to invoke an operator function for a specialized type -#define CallOperatorFunction(Operator, DataType, Type) \ - if (DataType == Data::FromAZType(azrtti_typeid())) { Operator operation; operation(operands, result); } - } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Operators.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Operators.cpp index 6a35c246c9..b1ee7bf471 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Operators.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Operators.cpp @@ -49,7 +49,7 @@ namespace ScriptCanvas void Operators::InitNodeRegistry(NodeRegistry& nodeRegistry) { using namespace ScriptCanvas::Nodes::Operators; - + // Math AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Spawning/SpawnNodeable.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Spawning/SpawnNodeable.h index 3a913826c2..05bf91f5dd 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Spawning/SpawnNodeable.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Spawning/SpawnNodeable.h @@ -20,8 +20,8 @@ namespace ScriptCanvas::Nodeables::Spawning { class SpawnNodeable - : public ScriptCanvas::Nodeable, - public AZ::TickBus::Handler + : public ScriptCanvas::Nodeable + , public AZ::TickBus::Handler { SCRIPTCANVAS_NODE(SpawnNodeable); public: diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Contains.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Contains.cpp index b88b2edbd3..ec43c1fc8b 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Contains.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Contains.cpp @@ -52,32 +52,6 @@ namespace ScriptCanvas } } - void Contains::OnInputSignal(const SlotId&) - { - AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::ScriptCanvas, "ScriptCanvas::Contains::OnInputSignal"); - - AZStd::string sourceString = ContainsProperty::GetSource(this); - AZStd::string patternString = ContainsProperty::GetPattern(this); - - bool caseSensitive = ContainsProperty::GetCaseSensitive(this); - bool searchFromEnd = ContainsProperty::GetSearchFromEnd(this); - - auto index = AzFramework::StringFunc::Find(sourceString.c_str(), patternString.c_str(), 0, searchFromEnd, caseSensitive); - if (index != AZStd::string::npos) - { - const SlotId outputIndexSlotId = ContainsProperty::GetIndexSlotId(this); - if (auto* indexSlot = GetSlot(outputIndexSlotId)) - { - Datum outputIndex(index); - PushOutput(outputIndex, *indexSlot); - } - - SignalOutput(GetSlotId("True")); - return; - } - - SignalOutput(GetSlotId("False")); - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Contains.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Contains.h index e2756f6ebf..d877972a1a 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Contains.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Contains.h @@ -29,10 +29,6 @@ namespace ScriptCanvas void OnInit() override; void CustomizeReplacementNode(Node* replacementNode, AZStd::unordered_map>& outSlotIdMap) const override; - protected: - - void OnInputSignal(const SlotId& slotId) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Format.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Format.cpp index 1b71390e0c..b362209cb0 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Format.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Format.cpp @@ -6,27 +6,3 @@ */ #include "Format.h" - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace String - { - void Format::OnInputSignal(const SlotId&) - { - AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::ScriptCanvas, "ScriptCanvas::Format::OnInputSignal"); - - Datum output = Datum(ProcessFormat()); - - const SlotId outputTextSlotId = FormatProperty::GetStringSlotId(this); - if (auto* slot = GetSlot(outputTextSlotId)) - { - PushOutput(output, *slot); - } - - SignalOutput(GetSlotId("Out")); - } - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Format.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Format.h index 6e5c50d2ae..2fd606a422 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Format.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Format.h @@ -23,12 +23,8 @@ namespace ScriptCanvas class Format : public Internal::StringFormatted { - protected: - + public: SCRIPTCANVAS_NODE(Format); - - void OnInputSignal(const SlotId& slotId) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Print.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Print.cpp deleted file mode 100644 index 26f3716b6a..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Print.cpp +++ /dev/null @@ -1,39 +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 "Print.h" - -#include -#include - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace String - { - void Print::OnInputSignal([[maybe_unused]] const SlotId& slotId) - { -#if !defined(PERFORMANCE_BUILD) && !defined(_RELEASE) - AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::ScriptCanvas, "ScriptCanvas::Print::OnInputSignal"); - - AZStd::string text = ProcessFormat(); - - AZ_TracePrintf("Script Canvas", "%s\n", text.c_str()); - LogNotificationBus::Event(GetOwningScriptCanvasId(), &LogNotifications::LogMessage, text); - - AZ::EntityId assetNodeId{}; - ScriptCanvas::RuntimeRequestBus::EventResult(assetNodeId, GetOwningScriptCanvasId(), &ScriptCanvas::RuntimeRequests::FindAssetNodeIdByRuntimeNodeId, GetEntityId()); - - SC_EXECUTION_TRACE_ANNOTATE_NODE((*this), (AnnotateNodeSignal(CreateGraphInfo(GetOwningScriptCanvasId(), GetGraphIdentifier()), AnnotateNodeSignal::AnnotationLevel::Info, text, AZ::NamedEntityId(assetNodeId, GetNodeName())))); -#endif - SignalOutput(GetSlotId("Out")); - - } - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Print.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Print.h index 0f971f99e7..1c16e30cd6 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Print.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Print.h @@ -8,9 +8,7 @@ #pragma once #include - #include - #include namespace ScriptCanvas @@ -23,12 +21,8 @@ namespace ScriptCanvas class Print : public Internal::StringFormatted { - protected: - + public: SCRIPTCANVAS_NODE(Print); - - void OnInputSignal(const SlotId&) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Replace.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Replace.cpp index 56a7ae2ef8..57e2510baa 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Replace.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Replace.cpp @@ -51,28 +51,6 @@ namespace ScriptCanvas } } - void Replace::OnInputSignal(const SlotId&) - { - AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::ScriptCanvas, "ScriptCanvas::Replace::OnInputSignal"); - - AZStd::string sourceString = ReplaceProperty::GetSource(this); - AZStd::string replaceString = ReplaceProperty::GetReplace(this); - AZStd::string withString = ReplaceProperty::GetWith(this); - - bool caseSensitive = ReplaceProperty::GetCaseSensitive(this); - - AzFramework::StringFunc::Replace(sourceString, replaceString.c_str(), withString.c_str(), caseSensitive); - - const SlotId outputResultSlotId = ReplaceProperty::GetResultSlotId(this); - - ScriptCanvas::Datum output(sourceString); - if (auto* outputSlot = GetSlot(outputResultSlotId)) - { - PushOutput(output, *outputSlot); - } - - SignalOutput(GetSlotId("Out")); - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Replace.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Replace.h index 6c69818ac9..db31a85a82 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Replace.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Replace.h @@ -28,11 +28,6 @@ namespace ScriptCanvas void OnInit() override; void CustomizeReplacementNode(Node* replacementNode, AZStd::unordered_map>& outSlotIdMap) const override; - - protected: - - void OnInputSignal(const SlotId& slotId) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Utilities.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Utilities.cpp index ad36615e26..959b8ef3c8 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Utilities.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Utilities.cpp @@ -31,108 +31,15 @@ namespace ScriptCanvas } } - void StartsWith::OnInputSignal(const SlotId&) - { - AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::ScriptCanvas, "ScriptCanvas::StartsWith::OnInputSignal"); - - AZStd::string sourceString = StartsWithProperty::GetSource(this); - AZStd::string patternString = StartsWithProperty::GetPattern(this); - - bool caseSensitive = StartsWithProperty::GetCaseSensitive(this); - - if (AzFramework::StringFunc::StartsWith(sourceString.c_str(), patternString.c_str(), caseSensitive)) - { - SignalOutput(GetSlotId("True")); - } - else - { - SignalOutput(GetSlotId("False")); - } - } - - void EndsWith::OnInputSignal(const SlotId&) - { - AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::ScriptCanvas, "ScriptCanvas::EndssWith::OnInputSignal"); - - AZStd::string sourceString = EndsWithProperty::GetSource(this); - AZStd::string patternString = EndsWithProperty::GetPattern(this); - - bool caseSensitive = EndsWithProperty::GetCaseSensitive(this); - - if (AzFramework::StringFunc::EndsWith(sourceString.c_str(), patternString.c_str(), caseSensitive)) - { - SignalOutput(GetSlotId("True")); - } - else - { - SignalOutput(GetSlotId("False")); - } - } - void Split::CustomizeReplacementNode(Node* replacementNode, AZStd::unordered_map>& outSlotIdMap) const { ReplaceStringUtilityNodeOutputSlot(this, replacementNode, outSlotIdMap); } - void Split::OnInputSignal(const SlotId&) - { - AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::ScriptCanvas, "ScriptCanvas::Split::OnInputSignal"); - - AZStd::string sourceString = SplitProperty::GetSource(this); - AZStd::string delimiterString = SplitProperty::GetDelimiters(this); - - AZStd::vector stringArray; - - AzFramework::StringFunc::Tokenize(sourceString.c_str(), stringArray, delimiterString.c_str(), false, false); - - const SlotId outputResultSlotId = SplitProperty::GetStringArraySlotId(this); - if (auto* outputSlot = GetSlot(outputResultSlotId)) - { - ScriptCanvas::Datum output(ScriptCanvas::Data::FromAZType(azrtti_typeid>()), ScriptCanvas::Datum::eOriginality::Original, &stringArray, azrtti_typeid>()); - PushOutput(output, *outputSlot); - } - - SignalOutput(GetSlotId("Out")); - } - void Join::CustomizeReplacementNode(Node* replacementNode, AZStd::unordered_map>& outSlotIdMap) const { ReplaceStringUtilityNodeOutputSlot(this, replacementNode, outSlotIdMap); } - - void Join::OnInputSignal(const SlotId&) - { - AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::ScriptCanvas, "ScriptCanvas::Join::OnInputSignal"); - - AZStd::vector sourceArray = JoinProperty::GetStringArray(this); - AZStd::string separatorString = JoinProperty::GetSeparator(this); - - AZStd::string result; - size_t index = 0; - const size_t length = sourceArray.size(); - for (auto string : sourceArray) - { - if (index < length - 1) - { - result.append(AZStd::string::format("%s%s", string.c_str(), separatorString.c_str())); - } - else - { - result.append(string); - } - ++index; - } - - const SlotId outputResultSlotId = JoinProperty::GetStringSlotId(this); - if (auto* outputSlot = GetSlot(outputResultSlotId)) - { - ScriptCanvas::Datum output(result); - PushOutput(output, *outputSlot); - } - - SignalOutput(GetSlotId("Out")); - } - } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Utilities.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Utilities.h index c1dad1f0e5..fef7fb2bd7 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Utilities.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Utilities.h @@ -24,10 +24,6 @@ namespace ScriptCanvas { public: SCRIPTCANVAS_NODE(StartsWith); - protected: - - void OnInputSignal(const SlotId& slotId) override; - }; //! Deprecated: see class String's reflection of method "Ends With" @@ -36,10 +32,6 @@ namespace ScriptCanvas { public: SCRIPTCANVAS_NODE(EndsWith); - protected: - - void OnInputSignal(const SlotId& slotId) override; - }; //! Deprecated: see class String's reflection of method "Ends With" @@ -55,9 +47,6 @@ namespace ScriptCanvas protected: static const char* k_defaultDelimiter; - - void OnInputSignal(const SlotId& slotId) override; - }; //! Deprecated: see class String's reflection of method "Join" @@ -73,9 +62,6 @@ namespace ScriptCanvas protected: static const char* k_defaultSeparator; - - void OnInputSignal(const SlotId& slotId) override; - }; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Countdown.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Countdown.cpp index ee06418e68..f9afd2b80c 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Countdown.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Countdown.cpp @@ -38,28 +38,11 @@ namespace ScriptCanvas } } - void TimeDelay::OnInputSignal(const SlotId& slotId) - { - if (slotId == TimeDelayProperty::GetInSlotId(this)) - { - if (!IsActive()) - { - StartTimer(); - } - } - } - bool TimeDelay::AllowInstantResponse() const { return true; } - void TimeDelay::OnTimeElapsed() - { - StopTimer(); - SignalOutput(TimeDelayProperty::GetOutSlotId(this)); - } - ////////////// // TickDelay ////////////// @@ -85,56 +68,6 @@ namespace ScriptCanvas { } - void TickDelay::OnDeactivate() - { - AZ::TickBus::Handler::BusDisconnect(); - AZ::SystemTickBus::Handler::BusDisconnect(); - } - - void TickDelay::OnInputSignal(const SlotId&) - { - m_tickCounter = TickDelayProperty::GetTicks(this); - - if (m_tickCounter >= 0) - { - if (!AZ::SystemTickBus::Handler::BusIsConnected()) - { - AZ::SystemTickBus::Handler::BusConnect(); - } - } - } - - void TickDelay::OnSystemTick() - { - AZ::SystemTickBus::Handler::BusDisconnect(); - - if (!AZ::TickBus::Handler::BusIsConnected()) - { - AZ::TickBus::Handler::BusDisconnect(); - } - - m_tickOrder = TickDelayProperty::GetTickOrder(this); - AZ::TickBus::Handler::BusConnect(); - } - - void TickDelay::OnTick(float, AZ::ScriptTimePoint) - { - --m_tickCounter; - - if (m_tickCounter <= 0) - { - const SlotId outSlot = TickDelayProperty::GetOutSlotId(this); - - SignalOutput(outSlot); - AZ::TickBus::Handler::BusDisconnect(); - } - } - - int TickDelay::GetTickOrder() - { - return m_tickOrder; - } - ////////////// // CountDown ////////////// @@ -148,86 +81,12 @@ namespace ScriptCanvas , m_currentTime(0.) {} - void Countdown::OnInputSignal(const SlotId& slot) - { - SlotId inSlotId = CountdownProperty::GetInSlotId(this); - SlotId resetSlotId = CountdownProperty::GetResetSlotId(this); - SlotId cancelSlotId = CountdownProperty::GetCancelSlotId(this); - - if (slot == resetSlotId || (slot == inSlotId && !AZ::TickBus::Handler::BusIsConnected())) - { - // If we're resetting, we need to disconnect. - AZ::TickBus::Handler::BusDisconnect(); - - m_countdownSeconds = CountdownProperty::GetTime(this); - m_looping = CountdownProperty::GetLoop(this); - m_holdTime = CountdownProperty::GetHold(this); - - m_currentTime = m_countdownSeconds; - - AZ::TickBus::Handler::BusConnect(); - } - else if (slot == cancelSlotId) - { - m_holding = false; - m_currentTime = 0.f; - - AZ::TickBus::Handler::BusDisconnect(); - } - } - bool Countdown::IsOutOfDate(const VersionData& graphVersion) const { AZ_UNUSED(graphVersion); return !CountdownProperty::GetCancelSlotId(this).IsValid(); } - void Countdown::OnTick(float deltaTime, AZ::ScriptTimePoint) - { - m_currentTime -= static_cast(deltaTime); - - if (m_currentTime <= 0.f) - { - if (m_holding) - { - m_holding = false; - m_currentTime = m_countdownSeconds; - return; - } - else - { - const SlotId outSlot = CountdownProperty::GetOutSlotId(this); - - if (Slot* elapsedSlot = CountdownProperty::GetElapsedSlot(this)) - { - float elapsedTime = m_countdownSeconds - m_currentTime; - - Datum o(Data::Type::Number(), Datum::eOriginality::Copy); - o.Set(elapsedTime); - - PushOutput(o, *elapsedSlot); - } - - SignalOutput(outSlot); - } - - if (!m_looping) - { - AZ::TickBus::Handler::BusDisconnect(); - } - else - { - m_holding = m_holdTime > 0.f; - m_currentTime = m_holding ? m_holdTime : m_countdownSeconds; - } - } - } - - void Countdown::OnDeactivate() - { - AZ::TickBus::Handler::BusDisconnect(); - } - UpdateResult Countdown::OnUpdateNode() { // Add in the missing cancel slot diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Countdown.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Countdown.h index 1809bece64..00bc52edfa 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Countdown.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Countdown.h @@ -36,10 +36,8 @@ namespace ScriptCanvas TimeDelay() = default; - void OnInputSignal(const SlotId&) override; bool AllowInstantResponse() const override; - void OnTimeElapsed() override; const char* GetBaseTimeSlotToolTip() const override { return "The amount of time to delay before the Out is signalled."; } @@ -48,8 +46,6 @@ namespace ScriptCanvas // Deprecated: see TimeDelayNodeableNode class TickDelay : public Node - , AZ::TickBus::Handler - , AZ::SystemTickBus::Handler { public: @@ -59,18 +55,6 @@ namespace ScriptCanvas void CustomizeReplacementNode(Node* replacementNode, AZStd::unordered_map>& outSlotIdMap) const override; - void OnDeactivate() override; - void OnInputSignal(const SlotId&) override; - - // SystemTickBus... - void OnSystemTick() override; - //// - - // TickBus... - void OnTick(float deltaTime, AZ::ScriptTimePoint timePoint) override; - int GetTickOrder() override; - //// - protected: int m_tickCounter; @@ -78,9 +62,8 @@ namespace ScriptCanvas }; //! Deprecated: see DelayNodeableNode - class Countdown + class Countdown : public Node - , AZ::TickBus::Handler { public: @@ -101,8 +84,6 @@ namespace ScriptCanvas //! Internal counter to track time elapsed float m_currentTime; - void OnInputSignal(const SlotId&) override; - bool ShowHoldTime() const { // TODO: This only works on the property grid. If a true value is connected to the "SetLoop" slot, @@ -114,12 +95,6 @@ namespace ScriptCanvas protected: - void OnDeactivate() override; - - // AZ::TickBus - void OnTick(float deltaTime, AZ::ScriptTimePoint time) override; - //// - UpdateResult OnUpdateNode() override; }; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/DelayNodeable.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/DelayNodeable.h index 260f0dd5f0..8d3231f170 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/DelayNodeable.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/DelayNodeable.h @@ -21,13 +21,13 @@ namespace ScriptCanvas { namespace Time { - class DelayNodeable + class DelayNodeable : public ScriptCanvas::Nodeable , public AZ::TickBus::Handler { public: SCRIPTCANVAS_NODE(DelayNodeable); - + protected: void OnDeactivate() override; @@ -43,7 +43,7 @@ namespace ScriptCanvas float m_currentTime = 0.0f; float m_holdTime = 0.0f; - void InitiateCountdown(bool reset, float countdownSeconds, bool looping, float holdTime); + void InitiateCountdown(bool reset, float countdownSeconds, bool looping, float holdTime); }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Duration.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Duration.cpp index c1e47e21b9..e7f9413166 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Duration.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Duration.cpp @@ -21,48 +21,6 @@ namespace ScriptCanvas , m_elapsedTime(0.f) , m_currentTime(0.) {} - - void Duration::OnInputSignal(const SlotId&) - { - m_durationSeconds = DurationProperty::GetDuration(this); - m_elapsedTime = 0.f; - - m_currentTime = m_durationSeconds; - - AZ::TickBus::Handler::BusConnect(); - } - - void Duration::OnTick(float deltaTime, [[maybe_unused]] AZ::ScriptTimePoint time) - { - const SlotId outSlot = DurationProperty::GetOutSlotId(this); - const SlotId doneSlot = DurationProperty::GetDoneSlotId(this); - const SlotId elapsedSlot = DurationProperty::GetElapsedSlotId(this); - - if (m_currentTime > 0.f) - { - Datum o(Data::Type::Number(), Datum::eOriginality::Copy); - o.Set(m_elapsedTime); - if (auto* slot = GetSlot(elapsedSlot)) - { - PushOutput(o, *slot); - } - - SignalOutput(outSlot); - - m_currentTime -= static_cast(deltaTime); - m_elapsedTime += static_cast(deltaTime); - } - else - { - SignalOutput(doneSlot); - AZ::TickBus::Handler::BusDisconnect(); - } - } - - void Duration::OnDeactivate() - { - AZ::TickBus::Handler::BusDisconnect(); - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Duration.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Duration.h index dd6c7868cf..98136225c6 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Duration.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Duration.h @@ -23,9 +23,8 @@ namespace ScriptCanvas namespace Time { //! Deprecated: see DurationNodeableNode - class Duration + class Duration : public Node - , AZ::TickBus::Handler { public: @@ -41,14 +40,6 @@ namespace ScriptCanvas //! Internal counter to track time elapsed float m_currentTime; - - void OnInputSignal(const SlotId&) override; - - protected: - - void OnDeactivate() override; - void OnTick(float deltaTime, AZ::ScriptTimePoint time) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/DurationNodeable.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/DurationNodeable.h index 2915232cff..1b0169699b 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/DurationNodeable.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/DurationNodeable.h @@ -21,7 +21,7 @@ namespace ScriptCanvas { namespace Time { - class DurationNodeable + class DurationNodeable : public ScriptCanvas::Nodeable , public AZ::TickBus::Handler { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/HeartBeat.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/HeartBeat.cpp index 62ed77ab2f..350a64923e 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/HeartBeat.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/HeartBeat.cpp @@ -38,22 +38,6 @@ namespace ScriptCanvas } } - void HeartBeat::OnInputSignal(const SlotId& slotId) - { - if (slotId == HeartBeatProperty::GetStartSlotId(this)) - { - StartTimer(); - } - else if (slotId == HeartBeatProperty::GetStopSlotId(this)) - { - StopTimer(); - } - } - - void HeartBeat::OnTimeElapsed() - { - SignalOutput(HeartBeatProperty::GetPulseSlotId(this)); - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/HeartBeat.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/HeartBeat.h index 967376e932..1e12395834 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/HeartBeat.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/HeartBeat.h @@ -27,16 +27,13 @@ namespace ScriptCanvas void CustomizeReplacementNode(Node* replacementNode, AZStd::unordered_map>& outSlotIdMap) const override; - void OnInputSignal(const SlotId&) override; - const char* GetBaseTimeSlotName() const override { return "Interval"; } const char* GetBaseTimeSlotToolTip() const override { return "The amount of time between pulses."; } protected: - void OnTimeElapsed() override; - }; + }; } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Time.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Time.cpp index 7a6e5bc859..e55ddb3b35 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Time.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Time.cpp @@ -57,7 +57,7 @@ namespace ScriptCanvas AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); } - + AZStd::vector Time::GetComponentDescriptors() { return AZStd::vector({ @@ -73,7 +73,7 @@ namespace ScriptCanvas ScriptCanvas::Nodes::HeartBeatNodeableNode::CreateDescriptor(), ScriptCanvas::Nodes::TimeDelayNodeableNode::CreateDescriptor(), ScriptCanvas::Nodes::TimerNodeableNode::CreateDescriptor(), - }); + }); } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Timer.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Timer.cpp index 0465c49b43..8fb5d666fa 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Timer.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Timer.cpp @@ -20,54 +20,6 @@ namespace ScriptCanvas , m_seconds(0.f) , m_milliseconds(0.f) {} - - void Timer::OnTick([[maybe_unused]] float deltaTime, AZ::ScriptTimePoint time) - { - const SlotId millisecondsSlot = TimerProperty::GetMillisecondsSlotId(this); - - double milliseconds = time.GetMilliseconds() - m_start.GetMilliseconds(); - Datum objms(Data::Type::Number(), Datum::eOriginality::Copy); - objms.Set(milliseconds); - if (auto* slot = GetSlot(millisecondsSlot)) - { - PushOutput(objms, *slot); - } - - const SlotId secondsSlot = TimerProperty::GetSecondsSlotId(this); - - double seconds = time.GetSeconds() - m_start.GetSeconds(); - Datum objs(Data::Type::Number(), Datum::eOriginality::Copy); - objs.Set(seconds); - if (auto* slot = GetSlot(secondsSlot)) - { - PushOutput(objs, *slot); - } - - const SlotId outSlot = TimerProperty::GetOutSlotId(this); - SignalOutput(outSlot); - - } - - void Timer::OnInputSignal(const SlotId& slotId) - { - const SlotId startSlot = TimerProperty::GetStartSlotId(this); - const SlotId stopSlot = TimerProperty::GetStopSlotId(this); - - if (slotId == startSlot) - { - AZ::TickBus::Handler::BusConnect(); - m_start = AZ::ScriptTimePoint(); - } - else if (slotId == stopSlot) - { - AZ::TickBus::Handler::BusDisconnect(); - } - } - - void Timer::OnDeactivate() - { - AZ::TickBus::Handler::BusDisconnect(); - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Timer.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Timer.h index 58ba646891..8cabda3f15 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Timer.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Timer.h @@ -23,28 +23,17 @@ namespace ScriptCanvas namespace Time { //! Deprecated: See TimerNodeableNode - class Timer + class Timer : public Node - , AZ::TickBus::Handler { public: SCRIPTCANVAS_NODE(Timer); Timer(); - + float m_seconds; float m_milliseconds; - - protected: - - AZ::ScriptTimePoint m_start; - - void OnInputSignal(const SlotId& slotId) override; - - void OnDeactivate() override; - void OnTick(float deltaTime, AZ::ScriptTimePoint time) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/TimerNodeable.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/TimerNodeable.h index 2e73dc524c..e2de4b25ba 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/TimerNodeable.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/TimerNodeable.h @@ -21,7 +21,7 @@ namespace ScriptCanvas { namespace Time { - class TimerNodeable + class TimerNodeable : public Nodeables::Time::BaseTimer { SCRIPTCANVAS_NODE(TimerNodeable); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/AddFailure.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/AddFailure.cpp index 301db76008..b27065aca2 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/AddFailure.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/AddFailure.cpp @@ -9,19 +9,3 @@ #include "UnitTestBus.h" -namespace ScriptCanvas -{ - namespace Nodes - { - namespace UnitTesting - { - void AddFailure::OnInputSignal([[maybe_unused]] const SlotId& slotId) - { - const auto report = FindDatum(GetSlotId("Report"))->GetAs(); - ScriptCanvas::UnitTesting::Bus::Event(GetOwningScriptCanvasId(), &ScriptCanvas::UnitTesting::BusTraits::AddFailure, *report); - - SignalOutput(GetSlotId("Out")); - } - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/AddFailure.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/AddFailure.h index 1c0e5a6fd4..88d7ab5e24 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/AddFailure.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/AddFailure.h @@ -23,9 +23,6 @@ namespace ScriptCanvas public: SCRIPTCANVAS_NODE(AddFailure); - - void OnInputSignal(const SlotId& slotId) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/AddSuccess.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/AddSuccess.cpp deleted file mode 100644 index ee9b8975b0..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/AddSuccess.cpp +++ /dev/null @@ -1,30 +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 "AddSuccess.h" - -#include "UnitTestBus.h" - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace UnitTesting - { - void AddSuccess::OnInputSignal([[maybe_unused]] const SlotId& slotId) - { - const auto report = FindDatum(GetSlotId("Report"))->GetAs(); - ScriptCanvas::UnitTesting::Bus::Event - ( GetOwningScriptCanvasId() - , &ScriptCanvas::UnitTesting::BusTraits::AddSuccess - , *report); - - SignalOutput(GetSlotId("Out")); - } - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/AddSuccess.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/AddSuccess.h index c6793ad432..68f494bb72 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/AddSuccess.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/AddSuccess.h @@ -23,9 +23,6 @@ namespace ScriptCanvas public: SCRIPTCANVAS_NODE(AddSuccess); - - void OnInputSignal(const SlotId& slotId) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/Auxiliary/Auxiliary.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/Auxiliary/Auxiliary.cpp index dff5dff30c..d9da655cc3 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/Auxiliary/Auxiliary.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/Auxiliary/Auxiliary.cpp @@ -37,8 +37,8 @@ namespace ScriptCanvas } const char* StringConversion::CStyleToCStyle(const char* input) - { - return input; + { + return input; } void StringConversion::Reflect(AZ::ReflectContext* reflection) @@ -69,17 +69,17 @@ namespace ScriptCanvas ->Field("outcomeVector3Void", &TypeExposition::m_outcomeVector3Void) ; } - + if (auto behaviorContext = azrtti_cast(reflection)) { behaviorContext->Class("TypeExposition") ->Method("Reflect_AZStd::array", [](AZStd::array& vector) { return vector.size(); }) - ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All) + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All) ->Method("Reflect_AZ::Outcome", [](AZ::Outcome& vector) { return vector.IsSuccess(); }) - ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All) + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All) ; } } } - } -} + } +} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/Auxiliary/Auxiliary.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/Auxiliary/Auxiliary.h index 94c307e07d..a56dd8775b 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/Auxiliary/Auxiliary.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/Auxiliary/Auxiliary.h @@ -36,14 +36,14 @@ namespace ScriptCanvas }; using EBus = AZ::EBus; - - class EBusHandler + + class EBusHandler : public EBus::Handler , public AZ::BehaviorEBusHandler { public: AZ_EBUS_BEHAVIOR_BINDER - ( EBusHandler + (EBusHandler , "{5168D163-AAB9-417D-9FD4-CE10541D51CE}" , AZ::SystemAllocator , CStyleToCStyle @@ -95,14 +95,14 @@ namespace ScriptCanvas return result; } }; - + class StringConversion { public: AZ_TYPE_INFO(StringConversion, "{47A9CF0C-6F34-4E0C-B1F9-F908FC2B7388}"); static const char* CStyleToCStyle(const char* input); - + static void Reflect(AZ::ReflectContext* reflection); }; @@ -118,5 +118,5 @@ namespace ScriptCanvas AZ::Outcome m_outcomeVector3Void; }; } - } -} + } +} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/Checkpoint.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/Checkpoint.cpp deleted file mode 100644 index 5b77bea492..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/Checkpoint.cpp +++ /dev/null @@ -1,28 +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 "Checkpoint.h" - -#include "UnitTestBus.h" - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace UnitTesting - { - void Checkpoint::OnInputSignal([[maybe_unused]] const SlotId& slotId) - { - const auto report = FindDatum(GetSlotId("Report"))->GetAs(); - - ScriptCanvas::UnitTesting::Bus::Event(GetOwningScriptCanvasId(), &ScriptCanvas::UnitTesting::BusTraits::Checkpoint, *report); - - SignalOutput(GetSlotId("Out")); - } - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/Checkpoint.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/Checkpoint.h index 551d250b6b..db7c666a78 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/Checkpoint.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/Checkpoint.h @@ -22,9 +22,6 @@ namespace ScriptCanvas public: SCRIPTCANVAS_NODE(Checkpoint); - - void OnInputSignal(const SlotId& slotId) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectEqual.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectEqual.cpp index 019286355b..142ef9932a 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectEqual.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectEqual.cpp @@ -50,40 +50,6 @@ namespace ScriptCanvas } //// } - - void ExpectEqual::OnInputSignal([[maybe_unused]] const SlotId& slotId) - { - auto lhs = FindDatum(GetSlotId("Candidate")); - if (!lhs) - { - return; - } - - auto rhs = FindDatum(GetSlotId("Reference")); - if (!rhs) - { - return; - } - - if (lhs->GetType() != rhs->GetType()) - { - ScriptCanvas::UnitTesting::Bus::Event - ( GetOwningScriptCanvasId() - , &ScriptCanvas::UnitTesting::BusTraits::AddFailure - , "Type mismatch in comparison operator"); - - SignalOutput(GetSlotId("Out")); - return; - } - - - switch (lhs->GetType().GetType()) - { - SCRIPT_CANVAS_UNIT_TEST_LEGACY_NODE_EQUALITY_IMPLEMENTATIONS(ExpectEqual); - } - - SignalOutput(GetSlotId("Out")); - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectEqual.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectEqual.h index bfb5b4ffb2..623a928aa2 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectEqual.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectEqual.h @@ -25,8 +25,6 @@ namespace ScriptCanvas SCRIPTCANVAS_NODE(ExpectEqual); void OnInit() override; - void OnInputSignal(const SlotId& slotId) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectFalse.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectFalse.cpp index 77bf80fd73..c128f4c30f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectFalse.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectFalse.cpp @@ -33,20 +33,6 @@ namespace ScriptCanvas } //// } - - void ExpectFalse::OnInputSignal([[maybe_unused]] const SlotId& slotId) - { - const auto value = FindDatum(GetSlotId("Candidate"))->GetAs(); - const auto report = FindDatum(GetSlotId("Report"))->GetAs(); - - ScriptCanvas::UnitTesting::Bus::Event - ( GetOwningScriptCanvasId() - , &ScriptCanvas::UnitTesting::BusTraits::ExpectFalse - , *value - , *report); - - SignalOutput(GetSlotId("Out")); - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectFalse.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectFalse.h index ca18f6f2d5..a50cba74d0 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectFalse.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectFalse.h @@ -25,8 +25,6 @@ namespace ScriptCanvas SCRIPTCANVAS_NODE(ExpectFalse); void OnInit() override; - void OnInputSignal(const SlotId& slotId) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThan.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThan.cpp index 28e2f7a8bd..ded5ae7050 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThan.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThan.cpp @@ -50,40 +50,6 @@ namespace ScriptCanvas } //// } - - void ExpectGreaterThan::OnInputSignal([[maybe_unused]] const SlotId& slotId) - { - auto lhs = FindDatum(GetSlotId("Candidate")); - if (!lhs) - { - return; - } - - auto rhs = FindDatum(GetSlotId("Reference")); - if (!rhs) - { - return; - } - - if (lhs->GetType() != rhs->GetType()) - { - ScriptCanvas::UnitTesting::Bus::Event - ( GetOwningScriptCanvasId() - , &ScriptCanvas::UnitTesting::BusTraits::AddFailure - , "Type mismatch in comparison operator"); - - SignalOutput(GetSlotId("Out")); - return; - } - - - switch (lhs->GetType().GetType()) - { - SCRIPT_CANVAS_UNIT_TEST_LEGACY_NODE_COMPARE_IMPLEMENTATIONS(ExpectGreaterThan); - } - - SignalOutput(GetSlotId("Out")); - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThan.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThan.h index d9d7f8630d..94219fab60 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThan.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThan.h @@ -25,8 +25,6 @@ namespace ScriptCanvas SCRIPTCANVAS_NODE(ExpectGreaterThan); void OnInit() override; - void OnInputSignal(const SlotId& slotId) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThanEqual.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThanEqual.cpp index 7b782094de..b2d4279b5c 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThanEqual.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThanEqual.cpp @@ -50,40 +50,6 @@ namespace ScriptCanvas } //// } - - void ExpectGreaterThanEqual::OnInputSignal([[maybe_unused]] const SlotId& slotId) - { - auto lhs = FindDatum(GetSlotId("Candidate")); - if (!lhs) - { - return; - } - - auto rhs = FindDatum(GetSlotId("Reference")); - if (!rhs) - { - return; - } - - if (lhs->GetType() != rhs->GetType()) - { - ScriptCanvas::UnitTesting::Bus::Event - ( GetOwningScriptCanvasId() - , &ScriptCanvas::UnitTesting::BusTraits::AddFailure - , "Type mismatch in comparison operator"); - - SignalOutput(GetSlotId("Out")); - return; - } - - - switch (lhs->GetType().GetType()) - { - SCRIPT_CANVAS_UNIT_TEST_LEGACY_NODE_COMPARE_IMPLEMENTATIONS(ExpectGreaterThanEqual); - } - - SignalOutput(GetSlotId("Out")); - } - } - } -} + } + } +} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThanEqual.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThanEqual.h index 7ef46a9dc9..2607e2569f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThanEqual.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThanEqual.h @@ -25,8 +25,6 @@ namespace ScriptCanvas SCRIPTCANVAS_NODE(ExpectGreaterThanEqual); void OnInit() override; - void OnInputSignal(const SlotId& slotId) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThan.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThan.cpp index 327cfb49b3..1ea4afcf5a 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThan.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThan.cpp @@ -48,41 +48,6 @@ namespace ScriptCanvas SetDynamicGroup(referenceSlot->GetId(), AZ_CRC("DynamicGroup", 0x219a2e3a)); } } - //// - } - - void ExpectLessThan::OnInputSignal([[maybe_unused]] const SlotId& slotId) - { - auto lhs = FindDatum(GetSlotId("Candidate")); - if (!lhs) - { - return; - } - - auto rhs = FindDatum(GetSlotId("Reference")); - if (!rhs) - { - return; - } - - if (lhs->GetType() != rhs->GetType()) - { - ScriptCanvas::UnitTesting::Bus::Event - ( GetOwningScriptCanvasId() - , &ScriptCanvas::UnitTesting::BusTraits::AddFailure - , "Type mismatch in comparison operator"); - - SignalOutput(GetSlotId("Out")); - return; - } - - - switch (lhs->GetType().GetType()) - { - SCRIPT_CANVAS_UNIT_TEST_LEGACY_NODE_COMPARE_IMPLEMENTATIONS(ExpectLessThan); - } - - SignalOutput(GetSlotId("Out")); } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThan.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThan.h index fb9ca5737c..bc8e70a3be 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThan.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThan.h @@ -25,8 +25,6 @@ namespace ScriptCanvas SCRIPTCANVAS_NODE(ExpectLessThan); void OnInit() override; - void OnInputSignal(const SlotId& slotId) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThanEqual.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThanEqual.cpp index 3649816abc..2357ab5068 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThanEqual.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThanEqual.cpp @@ -50,40 +50,6 @@ namespace ScriptCanvas } //// } - - void ExpectLessThanEqual::OnInputSignal([[maybe_unused]] const SlotId& slotId) - { - auto lhs = FindDatum(GetSlotId("Candidate")); - if (!lhs) - { - return; - } - - auto rhs = FindDatum(GetSlotId("Reference")); - if (!rhs) - { - return; - } - - if (lhs->GetType() != rhs->GetType()) - { - ScriptCanvas::UnitTesting::Bus::Event - ( GetOwningScriptCanvasId() - , &ScriptCanvas::UnitTesting::BusTraits::AddFailure - , "Type mismatch in comparison operator"); - - SignalOutput(GetSlotId("Out")); - return; - } - - - switch (lhs->GetType().GetType()) - { - SCRIPT_CANVAS_UNIT_TEST_LEGACY_NODE_COMPARE_IMPLEMENTATIONS(ExpectLessThanEqual); - } - - SignalOutput(GetSlotId("Out")); - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThanEqual.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThanEqual.h index 577aa4f8ff..0408a58a35 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThanEqual.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThanEqual.h @@ -25,8 +25,6 @@ namespace ScriptCanvas SCRIPTCANVAS_NODE(ExpectLessThanEqual); void OnInit() override; - void OnInputSignal(const SlotId& slotId) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectNotEqual.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectNotEqual.cpp index 6b5d3fa98c..1182d7db4f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectNotEqual.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectNotEqual.cpp @@ -50,40 +50,6 @@ namespace ScriptCanvas } //// } - - void ExpectNotEqual::OnInputSignal([[maybe_unused]] const SlotId& slotId) - { - auto lhs = FindDatum(GetSlotId("Candidate")); - if (!lhs) - { - return; - } - - auto rhs = FindDatum(GetSlotId("Reference")); - if (!rhs) - { - return; - } - - if (lhs->GetType() != rhs->GetType()) - { - ScriptCanvas::UnitTesting::Bus::Event - ( GetOwningScriptCanvasId() - , &ScriptCanvas::UnitTesting::BusTraits::AddFailure - , "Type mismatch in comparison operator"); - - SignalOutput(GetSlotId("Out")); - return; - } - - - switch (lhs->GetType().GetType()) - { - SCRIPT_CANVAS_UNIT_TEST_LEGACY_NODE_EQUALITY_IMPLEMENTATIONS(ExpectNotEqual); - } - - SignalOutput(GetSlotId("Out")); - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectNotEqual.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectNotEqual.h index effc011b5a..57b7d09a80 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectNotEqual.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectNotEqual.h @@ -25,8 +25,6 @@ namespace ScriptCanvas SCRIPTCANVAS_NODE(ExpectNotEqual); void OnInit() override; - void OnInputSignal(const SlotId& slotId) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectTrue.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectTrue.cpp index ae0ec8a168..d7b2ca8cf0 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectTrue.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectTrue.cpp @@ -33,16 +33,6 @@ namespace ScriptCanvas } //// } - - void ExpectTrue::OnInputSignal([[maybe_unused]] const SlotId& slotId) - { - const auto value = FindDatum(GetSlotId("Candidate"))->GetAs(); - const auto report = FindDatum(GetSlotId("Report"))->GetAs(); - - ScriptCanvas::UnitTesting::Bus::Event(GetOwningScriptCanvasId(), &ScriptCanvas::UnitTesting::BusTraits::ExpectTrue, *value, *report); - - SignalOutput(GetSlotId("Out")); - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectTrue.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectTrue.h index 6d94dc7403..c5d163bb88 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectTrue.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectTrue.h @@ -25,8 +25,6 @@ namespace ScriptCanvas SCRIPTCANVAS_NODE(ExpectTrue); void OnInit() override; - void OnInputSignal(const SlotId& slotId) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/MarkComplete.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/MarkComplete.cpp deleted file mode 100644 index e7613695e8..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/MarkComplete.cpp +++ /dev/null @@ -1,26 +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 "MarkComplete.h" - -#include "UnitTestBus.h" - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace UnitTesting - { - void MarkComplete::OnInputSignal([[maybe_unused]] const SlotId& slotId) - { - const auto report = FindDatum(GetSlotId("Report"))->GetAs(); - ScriptCanvas::UnitTesting::Bus::Event(GetOwningScriptCanvasId(), &ScriptCanvas::UnitTesting::BusTraits::MarkComplete, *report); - SignalOutput(GetSlotId("Out")); - } - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/MarkComplete.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/MarkComplete.h index 9f86fe5b28..126746019f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/MarkComplete.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/MarkComplete.h @@ -23,9 +23,6 @@ namespace ScriptCanvas public: SCRIPTCANVAS_NODE(MarkComplete); - - void OnInputSignal(const SlotId& slotId) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Results/ErrorText.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Results/ErrorText.h index 339c0fc3a1..928d1d7202 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Results/ErrorText.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Results/ErrorText.h @@ -74,6 +74,7 @@ namespace ScriptCanvas constexpr const char* NotEnoughBranchesForReturn = "Not enough branches for defined out return values."; constexpr const char* NotEnoughInputForArithmeticOperator = "Not enough input for arithmetic operator"; constexpr const char* NullEntityInGraph = "Null entity pointer in graph"; + constexpr const char* NullInputKnown = "The input is known to be null, and the node does not accept it"; constexpr const char* ParseExecutionMultipleOutSyntaxSugarChildExecutionRemovedAndNotReplaced = "ParseExecutionMultipleOutSyntaxSugar: child execution node was removed, and not replaced."; constexpr const char* ParseExecutionMultipleOutSyntaxSugarMismatchOutSize = "ParseExecutionMultipleOutSyntaxSugar: mismatch in connect nodes vs source slots size"; constexpr const char* ParseExecutionMultipleOutSyntaxSugarNonNullChildExecutionFound = "ParseExecutionMultipleOutSyntaxSugar: non null child execution node"; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Translation/GraphToLua.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Translation/GraphToLua.cpp index 772fda4f7e..085a0928bc 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Translation/GraphToLua.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Translation/GraphToLua.cpp @@ -24,8 +24,6 @@ #include #include "GraphToLuaUtility.h" -#include "TranslationContext.h" -#include "TranslationContextBus.h" namespace GraphToLuaCpp { @@ -92,9 +90,7 @@ namespace ScriptCanvas { SystemRequestBus::BroadcastResult(m_systemConfiguration, &SystemRequests::GetSystemComponentConfiguration); MarkTranslationStart(); - RequestBus::BroadcastResult(m_context, &RequestTraits::GetTranslationContext); - AZ_Assert(m_context, "Nothing is possible without the context"); - + m_tableName = GraphToLuaCpp::FileNameToTableName(m_model.GetSource().m_name); m_tableName += m_configuration.m_suffix; @@ -138,12 +134,12 @@ namespace ScriptCanvas const AZStd::string& GraphToLua::FindAbbreviation(AZStd::string_view dependency) const { - return m_context->FindAbbreviation(dependency); + return m_context.FindAbbreviation(dependency); } const AZStd::string& GraphToLua::FindLibrary(AZStd::string_view dependency) const { - return m_context->FindLibrary(dependency); + return m_context.FindLibrary(dependency); } AZStd::string_view GraphToLua::GetOperatorString(Grammar::ExecutionTreeConstPtr execution) @@ -806,7 +802,7 @@ namespace ScriptCanvas m_dotLua.Write("("); - if (execution->IsStart() && execution->IsPure()) + if (execution == m_model.GetStart() && execution->IsPure()) { m_dotLua.Write(Grammar::k_executionStateVariableName); @@ -1589,8 +1585,10 @@ namespace ScriptCanvas break; } - // #functions2 pure on graph start nodes with dependencies can only be added to the graph as variables -// if (execution->IsStart() && execution->IsPure()) + // #functions2 pure on graph start nodes with dependencies can only be added to the graph as variables, which is a work-flow we may never want to support + // as it effectively duplicates the Component-Entity-System. Technically, if this functionality is desired, one could just add another script component + // with the additional graph... +// if (execution->IsStartCall() && execution->IsPure()) // { // WriteFunctionCallInputOfChildStart(execution); // } @@ -1944,7 +1942,7 @@ namespace ScriptCanvas { const auto requirement = ParseConstructionRequirement(variable); - if (requirement == Grammar::VariableConstructionRequirement::None || (requirement != Grammar::VariableConstructionRequirement::Static && !execution->IsStart())) + if (requirement == Grammar::VariableConstructionRequirement::None || (requirement != Grammar::VariableConstructionRequirement::Static && !execution->IsStartCall())) { m_dotLua.WriteLineIndented("local %s = %s", variable->m_name.data(), ToValueString(variable->m_datum, m_configuration).data()); } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Translation/GraphToLua.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Translation/GraphToLua.h index ba46b21c65..347cb764e9 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Translation/GraphToLua.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Translation/GraphToLua.h @@ -16,6 +16,7 @@ #include #include "GraphToX.h" +#include "TranslationContext.h" #include "TranslationResult.h" #include "TranslationUtilities.h" @@ -60,7 +61,7 @@ namespace ScriptCanvas RuntimeInputs m_runtimeInputs; BuildConfiguration m_executionConfig = BuildConfiguration::Release; FunctionBlockConfig m_functionBlockConfig = FunctionBlockConfig::Ignored; - const Context* m_context = nullptr; + Context m_context; AZStd::string m_tableName; Writer m_dotLua; SystemComponentConfiguration m_systemConfiguration; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Translation/TranslationContext.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Translation/TranslationContext.h index ea49f90bde..40f04f2f47 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Translation/TranslationContext.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Translation/TranslationContext.h @@ -10,7 +10,6 @@ #include #include #include "Translation.h" -#include "TranslationContextBus.h" namespace ScriptCanvas { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Translation/TranslationContextBus.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Translation/TranslationContextBus.h deleted file mode 100644 index 0edac2afe3..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Translation/TranslationContextBus.h +++ /dev/null @@ -1,38 +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 "Translation.h" - -namespace ScriptCanvas -{ - namespace Translation - { - class Context; - - struct RequestTraits : public AZ::EBusTraits - { - static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; - - virtual Context* GetTranslationContext() = 0; - }; - - using RequestBus = AZ::EBus; - - struct EventTraits : public AZ::EBusTraits - { - static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; - }; - - using EventBus = AZ::EBus; - - } - -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/GraphVariable.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/GraphVariable.cpp index ece0357626..058489374f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/GraphVariable.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/GraphVariable.cpp @@ -10,7 +10,6 @@ #include #include #include -#include #include namespace ScriptCanvas @@ -412,37 +411,6 @@ namespace ScriptCanvas return AZ::Edit::PropertyVisibility::Show; } - AZ::Crc32 GraphVariable::GetScriptInputControlVisibility() const - { - AZ::Data::AssetType assetType = AZ::Data::AssetType::CreateNull(); - - ScriptCanvas::RuntimeRequestBus::EventResult(assetType, m_scriptCanvasId, &ScriptCanvas::RuntimeRequests::GetAssetType); - - if (assetType == azrtti_typeid()) - { - return m_inputControlVisibility; - } - else - { - return AZ::Edit::PropertyVisibility::Hide; - } - } - - AZ::Crc32 GraphVariable::GetFunctionInputControlVisibility() const - { - AZ::Data::AssetType assetType = AZ::Data::AssetType::CreateNull(); - ScriptCanvas::RuntimeRequestBus::EventResult(assetType, m_scriptCanvasId, &ScriptCanvas::RuntimeRequests::GetAssetType); - - if (assetType == azrtti_typeid()) - { - return AZ::Edit::PropertyVisibility::Show; - } - else - { - return AZ::Edit::PropertyVisibility::Hide; - } - } - AZ::Crc32 GraphVariable::GetVisibility() const { return m_visibility; @@ -552,7 +520,7 @@ namespace ScriptCanvas bool GraphVariable::IsInFunction() const { AZ::Data::AssetType assetType = AZ::Data::AssetType::CreateNull(); - ScriptCanvas::RuntimeRequestBus::EventResult(assetType, m_scriptCanvasId, &ScriptCanvas::RuntimeRequests::GetAssetType); + ScriptCanvas::GraphRequestBus::EventResult(assetType, m_scriptCanvasId, &ScriptCanvas::GraphRequests::GetAssetType); return assetType == azrtti_typeid(); } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/GraphVariable.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/GraphVariable.h index b6ad7fcf30..90086ac7f7 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/GraphVariable.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/GraphVariable.h @@ -140,10 +140,8 @@ namespace ScriptCanvas AZ::Crc32 GetInputControlVisibility() const; AZ::Crc32 GetScopeControlVisibility() const; - AZ::Crc32 GetScriptInputControlVisibility() const; AZ::Crc32 GetNetworkSettingsVisibility() const; - AZ::Crc32 GetFunctionInputControlVisibility() const; - + AZ::Crc32 GetVisibility() const; void SetVisibility(AZ::Crc32 visibility); diff --git a/Gems/ScriptCanvas/Code/Source/ScriptCanvasCommonGem.cpp b/Gems/ScriptCanvas/Code/Source/ScriptCanvasCommonGem.cpp index 1c614dc5bc..fe8e8d20df 100644 --- a/Gems/ScriptCanvas/Code/Source/ScriptCanvasCommonGem.cpp +++ b/Gems/ScriptCanvas/Code/Source/ScriptCanvasCommonGem.cpp @@ -11,7 +11,6 @@ #include #include #include -#include #include #include @@ -21,7 +20,6 @@ #include #include #include -#include namespace ScriptCanvas { @@ -42,8 +40,6 @@ namespace ScriptCanvas ScriptCanvas::Node::CreateDescriptor(), ScriptCanvas::Debugger::ServiceComponent::CreateDescriptor(), ScriptCanvas::Graph::CreateDescriptor(), - ScriptCanvasEditor::ScriptCanvasFunctionDataComponent::CreateDescriptor(), - ScriptCanvas::PureData::CreateDescriptor(), ScriptCanvas::GraphVariableManagerComponent::CreateDescriptor(), ScriptCanvas::RuntimeComponent::CreateDescriptor(), diff --git a/Gems/ScriptCanvas/Code/scriptcanvasgem_common_files.cmake b/Gems/ScriptCanvas/Code/scriptcanvasgem_common_files.cmake index 28bcd49fe7..17273b7ae0 100644 --- a/Gems/ScriptCanvas/Code/scriptcanvasgem_common_files.cmake +++ b/Gems/ScriptCanvas/Code/scriptcanvasgem_common_files.cmake @@ -25,9 +25,8 @@ set(FILES Include/ScriptCanvas/Asset/RuntimeAssetHandler.h Include/ScriptCanvas/Asset/ScriptCanvasAssetBase.h Include/ScriptCanvas/Asset/ScriptCanvasAssetData.h - Include/ScriptCanvas/Asset/Functions/ScriptCanvasFunctionAsset.h - Include/ScriptCanvas/Asset/Functions/RuntimeFunctionAssetHandler.cpp - Include/ScriptCanvas/Asset/Functions/RuntimeFunctionAssetHandler.h + Include/ScriptCanvas/Asset/SubgraphInterfaceAssetHandler.cpp + Include/ScriptCanvas/Asset/SubgraphInterfaceAssetHandler.h Include/ScriptCanvas/Core/ScriptCanvasBus.h Include/ScriptCanvas/Core/ExecutionNotificationsBus.cpp Include/ScriptCanvas/Core/ExecutionNotificationsBus.h @@ -35,7 +34,6 @@ set(FILES Include/ScriptCanvas/Core/NodeBus.h Include/ScriptCanvas/Core/EBusNodeBus.h Include/ScriptCanvas/Core/NodelingBus.h - Include/ScriptCanvas/Core/SignalBus.h Include/ScriptCanvas/Core/ContractBus.h Include/ScriptCanvas/Core/Attributes.h Include/ScriptCanvas/Core/Connection.cpp @@ -66,7 +64,6 @@ set(FILES Include/ScriptCanvas/Core/MethodConfiguration.cpp Include/ScriptCanvas/Core/ModifiableDatumView.cpp Include/ScriptCanvas/Core/ModifiableDatumView.h - Include/ScriptCanvas/Core/NativeDatumNode.h Include/ScriptCanvas/Core/Node.cpp Include/ScriptCanvas/Core/Node.h Include/ScriptCanvas/Core/Nodeable.cpp @@ -76,8 +73,6 @@ set(FILES Include/ScriptCanvas/Core/NodeableNodeOverloaded.cpp Include/ScriptCanvas/Core/NodeableNodeOverloaded.h Include/ScriptCanvas/Core/NodeFunctionGeneric.h - Include/ScriptCanvas/Core/PureData.cpp - Include/ScriptCanvas/Core/PureData.h Include/ScriptCanvas/Core/Slot.cpp Include/ScriptCanvas/Core/Slot.h Include/ScriptCanvas/Core/SlotConfigurationDefaults.h @@ -106,7 +101,6 @@ set(FILES Include/ScriptCanvas/Translation/Translation.cpp Include/ScriptCanvas/Translation/TranslationContext.h Include/ScriptCanvas/Translation/TranslationContext.cpp - Include/ScriptCanvas/Translation/TranslationContextBus.h Include/ScriptCanvas/Translation/TranslationResult.h Include/ScriptCanvas/Translation/TranslationResult.cpp Include/ScriptCanvas/Translation/TranslationUtilities.h @@ -131,8 +125,6 @@ set(FILES Include/ScriptCanvas/Core/Contracts/DisplayGroupConnectedSlotLimitContract.h Include/ScriptCanvas/Core/Contracts/DynamicTypeContract.cpp Include/ScriptCanvas/Core/Contracts/DynamicTypeContract.h - Include/ScriptCanvas/Core/Contracts/ExclusivePureDataContract.cpp - Include/ScriptCanvas/Core/Contracts/ExclusivePureDataContract.h Include/ScriptCanvas/Core/Contracts/IsReferenceTypeContract.cpp Include/ScriptCanvas/Core/Contracts/IsReferenceTypeContract.h Include/ScriptCanvas/Core/Contracts/MathOperatorContract.cpp @@ -174,7 +166,6 @@ set(FILES Include/ScriptCanvas/Execution/NativeHostDeclarations.cpp Include/ScriptCanvas/Execution/NativeHostDefinitions.h Include/ScriptCanvas/Execution/NativeHostDefinitions.cpp - Include/ScriptCanvas/Execution/RuntimeBus.h Include/ScriptCanvas/Execution/RuntimeComponent.h Include/ScriptCanvas/Execution/RuntimeComponent.cpp Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedAPI.h @@ -204,11 +195,6 @@ set(FILES Include/ScriptCanvas/Grammar/DebugMap.cpp Include/ScriptCanvas/Grammar/ExecutionTraversalListeners.h Include/ScriptCanvas/Grammar/ExecutionTraversalListeners.cpp - Include/ScriptCanvas/Grammar/FunctionsLegacySupport.h - Include/ScriptCanvas/Grammar/FunctionsLegacySupport.cpp - Include/ScriptCanvas/Grammar/GrammarContext.h - Include/ScriptCanvas/Grammar/GrammarContext.cpp - Include/ScriptCanvas/Grammar/GrammarContextBus.h Include/ScriptCanvas/Grammar/ParsingMetaData.h Include/ScriptCanvas/Grammar/ParsingMetaData.cpp Include/ScriptCanvas/Grammar/ParsingUtilities.h @@ -228,7 +214,6 @@ set(FILES Include/ScriptCanvas/Execution/NativeHostDeclarations.h Include/ScriptCanvas/Execution/NativeHostDefinitions.cpp Include/ScriptCanvas/Execution/NativeHostDefinitions.h - Include/ScriptCanvas/Execution/RuntimeBus.h Include/ScriptCanvas/Execution/RuntimeComponent.cpp Include/ScriptCanvas/Execution/RuntimeComponent.h Include/ScriptCanvas/Internal/Nodeables/BaseTimer.cpp @@ -250,8 +235,6 @@ set(FILES Include/ScriptCanvas/Libraries/Core/AzEventHandler.cpp Include/ScriptCanvas/Libraries/Core/AzEventHandler.h Include/ScriptCanvas/Libraries/Core/AzEventHandler.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/Core/BehaviorContextObjectNode.cpp - Include/ScriptCanvas/Libraries/Core/BehaviorContextObjectNode.h Include/ScriptCanvas/Libraries/Core/BinaryOperator.cpp Include/ScriptCanvas/Libraries/Core/BinaryOperator.h Include/ScriptCanvas/Libraries/Core/CoreNodes.cpp @@ -265,10 +248,6 @@ set(FILES Include/ScriptCanvas/Libraries/Core/ExtractProperty.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Core/EventHandlerTranslationUtility.h Include/ScriptCanvas/Libraries/Core/EventHandlerTranslationUtility.cpp - Include/ScriptCanvas/Libraries/Core/Error.cpp - Include/ScriptCanvas/Libraries/Core/Error.h - Include/ScriptCanvas/Libraries/Core/ErrorHandler.cpp - Include/ScriptCanvas/Libraries/Core/ErrorHandler.h Include/ScriptCanvas/Libraries/Core/ForEach.cpp Include/ScriptCanvas/Libraries/Core/ForEach.h Include/ScriptCanvas/Libraries/Core/ForEach.ScriptCanvasGrammar.xml @@ -311,28 +290,20 @@ set(FILES Include/ScriptCanvas/Libraries/Core/SetVariable.cpp Include/ScriptCanvas/Libraries/Core/SetVariable.h Include/ScriptCanvas/Libraries/Core/SetVariable.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/Core/Start.cpp Include/ScriptCanvas/Libraries/Core/Start.h Include/ScriptCanvas/Libraries/Core/Start.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/Core/String.h Include/ScriptCanvas/Libraries/Core/UnaryOperator.cpp Include/ScriptCanvas/Libraries/Core/UnaryOperator.h Include/ScriptCanvas/Libraries/Entity/Entity.cpp Include/ScriptCanvas/Libraries/Entity/Entity.h - Include/ScriptCanvas/Libraries/Entity/EntityIDNode.h Include/ScriptCanvas/Libraries/Entity/EntityIDNodes.h Include/ScriptCanvas/Libraries/Entity/EntityNodes.h - Include/ScriptCanvas/Libraries/Entity/EntityRef.h - Include/ScriptCanvas/Libraries/Entity/Rotate.cpp - Include/ScriptCanvas/Libraries/Entity/Rotate.h - Include/ScriptCanvas/Libraries/Entity/Rotate.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Entity/RotateMethod.cpp Include/ScriptCanvas/Libraries/Entity/RotateMethod.h Include/ScriptCanvas/Libraries/Logic/And.h Include/ScriptCanvas/Libraries/Logic/Any.cpp Include/ScriptCanvas/Libraries/Logic/Any.h Include/ScriptCanvas/Libraries/Logic/Any.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/Logic/Boolean.h Include/ScriptCanvas/Libraries/Logic/Break.h Include/ScriptCanvas/Libraries/Logic/Break.cpp Include/ScriptCanvas/Libraries/Logic/Break.ScriptCanvasGrammar.xml @@ -342,7 +313,6 @@ set(FILES Include/ScriptCanvas/Libraries/Logic/Gate.cpp Include/ScriptCanvas/Libraries/Logic/Gate.h Include/ScriptCanvas/Libraries/Logic/Gate.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/Logic/Indexer.cpp Include/ScriptCanvas/Libraries/Logic/Indexer.h Include/ScriptCanvas/Libraries/Logic/Indexer.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Logic/IsNull.cpp @@ -350,7 +320,6 @@ set(FILES Include/ScriptCanvas/Libraries/Logic/IsNull.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Logic/Logic.cpp Include/ScriptCanvas/Libraries/Logic/Logic.h - Include/ScriptCanvas/Libraries/Logic/Multiplexer.cpp Include/ScriptCanvas/Libraries/Logic/Multiplexer.h Include/ScriptCanvas/Libraries/Logic/Multiplexer.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Logic/Not.h @@ -373,11 +342,8 @@ set(FILES Include/ScriptCanvas/Libraries/Logic/While.cpp Include/ScriptCanvas/Libraries/Logic/While.h Include/ScriptCanvas/Libraries/Logic/While.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/Math/AABBNode.h Include/ScriptCanvas/Libraries/Math/AABBNodes.h - Include/ScriptCanvas/Libraries/Math/ColorNode.h Include/ScriptCanvas/Libraries/Math/ColorNodes.h - Include/ScriptCanvas/Libraries/Math/CRCNode.h Include/ScriptCanvas/Libraries/Math/CRCNodes.h Include/ScriptCanvas/Libraries/Math/Divide.h Include/ScriptCanvas/Libraries/Math/Math.cpp @@ -389,26 +355,15 @@ set(FILES Include/ScriptCanvas/Libraries/Math/MathNodeUtilities.h Include/ScriptCanvas/Libraries/Math/MathGenerics.h Include/ScriptCanvas/Libraries/Math/MathRandom.h - Include/ScriptCanvas/Libraries/Math/Matrix3x3Node.h Include/ScriptCanvas/Libraries/Math/Matrix3x3Nodes.h - Include/ScriptCanvas/Libraries/Math/Matrix4x4Node.h Include/ScriptCanvas/Libraries/Math/Matrix4x4Nodes.h Include/ScriptCanvas/Libraries/Math/Multiply.h - Include/ScriptCanvas/Libraries/Math/Number.h - Include/ScriptCanvas/Libraries/Math/OBBNode.h Include/ScriptCanvas/Libraries/Math/OBBNodes.h - Include/ScriptCanvas/Libraries/Math/PlaneNode.h Include/ScriptCanvas/Libraries/Math/PlaneNodes.h - Include/ScriptCanvas/Libraries/Math/Random.cpp - Include/ScriptCanvas/Libraries/Math/Random.h - Include/ScriptCanvas/Libraries/Math/Random.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/Math/Rotation.h Include/ScriptCanvas/Libraries/Math/RotationNodes.h Include/ScriptCanvas/Libraries/Math/Subtract.h Include/ScriptCanvas/Libraries/Math/Sum.h - Include/ScriptCanvas/Libraries/Math/Transform.h Include/ScriptCanvas/Libraries/Math/TransformNodes.h - Include/ScriptCanvas/Libraries/Math/Vector.h Include/ScriptCanvas/Libraries/Math/Vector2Nodes.h Include/ScriptCanvas/Libraries/Math/Vector3Nodes.h Include/ScriptCanvas/Libraries/Math/Vector4Nodes.h @@ -461,7 +416,6 @@ set(FILES Include/ScriptCanvas/Libraries/String/Format.cpp Include/ScriptCanvas/Libraries/String/Format.h Include/ScriptCanvas/Libraries/String/Format.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/String/Print.cpp Include/ScriptCanvas/Libraries/String/Print.h Include/ScriptCanvas/Libraries/String/Print.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/String/Replace.cpp @@ -478,10 +432,8 @@ set(FILES Include/ScriptCanvas/Libraries/UnitTesting/AddFailure.cpp Include/ScriptCanvas/Libraries/UnitTesting/AddFailure.h Include/ScriptCanvas/Libraries/UnitTesting/AddFailure.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/UnitTesting/AddSuccess.cpp Include/ScriptCanvas/Libraries/UnitTesting/AddSuccess.h Include/ScriptCanvas/Libraries/UnitTesting/AddSuccess.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/UnitTesting/Checkpoint.cpp Include/ScriptCanvas/Libraries/UnitTesting/Checkpoint.h Include/ScriptCanvas/Libraries/UnitTesting/Checkpoint.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/UnitTesting/ExpectEqual.cpp @@ -508,7 +460,6 @@ set(FILES Include/ScriptCanvas/Libraries/UnitTesting/ExpectTrue.cpp Include/ScriptCanvas/Libraries/UnitTesting/ExpectTrue.h Include/ScriptCanvas/Libraries/UnitTesting/ExpectTrue.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/UnitTesting/MarkComplete.cpp Include/ScriptCanvas/Libraries/UnitTesting/MarkComplete.h Include/ScriptCanvas/Libraries/UnitTesting/MarkComplete.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/UnitTesting/UnitTestBus.h diff --git a/Gems/ScriptCanvas/Code/scriptcanvasgem_editor_builder_files.cmake b/Gems/ScriptCanvas/Code/scriptcanvasgem_editor_builder_files.cmake index a401a0cc1d..339973aa8e 100644 --- a/Gems/ScriptCanvas/Code/scriptcanvasgem_editor_builder_files.cmake +++ b/Gems/ScriptCanvas/Code/scriptcanvasgem_editor_builder_files.cmake @@ -14,5 +14,4 @@ set(FILES Builder/ScriptCanvasBuilderWorker.cpp Builder/ScriptCanvasBuilderWorker.h Builder/ScriptCanvasBuilderWorkerUtility.cpp - Builder/ScriptCanvasFunctionBuilderWorker.cpp ) diff --git a/Gems/ScriptCanvas/Code/scriptcanvasgem_editor_files.cmake b/Gems/ScriptCanvas/Code/scriptcanvasgem_editor_files.cmake index daa2a599ce..309fa83edc 100644 --- a/Gems/ScriptCanvas/Code/scriptcanvasgem_editor_files.cmake +++ b/Gems/ScriptCanvas/Code/scriptcanvasgem_editor_files.cmake @@ -21,8 +21,6 @@ set(FILES Editor/Assets/ScriptCanvasAssetHelpers.h Editor/Assets/ScriptCanvasAssetHelpers.cpp Editor/Assets/ScriptCanvasAssetTrackerDefinitions.h - Editor/Include/ScriptCanvas/Assets/Functions/ScriptCanvasFunctionAssetHandler.h - Editor/Assets/Functions/ScriptCanvasFunctionAssetHandler.cpp Editor/Include/ScriptCanvas/Assets/ScriptCanvasAsset.h Editor/Assets/ScriptCanvasAsset.cpp Editor/Include/ScriptCanvas/Assets/ScriptCanvasAssetBus.h @@ -31,11 +29,6 @@ set(FILES Editor/Assets/ScriptCanvasAssetHandler.cpp Editor/Assets/ScriptCanvasAssetHolder.h Editor/Assets/ScriptCanvasAssetHolder.cpp - Editor/Assets/ScriptCanvasAssetInstance.h - Editor/Assets/ScriptCanvasAssetInstance.cpp - Editor/Assets/ScriptCanvasAssetReference.h - Editor/Assets/ScriptCanvasAssetReference.cpp - Editor/Assets/ScriptCanvasAssetReferenceContainer.h Editor/Assets/ScriptCanvasMemoryAsset.h Editor/Assets/ScriptCanvasMemoryAsset.cpp Editor/Assets/ScriptCanvasUndoHelper.h @@ -84,8 +77,6 @@ set(FILES Editor/GraphCanvas/Components/NodeDescriptors/EBusHandlerNodeDescriptorComponent.h Editor/GraphCanvas/Components/NodeDescriptors/EBusSenderNodeDescriptorComponent.cpp Editor/GraphCanvas/Components/NodeDescriptors/EBusSenderNodeDescriptorComponent.h - Editor/GraphCanvas/Components/NodeDescriptors/EntityRefNodeDescriptorComponent.cpp - Editor/GraphCanvas/Components/NodeDescriptors/EntityRefNodeDescriptorComponent.h Editor/GraphCanvas/Components/NodeDescriptors/FunctionNodeDescriptorComponent.cpp Editor/GraphCanvas/Components/NodeDescriptors/FunctionNodeDescriptorComponent.h Editor/GraphCanvas/Components/NodeDescriptors/FunctionDefinitionNodeDescriptorComponent.h @@ -129,16 +120,12 @@ set(FILES Editor/Model/LibraryDataModel.cpp Editor/Model/UnitTestBrowserFilterModel.h Editor/Model/UnitTestBrowserFilterModel.cpp - Editor/Nodes/EditorLibrary.h - Editor/Nodes/EditorLibrary.cpp Editor/Nodes/NodeCreateUtils.h Editor/Nodes/NodeCreateUtils.cpp Editor/Nodes/NodeDisplayUtils.h Editor/Nodes/NodeDisplayUtils.cpp Editor/Nodes/NodeUtils.h Editor/Nodes/NodeUtils.cpp - Editor/Nodes/ScriptCanvasAssetNode.h - Editor/Nodes/ScriptCanvasAssetNode.cpp Editor/Translation/TranslationHelper.h Editor/Undo/ScriptCanvasGraphCommand.cpp Editor/Undo/ScriptCanvasGraphCommand.h diff --git a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomation/EditorAutomationActions/ScriptCanvasActions/GraphActions.cpp b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomation/EditorAutomationActions/ScriptCanvasActions/GraphActions.cpp index f016dd0a8d..777dcdd1b6 100644 --- a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomation/EditorAutomationActions/ScriptCanvasActions/GraphActions.cpp +++ b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomation/EditorAutomationActions/ScriptCanvasActions/GraphActions.cpp @@ -73,19 +73,6 @@ namespace ScriptCanvasDeveloper { return AZ::Failure("Active graph is not the newly created graph."); } - else - { - ScriptCanvas::ScriptCanvasId scriptCanvasId; - ScriptCanvasEditor::GeneralRequestBus::BroadcastResult(scriptCanvasId, &ScriptCanvasEditor::GeneralRequests::GetScriptCanvasId, activeGraphCanvasId); - - bool isRuntimeGraph = false; - ScriptCanvasEditor::EditorGraphRequestBus::EventResult(isRuntimeGraph, scriptCanvasId, &ScriptCanvasEditor::EditorGraphRequests::IsRuntimeGraph); - - if (!isRuntimeGraph) - { - return AZ::Failure("Created a new Graph, but graph is not of type Runtime Graph."); - } - } } return CompoundAction::GenerateReport(); @@ -140,19 +127,6 @@ namespace ScriptCanvasDeveloper { return AZ::Failure("Active graph is not the newly created function."); } - else - { - ScriptCanvas::ScriptCanvasId scriptCanvasId; - ScriptCanvasEditor::GeneralRequestBus::BroadcastResult(scriptCanvasId, &ScriptCanvasEditor::GeneralRequests::GetScriptCanvasId, activeGraphCanvasId); - - bool isFunctionGraph = false; - ScriptCanvasEditor::EditorGraphRequestBus::EventResult(isFunctionGraph, scriptCanvasId, &ScriptCanvasEditor::EditorGraphRequests::IsFunctionGraph); - - if (!isFunctionGraph) - { - return AZ::Failure("Created a new Graph, but graph is not of type Function."); - } - } } return CompoundAction::GenerateReport(); diff --git a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomationTests/GraphCreationTests.cpp b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomationTests/GraphCreationTests.cpp index bc372a4f50..cb182b1852 100644 --- a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomationTests/GraphCreationTests.cpp +++ b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomationTests/GraphCreationTests.cpp @@ -75,19 +75,6 @@ namespace ScriptCanvasDeveloper { ReportError("Active graph is not the newly created graph using hotkey."); } - else - { - ScriptCanvas::ScriptCanvasId scriptCanvasId; - ScriptCanvasEditor::GeneralRequestBus::BroadcastResult(scriptCanvasId, &ScriptCanvasEditor::GeneralRequests::GetScriptCanvasId, activeGraphCanvasId); - - bool isRuntimeGraph = false; - ScriptCanvasEditor::EditorGraphRequestBus::EventResult(isRuntimeGraph, scriptCanvasId, &ScriptCanvasEditor::EditorGraphRequests::IsRuntimeGraph); - - if (!isRuntimeGraph) - { - ReportError("Failed to create Runtime graph using button"); - } - } } GraphCanvas::AssetEditorNotificationBus::Handler::BusDisconnect(); diff --git a/Gems/ScriptCanvasTesting/Assets/ScriptCanvas/UnitTests/LY_SC_UnitTest_ParseErrorOnKnownNull.scriptcanvas b/Gems/ScriptCanvasTesting/Assets/ScriptCanvas/UnitTests/LY_SC_UnitTest_ParseErrorOnKnownNull.scriptcanvas new file mode 100644 index 0000000000..4453617996 --- /dev/null +++ b/Gems/ScriptCanvasTesting/Assets/ScriptCanvas/UnitTests/LY_SC_UnitTest_ParseErrorOnKnownNull.scriptcanvas @@ -0,0 +1,947 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Gems/ScriptCanvasTesting/Code/Platform/Common/MSVC/scriptcanvastesting_editor_tests_msvc.cmake b/Gems/ScriptCanvasTesting/Code/Platform/Common/MSVC/scriptcanvastesting_editor_tests_msvc.cmake index 95d699cd27..0d70c9d05c 100644 --- a/Gems/ScriptCanvasTesting/Code/Platform/Common/MSVC/scriptcanvastesting_editor_tests_msvc.cmake +++ b/Gems/ScriptCanvasTesting/Code/Platform/Common/MSVC/scriptcanvastesting_editor_tests_msvc.cmake @@ -8,7 +8,6 @@ ly_add_source_properties( SOURCES Source/Framework/ScriptCanvasTestUtilities.cpp - Tests/ScriptCanvas_Async.cpp Tests/ScriptCanvas_BehaviorContext.cpp Tests/ScriptCanvas_ContainerSupport.cpp Tests/ScriptCanvas_Core.cpp diff --git a/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestNodes.cpp b/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestNodes.cpp index cf866d9f83..e54c83c5d3 100644 --- a/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestNodes.cpp +++ b/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestNodes.cpp @@ -11,8 +11,6 @@ #include #include #include -#include -#include #include @@ -33,25 +31,6 @@ namespace TestNodes AddSlot(slotConfiguration); } - void TestResult::OnInputSignal(const ScriptCanvas::SlotId&) - { - auto valueDatum = FindDatum(GetSlotId("Value")); - if (!valueDatum) - { - return; - } - - valueDatum->ToString(m_string); - - // technically, I should remove this, make it an object that holds a string, with an untyped slot, and this could be a local value - if (!m_string.empty()) - { - AZ_TracePrintf("Script Canvas", "%s\n", m_string.c_str()); - } - - SignalOutput(GetSlotId(ScriptCanvas::CommonSlots::GeneralOutSlot::GetName())); - } - void TestResult::Reflect(AZ::ReflectContext* context) { AZ::SerializeContext* serializeContext = azrtti_cast(context); @@ -105,11 +84,6 @@ namespace TestNodes AddSlot(ScriptCanvas::DataSlotConfiguration(Data::Type::Number(), "Get Number", ScriptCanvas::ConnectionType::Output)); } - void ContractNode::OnInputSignal(const ScriptCanvas::SlotId&) - { - SignalOutput(GetSlotId(ScriptCanvas::CommonSlots::GeneralOutSlot::GetName())); - } - ////////////////////////////////////////////////////////////////////////////// void InfiniteLoopNode::Reflect(AZ::ReflectContext* reflection) { @@ -121,11 +95,6 @@ namespace TestNodes } } - void InfiniteLoopNode::OnInputSignal(const ScriptCanvas::SlotId&) - { - SignalOutput(GetSlotId("Before Infinity")); - } - void InfiniteLoopNode::OnInit() { AddSlot(ScriptCanvas::CommonSlots::GeneralInSlot()); @@ -159,13 +128,6 @@ namespace TestNodes AddSlot(slotConfiguration); } - void UnitTestErrorNode::OnInputSignal(const ScriptCanvas::SlotId&) - { - SCRIPTCANVAS_REPORT_ERROR((*this), "Unit test error!"); - - SignalOutput(GetSlotId("Out")); - } - ////////////////////////////////////////////////////////////////////////////// void AddNodeWithRemoveSlot::Reflect(AZ::ReflectContext* reflection) @@ -205,30 +167,6 @@ namespace TestNodes return Node::RemoveSlot(slotId, true, emitWarning); } - void AddNodeWithRemoveSlot::OnInputSignal(const ScriptCanvas::SlotId& slotId) - { - if (slotId == GetSlotId("In")) - { - ScriptCanvas::Data::NumberType result{}; - for (const ScriptCanvas::SlotId& dynamicSlotId : m_dynamicSlotIds) - { - if (auto numberInput = FindDatum(dynamicSlotId)) - { - if (auto argValue = numberInput->GetAs()) - { - result += *argValue; - } - } - } - - auto resultType = GetSlotDataType(m_resultSlotId); - EXPECT_TRUE(resultType.IsValid()); - ScriptCanvas::Datum output(result);; - PushOutput(output, *GetSlot(m_resultSlotId)); - SignalOutput(GetSlotId("Out")); - } - } - void AddNodeWithRemoveSlot::OnInit() { Node::AddSlot(ScriptCanvas::CommonSlots::GeneralInSlot()); @@ -290,28 +228,6 @@ namespace TestNodes } ////////////////////////////////////////////////////////////////////////////// - - void StringView::OnInputSignal(const ScriptCanvas::SlotId&) - { - auto viewDatum = FindDatum(GetSlotId("View")); - - if (!viewDatum) - { - return; - } - - ScriptCanvas::Data::StringType result; - viewDatum->ToString(result); - - ScriptCanvas::Datum output(result); - auto resultSlot = GetSlot(m_resultSlotId); - if (resultSlot) - { - PushOutput(output, *resultSlot); - } - SignalOutput(GetSlotId("Out")); - } - void StringView::Reflect(AZ::ReflectContext* context) { AZ::SerializeContext* serializeContext = azrtti_cast(context); @@ -354,36 +270,6 @@ namespace TestNodes return addedSlotId; } - - void InsertSlotConcatNode::OnInputSignal(const ScriptCanvas::SlotId& slotId) - { - if (slotId == GetSlotId(ScriptCanvas::CommonSlots::GeneralInSlot::GetName())) - { - ScriptCanvas::Data::StringType result{}; - - for (const ScriptCanvas::Slot* concatSlot : GetAllSlotsByDescriptor(ScriptCanvas::SlotDescriptors::DataIn())) - { - if (auto inputDatum = FindDatum(concatSlot->GetId())) - { - ScriptCanvas::Data::StringType stringArg; - if (inputDatum->ToString(stringArg)) - { - result += stringArg; - } - } - } - - auto resultSlotId = GetSlotId("Result"); - auto resultType = GetSlotDataType(resultSlotId); - EXPECT_TRUE(resultType.IsValid()); - if (auto resultSlot = GetSlot(resultSlotId)) - { - PushOutput(ScriptCanvas::Datum(result), *resultSlot); - } - SignalOutput(GetSlotId("Out")); - } - } - void InsertSlotConcatNode::OnInit() { Node::AddSlot(ScriptCanvas::CommonSlots::GeneralInSlot()); diff --git a/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestNodes.h b/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestNodes.h index 8963cb4708..3790ab735f 100644 --- a/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestNodes.h +++ b/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestNodes.h @@ -32,7 +32,6 @@ namespace TestNodes protected: void OnInit() override; - void OnInputSignal(const ScriptCanvas::SlotId&) override; private: @@ -49,9 +48,6 @@ namespace TestNodes void OnInit() override; - protected: - - void OnInputSignal(const ScriptCanvas::SlotId&) override; }; ////////////////////////////////////////////////////////////////////////////// @@ -64,9 +60,6 @@ namespace TestNodes static void Reflect(AZ::ReflectContext* reflection); protected: - - void OnInputSignal(const ScriptCanvas::SlotId&) override; - void OnInit() override; }; @@ -84,8 +77,6 @@ namespace TestNodes void OnInit() override; - void OnInputSignal(const ScriptCanvas::SlotId&) override; - }; ////////////////////////////////////////////////////////////////////////////// @@ -101,8 +92,6 @@ namespace TestNodes bool RemoveSlot(const ScriptCanvas::SlotId& slotId, bool emitWarning = true); protected: - void OnInputSignal(const ScriptCanvas::SlotId& slotId) override; - void OnInit() override; AZStd::vector m_dynamicSlotIds; @@ -120,8 +109,6 @@ namespace TestNodes void OnInit() override; - void OnInputSignal(const ScriptCanvas::SlotId&) override; - public: static void Reflect(AZ::ReflectContext* context); @@ -141,9 +128,7 @@ namespace TestNodes ScriptCanvas::SlotId InsertSlot(AZ::s64 index, AZStd::string_view slotName); protected: - void OnInputSignal(const ScriptCanvas::SlotId& slotId) override; - - void OnInit() override; + void OnInit() override; }; ////////////////////////////////////////////////////////////////////////////// diff --git a/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestUtilities.cpp b/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestUtilities.cpp index 8f769aefa4..03ecba29be 100644 --- a/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestUtilities.cpp +++ b/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestUtilities.cpp @@ -470,14 +470,6 @@ namespace ScriptCanvasTests AZ::u32 TestBehaviorContextObject::s_createdCount = 0; AZ::u32 TestBehaviorContextObject::s_destroyedCount = 0; - ScriptCanvas::Nodes::Core::BehaviorContextObjectNode* CreateTestObjectNode(const AZ::EntityId& graphUniqueId, AZ::EntityId& entityOut, const AZ::Uuid& objectTypeID) - { - ScriptCanvas::Nodes::Core::BehaviorContextObjectNode* node = CreateTestNode(graphUniqueId, entityOut); - EXPECT_TRUE(node != nullptr); - node->InitializeObject(objectTypeID); - return node; - } - AZ::EntityId CreateClassFunctionNode(const ScriptCanvasId& scriptCanvasId, AZStd::string_view className, AZStd::string_view methodName) { using namespace ScriptCanvas; @@ -495,93 +487,6 @@ namespace ScriptCanvasTests return methodNodeID; } - ScriptCanvas::Node* CreateDataNodeByType(const ScriptCanvasId& scriptCanvasId, const ScriptCanvas::Data::Type& type, AZ::EntityId& nodeIDout) - { - using namespace ScriptCanvas; - - Node* node(nullptr); - - switch (type.GetType()) - { - case Data::eType::AABB: - node = CreateTestNode(scriptCanvasId, nodeIDout); - break; - - case Data::eType::BehaviorContextObject: - { - auto objectNode = CreateTestNode(scriptCanvasId, nodeIDout); - objectNode->InitializeObject(type); - node = objectNode; - } - break; - - case Data::eType::Boolean: - node = CreateTestNode(scriptCanvasId, nodeIDout); - break; - - case Data::eType::Color: - node = CreateTestNode(scriptCanvasId, nodeIDout); - break; - - case Data::eType::CRC: - node = CreateTestNode(scriptCanvasId, nodeIDout); - break; - - case Data::eType::EntityID: - node = CreateTestNode(scriptCanvasId, nodeIDout); - break; - - case Data::eType::Matrix3x3: - node = CreateTestNode(scriptCanvasId, nodeIDout); - break; - - case Data::eType::Matrix4x4: - node = CreateTestNode(scriptCanvasId, nodeIDout); - break; - - case Data::eType::Number: - node = CreateTestNode(scriptCanvasId, nodeIDout); - break; - - case Data::eType::OBB: - node = CreateTestNode(scriptCanvasId, nodeIDout); - break; - - case Data::eType::Plane: - node = CreateTestNode(scriptCanvasId, nodeIDout); - break; - - case Data::eType::Quaternion: - node = CreateTestNode(scriptCanvasId, nodeIDout); - break; - - case Data::eType::String: - node = CreateTestNode(scriptCanvasId, nodeIDout); - break; - - case Data::eType::Transform: - node = CreateTestNode(scriptCanvasId, nodeIDout); - break; - - case Data::eType::Vector2: - node = CreateTestNode(scriptCanvasId, nodeIDout); - break; - - case Data::eType::Vector3: - node = CreateTestNode(scriptCanvasId, nodeIDout); - break; - - case Data::eType::Vector4: - node = CreateTestNode(scriptCanvasId, nodeIDout); - break; - - default: - AZ_Error("ScriptCanvas", false, "unsupported data type"); - } - - return node; - } - AZStd::string SlotDescriptorToString(ScriptCanvas::SlotDescriptor descriptor) { AZStd::string name; diff --git a/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestUtilities.h b/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestUtilities.h index e1879f6038..ba48af6ac3 100644 --- a/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestUtilities.h +++ b/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestUtilities.h @@ -69,23 +69,6 @@ namespace ScriptCanvasTests return GetTestNode(scriptCanvasId, entityOut); } - ScriptCanvas::Node* CreateDataNodeByType(const ScriptCanvas::ScriptCanvasId& scriptCanvasId, const ScriptCanvas::Data::Type& type, AZ::EntityId& nodeIDout); - - template - ScriptCanvas::Node* CreateDataNode(const ScriptCanvas::ScriptCanvasId& scriptCanvasId, const t_Value& value, AZ::EntityId& nodeIDout) - { - using namespace ScriptCanvas; - const Data::Type operandType = Data::FromAZType(azrtti_typeid()); - Node* node = CreateDataNodeByType(scriptCanvasId, operandType, nodeIDout); - - EXPECT_NE(node, nullptr); - if (node) - { - node->SetInput_UNIT_TEST("Set", value); - } - return node; - } - template ScriptCanvas::VariableId CreateVariable(ScriptCanvas::ScriptCanvasId scriptCanvasId, const t_Value& value, AZStd::string_view variableName) { @@ -101,7 +84,6 @@ namespace ScriptCanvasTests return addVariableOutcome.TakeValue(); } - ScriptCanvas::Nodes::Core::BehaviorContextObjectNode* CreateTestObjectNode(const ScriptCanvas::ScriptCanvasId& scriptCanvasId, AZ::EntityId& entityOut, const AZ::Uuid& objectTypeID); AZ::EntityId CreateClassFunctionNode(const ScriptCanvas::ScriptCanvasId& scriptCanvasId, AZStd::string_view className, AZStd::string_view methodName); AZStd::string SlotDescriptorToString(ScriptCanvas::SlotDescriptor type); void DumpSlots(const ScriptCanvas::Node& node); diff --git a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Async.cpp b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Async.cpp deleted file mode 100644 index e50914c0a6..0000000000 --- a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Async.cpp +++ /dev/null @@ -1,316 +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 - -using namespace ScriptCanvasTests; -using namespace ScriptCanvasEditor; - -// Asynchronous ScriptCanvas Behaviors - -#if AZ_COMPILER_MSVC - -#include - -class AsyncEvent : public AZ::EBusTraits -{ -public: - - ////////////////////////////////////////////////////////////////////////// - // EBusTraits overrides - static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById; - using BusIdType = AZ::EntityId; - using MutexType = AZStd::recursive_mutex; - static const bool LocklessDispatch = true; - - ////////////////////////////////////////////////////////////////////////// - - virtual void OnAsyncEvent() = 0; -}; - -using AsyncEventNotificationBus = AZ::EBus; - -class LongRunningProcessSimulator3000 -{ -public: - - static void Run(const AZ::EntityId& listener) - { - int duration = 40; - while (--duration > 0) - { - AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(10)); - } - - AsyncEventNotificationBus::Event(listener, &AsyncEvent::OnAsyncEvent); - } -}; - -class AsyncNode - : public ScriptCanvas::Node - , protected AsyncEventNotificationBus::Handler - , protected AZ::TickBus::Handler -{ -public: - AZ_COMPONENT(AsyncNode, "{0A7FF6C6-878B-42EC-A8BB-4D29C4039853}", ScriptCanvas::Node); - - bool IsEntryPoint() const { return true; } - - AsyncNode() - : Node() - {} - - static void Reflect(AZ::ReflectContext* reflection) - { - AZ::SerializeContext* serializeContext = azrtti_cast(reflection); - if (serializeContext) - { - serializeContext->Class() - ->Version(1) - ; - } - } - - void ConfigureSlots() override - { - AddSlot(ScriptCanvas::CommonSlots::GeneralInSlot()); - AddSlot(ScriptCanvas::CommonSlots::GeneralOutSlot()); - } - - void OnActivate() override - { - ScriptCanvasTestFixture::s_asyncOperationActive = true; - AZ::TickBus::Handler::BusConnect(); - AsyncEventNotificationBus::Handler::BusConnect(GetEntityId()); - - std::packaged_task task([this]() { LongRunningProcessSimulator3000::Run(GetEntityId()); }); // wrap the function - - m_eventThread = AZStd::make_shared(AZStd::move(task)); // launch on a thread - } - - void OnDeactivate() override - { - if (m_eventThread) - { - m_eventThread->join(); - m_eventThread.reset(); - } - - // We've received the event, no longer need the bus connection - AsyncEventNotificationBus::Handler::BusDisconnect(); - - // We're done, kick it out. - SignalOutput(GetSlotId("Out")); - - // Disconnect from tick bus as well - AZ::TickBus::Handler::BusDisconnect(); - } - - virtual void HandleAsyncEvent() - { - EXPECT_GT(m_duration, 0.f); - - Shutdown(); - } - - void OnAsyncEvent() override - { - HandleAsyncEvent(); - } - - void Shutdown() - { - ScriptCanvasTestFixture::s_asyncOperationActive = false; - } - - void OnTick(float deltaTime, AZ::ScriptTimePoint) override - { - AZ_TracePrintf("Debug", "Awaiting async operation: %.2f\n", m_duration); - m_duration += deltaTime; - } - -protected: - AZStd::shared_ptr m_eventThread; -private: - double m_duration = 0.f; -}; - -TEST_F(ScriptCanvasTestFixture, Asynchronous_Behaviors) -{ - using namespace ScriptCanvas; - - RegisterComponentDescriptor(); - - // Make the graph. - ScriptCanvas::Graph* graph =nullptr; - SystemRequestBus::BroadcastResult(graph, &SystemRequests::MakeGraph); - ASSERT_TRUE(graph != nullptr); - - AZ::Entity* graphEntity = graph->GetEntity(); - graphEntity->Init(); - - const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId(); - - AZ::Entity* startEntity{ aznew AZ::Entity }; - startEntity->Init(); - - AZ::EntityId startNodeId; - CreateTestNode(graphUniqueId, startNodeId); - - AZ::EntityId asyncNodeId; - CreateTestNode(graphUniqueId, asyncNodeId); - - EXPECT_TRUE(Connect(*graph, startNodeId, ScriptCanvas::CommonSlots::GeneralOutSlot::GetName(), asyncNodeId, ScriptCanvas::CommonSlots::GeneralInSlot::GetName())); - - { - ScopedOutputSuppression supressOutput; - graphEntity->Activate(); - - // Tick the TickBus while the graph entity is active - while (ScriptCanvasTestFixture::s_asyncOperationActive) - { - AZ::TickBus::ExecuteQueuedEvents(); - AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(100)); - AZ::TickBus::Broadcast(&AZ::TickEvents::OnTick, 0.01f, AZ::ScriptTimePoint(AZStd::chrono::system_clock::now())); - } - } - - graphEntity->Deactivate(); - delete graphEntity; -} - -/////////////////////////////////////////////////////////////////////////////// - -namespace -{ - // Fibonacci solver, used to compare against the graph version. - long ComputeFibonacci(int digits) - { - int a = 0; - int b = 1; - long sum = 0; - for (int i = 0; i < digits - 2; ++i) - { - sum = a + b; - a = b; - b = sum; - } - return sum; - } -} - -class AsyncFibonacciComputeNode - : public AsyncNode -{ -public: - AZ_COMPONENT(AsyncFibonacciComputeNode, "{B198F52D-708C-414B-BB90-DFF0462D7F03}", AsyncNode); - - AsyncFibonacciComputeNode() - : AsyncNode() - {} - - bool IsEntryPoint() const { return true; } - - static const int k_numberOfFibonacciDigits = 64; - - static void Reflect(AZ::ReflectContext* reflection) - { - AZ::SerializeContext* serializeContext = azrtti_cast(reflection); - if (serializeContext) - { - serializeContext->Class() - ->Version(1) - ; - } - } - - void OnActivate() override - { - AZ::TickBus::Handler::BusConnect(); - AsyncEventNotificationBus::Handler::BusConnect(GetEntityId()); - - int digits = k_numberOfFibonacciDigits; - - std::promise p; - m_computeFuture = p.get_future(); - m_eventThread = AZStd::make_shared([this, digits, p = AZStd::move(p)]() mutable - { - p.set_value(ComputeFibonacci(digits)); - AsyncEventNotificationBus::Event(GetEntityId(), &AsyncEvent::OnAsyncEvent); - }); - } - - void HandleAsyncEvent() override - { - m_result = m_computeFuture.get(); - - EXPECT_EQ(m_result, ComputeFibonacci(k_numberOfFibonacciDigits)); - } - - void OnTick(float deltaTime, AZ::ScriptTimePoint) override - { - AZ_TracePrintf("Debug", "Awaiting async fib operation: %.2f\n", m_duration); - m_duration += deltaTime; - - if (m_result != 0) - { - Shutdown(); - } - } - -private: - std::future m_computeFuture; - long m_result = 0; - double m_duration = 0.f; -}; - -TEST_F(ScriptCanvasTestFixture, ComputeFibonacciAsyncGraphTest) -{ - using namespace ScriptCanvas; - - RegisterComponentDescriptor(); - RegisterComponentDescriptor(); - - // Make the graph. - ScriptCanvas::Graph* graph =nullptr; - SystemRequestBus::BroadcastResult(graph, &SystemRequests::MakeGraph); - ASSERT_NE(graph, nullptr); - - AZ::Entity* graphEntity = graph->GetEntity(); - graphEntity->Init(); - - const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId(); - - AZ::EntityId startNodeId; - CreateTestNode(graphUniqueId, startNodeId); - - AZ::EntityId asyncNodeId; - CreateTestNode(graphUniqueId, asyncNodeId); - - EXPECT_TRUE(Connect(*graph, startNodeId, "Out", asyncNodeId, "In")); - - graphEntity->Activate(); - - // Tick the TickBus while the graph entity is active - while (ScriptCanvasTestFixture::s_asyncOperationActive) - { - AZ::TickBus::ExecuteQueuedEvents(); - AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(100)); - AZ::TickBus::Broadcast(&AZ::TickEvents::OnTick, 0.01f, AZ::ScriptTimePoint(AZStd::chrono::system_clock::now())); - } - - graphEntity->Deactivate(); - delete graphEntity; -} - -#endif // AZ_COMPILER_MSVC diff --git a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_BehaviorContext.cpp b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_BehaviorContext.cpp index be0f57665a..c1fdbc2b60 100644 --- a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_BehaviorContext.cpp +++ b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_BehaviorContext.cpp @@ -12,7 +12,6 @@ #include #include -#include #include #include @@ -20,187 +19,6 @@ using namespace ScriptCanvasTests; using namespace ScriptCanvasEditor; using namespace TestNodes; -TEST_F(ScriptCanvasTestFixture, BehaviorContextObjectGenericConstructor) -{ - using namespace ScriptCanvas; - - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - - - AZ::Entity* graphEntity = aznew AZ::Entity("Graph"); - graphEntity->Init(); - SystemRequestBus::Broadcast(&SystemRequests::CreateGraphOnEntity, graphEntity); - auto graph = graphEntity->FindComponent(); - EXPECT_NE(nullptr, graph); - - const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId(); - - //Validates the GenericConstructorOverride attribute is being used to construct types that are normally not initialized in C++ - AZ::EntityId vector3IdA; - ScriptCanvas::Nodes::Core::BehaviorContextObjectNode* vector3NodeA = CreateTestNode(graphUniqueId, vector3IdA); - vector3NodeA->InitializeObject(azrtti_typeid()); - - ReportErrors(graph); - - if (auto result = vector3NodeA->GetInput_UNIT_TEST("Set")) - { - EXPECT_EQ(0, result->GetValue()); - } - else - { - ADD_FAILURE(); - } - - delete graphEntity; - - m_serializeContext->EnableRemoveReflection(); - m_behaviorContext->EnableRemoveReflection(); - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - m_serializeContext->DisableRemoveReflection(); - m_behaviorContext->DisableRemoveReflection(); -} - -// Tests the basic footprint of the ebus node both before and after graph activation to make sure all internal bookeeping is correct. -TEST_F(ScriptCanvasTestFixture, BehaviorContext_BusHandlerNodeFootPrint) -{ - using namespace ScriptCanvas; - - TemplateEventTestHandler::Reflect(m_serializeContext); - TemplateEventTestHandler::Reflect(m_behaviorContext); - - auto graphEntity = aznew AZ::Entity; - SystemRequestBus::Broadcast(&SystemRequests::CreateGraphOnEntity, graphEntity); - ScriptCanvas::Graph* graph = AZ::EntityUtils::FindFirstDerivedComponent(graphEntity); - graphEntity->Init(); - - const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId(); - - AZ::EntityId uuidEventHandlerId; - auto uuidEventHandler = CreateTestNode(graphUniqueId, uuidEventHandlerId); - uuidEventHandler->InitializeBus("TemplateEventTestHandler"); - AZ::Uuid uuidBusId = AZ::Uuid::CreateName("TemplateEventBus"); - uuidEventHandler->SetInput_UNIT_TEST(ScriptCanvas::Nodes::Core::EBusEventHandler::c_busIdName, uuidBusId); //Set Uuid bus id - - { - auto eventEntry = uuidEventHandler->FindEvent("VectorCreatedEvent"); - EXPECT_NE(nullptr, eventEntry); - EXPECT_EQ(eventEntry->m_parameterSlotIds.size(), 1); - EXPECT_TRUE(eventEntry->m_resultSlotId.IsValid()); - - { - const Slot* outputSlot = uuidEventHandler->GetSlot(eventEntry->m_eventSlotId); - EXPECT_EQ(outputSlot->GetDescriptor(), SlotDescriptors::ExecutionOut()); - } - - { - const Slot* dataSlot = uuidEventHandler->GetSlot(eventEntry->m_parameterSlotIds[0]); - - EXPECT_EQ(dataSlot->GetDescriptor(), SlotDescriptors::DataOut()); - EXPECT_EQ(dataSlot->GetDataType(), Data::Type::Vector3()); - - const Datum* datum = uuidEventHandler->FindDatum(eventEntry->m_parameterSlotIds[0]); - EXPECT_EQ(nullptr, datum); - - ModifiableDatumView datumView; - uuidEventHandler->FindModifiableDatumView(eventEntry->m_parameterSlotIds[0], datumView); - - EXPECT_FALSE(datumView.IsValid()); - } - - { - const Slot* resultSlot = uuidEventHandler->GetSlot(eventEntry->m_resultSlotId); - - EXPECT_EQ(resultSlot->GetDescriptor(), SlotDescriptors::DataIn()); - EXPECT_EQ(resultSlot->GetDataType(), Data::Type::Vector3()); - - const Datum* datum = uuidEventHandler->FindDatum(eventEntry->m_resultSlotId); - EXPECT_NE(nullptr, datum); - - if (datum) - { - EXPECT_TRUE(datum->IS_A()); - } - - ModifiableDatumView datumView; - uuidEventHandler->FindModifiableDatumView(eventEntry->m_resultSlotId, datumView); - - EXPECT_TRUE(datumView.IsValid()); - - if (datumView.IsValid()) - { - const Datum* datum2 = datumView.GetDatum(); - EXPECT_TRUE(datum2->IS_A()); - } - } - } - - graphEntity->Activate(); - - { - auto eventEntry = uuidEventHandler->FindEvent("VectorCreatedEvent"); - EXPECT_NE(nullptr, eventEntry); - EXPECT_EQ(eventEntry->m_parameterSlotIds.size(), 1); - EXPECT_TRUE(eventEntry->m_resultSlotId.IsValid()); - - { - const Slot* outputSlot = uuidEventHandler->GetSlot(eventEntry->m_eventSlotId); - EXPECT_EQ(outputSlot->GetDescriptor(), SlotDescriptors::ExecutionOut()); - } - - { - const Slot* dataSlot = uuidEventHandler->GetSlot(eventEntry->m_parameterSlotIds[0]); - - EXPECT_EQ(dataSlot->GetDescriptor(), SlotDescriptors::DataOut()); - EXPECT_EQ(dataSlot->GetDataType(), Data::Type::Vector3()); - - const Datum* datum = uuidEventHandler->FindDatum(eventEntry->m_parameterSlotIds[0]); - EXPECT_EQ(nullptr, datum); - - ModifiableDatumView datumView; - uuidEventHandler->FindModifiableDatumView(eventEntry->m_parameterSlotIds[0], datumView); - - EXPECT_FALSE(datumView.IsValid()); - } - - { - const Slot* resultSlot = uuidEventHandler->GetSlot(eventEntry->m_resultSlotId); - - EXPECT_EQ(resultSlot->GetDescriptor(), SlotDescriptors::DataIn()); - EXPECT_EQ(resultSlot->GetDataType(), Data::Type::Vector3()); - - const Datum* datum = uuidEventHandler->FindDatum(eventEntry->m_resultSlotId); - EXPECT_NE(nullptr, datum); - - if (datum) - { - EXPECT_TRUE(datum->IS_A()); - } - - ModifiableDatumView datumView; - uuidEventHandler->FindModifiableDatumView(eventEntry->m_resultSlotId, datumView); - - EXPECT_TRUE(datumView.IsValid()); - - if (datumView.IsValid()) - { - const Datum* datum2 = datumView.GetDatum(); - EXPECT_TRUE(datum2->IS_A()); - } - } - } - - delete graphEntity; - - m_serializeContext->EnableRemoveReflection(); - m_behaviorContext->EnableRemoveReflection(); - TemplateEventTestHandler::Reflect(m_serializeContext); - TemplateEventTestHandler::Reflect(m_behaviorContext); - m_serializeContext->DisableRemoveReflection(); - m_behaviorContext->DisableRemoveReflection(); -} - void ReflectSignCorrectly() { AZ::BehaviorContext* behaviorContext(nullptr); diff --git a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Core.cpp b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Core.cpp index b365a939e8..9e4252a4f2 100644 --- a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Core.cpp +++ b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Core.cpp @@ -407,38 +407,6 @@ TEST_F(ScriptCanvasTestFixture, ValueTypes) GTEST_SUCCEED(); } - -namespace -{ - using namespace ScriptCanvas; - using namespace ScriptCanvas::Nodes; - - bool GraphHasVectorWithValue(const ScriptCanvas::Graph& graph, const AZ::Vector3& vector) - { - for (auto nodeId : graph.GetNodes()) - { - AZ::Entity* entity{}; - AZ::ComponentApplicationBus::BroadcastResult(entity, &AZ::ComponentApplicationRequests::FindEntity, nodeId); - - if (entity) - { - if (auto node = AZ::EntityUtils::FindFirstDerivedComponent(entity)) - { - if (auto candidate = node->GetInput_UNIT_TEST("Set")) - { - if (*candidate == vector) - { - return true; - } - } - } - } - } - - return false; - } -} - TEST_F(ScriptCanvasTestFixture, Contracts) { using namespace ScriptCanvas; @@ -502,336 +470,15 @@ TEST_F(ScriptCanvasTestFixture, Contracts) graph->GetEntity()->Deactivate(); delete graph->GetEntity(); } -// -// TEST_F(ScriptCanvasTestFixture, BinaryOperationTest) -// { -// -// using namespace ScriptCanvas::Nodes; -// using namespace ScriptCanvas::Nodes::Comparison; -// -// TestBehaviorContextObject::Reflect(m_serializeContext); -// TestBehaviorContextObject::Reflect(m_behaviorContext); -// -// BinaryOpTest(1, 1, true); -// BinaryOpTest(1, 0, false); -// BinaryOpTest(0, 1, false); -// BinaryOpTest(0, 0, true); -// -// BinaryOpTest(1, 1, false); -// BinaryOpTest(1, 0, true); -// BinaryOpTest(0, 1, true); -// BinaryOpTest(0, 0, false); -// -// BinaryOpTest(1, 1, false); -// BinaryOpTest(1, 0, true); -// BinaryOpTest(0, 1, false); -// BinaryOpTest(0, 0, false); -// -// BinaryOpTest(1, 1, true); -// BinaryOpTest(1, 0, true); -// BinaryOpTest(0, 1, false); -// BinaryOpTest(0, 0, true); -// -// BinaryOpTest(1, 1, false); -// BinaryOpTest(1, 0, false); -// BinaryOpTest(0, 1, true); -// BinaryOpTest(0, 0, false); -// -// BinaryOpTest(1, 1, true); -// BinaryOpTest(1, 0, false); -// BinaryOpTest(0, 1, true); -// BinaryOpTest(0, 0, true); -// -// BinaryOpTest(true, true, true); -// BinaryOpTest(true, false, false); -// BinaryOpTest(false, true, false); -// BinaryOpTest(false, false, true); -// -// BinaryOpTest(true, true, false); -// BinaryOpTest(true, false, true); -// BinaryOpTest(false, true, true); -// BinaryOpTest(false, false, false); -// -// AZStd::string string0("a string"); -// AZStd::string string1("b string"); -// -// BinaryOpTest(string1, string1, true); -// BinaryOpTest(string1, string0, false); -// BinaryOpTest(string0, string1, false); -// BinaryOpTest(string0, string0, true); -// -// BinaryOpTest(string1, string1, false); -// BinaryOpTest(string1, string0, true); -// BinaryOpTest(string0, string1, true); -// BinaryOpTest(string0, string0, false); -// -// BinaryOpTest(string1, string1, false); -// BinaryOpTest(string1, string0, true); -// BinaryOpTest(string0, string1, false); -// BinaryOpTest(string0, string0, false); -// -// BinaryOpTest(string1, string1, true); -// BinaryOpTest(string1, string0, true); -// BinaryOpTest(string0, string1, false); -// BinaryOpTest(string0, string0, true); -// -// BinaryOpTest(string1, string1, false); -// BinaryOpTest(string1, string0, false); -// BinaryOpTest(string0, string1, true); -// BinaryOpTest(string0, string0, false); -// -// BinaryOpTest(string1, string1, true); -// BinaryOpTest(string1, string0, false); -// BinaryOpTest(string0, string1, true); -// BinaryOpTest(string0, string0, true); -// -// const AZ::Vector3 vectorOne(1.0f, 1.0f, 1.0f); -// const AZ::Vector3 vectorZero(0.0f, 0.0f, 0.0f); -// -// BinaryOpTest(vectorOne, vectorOne, true); -// BinaryOpTest(vectorOne, vectorZero, false); -// BinaryOpTest(vectorZero, vectorOne, false); -// BinaryOpTest(vectorZero, vectorZero, true); -// -// BinaryOpTest(vectorOne, vectorOne, false); -// BinaryOpTest(vectorOne, vectorZero, true); -// BinaryOpTest(vectorZero, vectorOne, true); -// BinaryOpTest(vectorZero, vectorZero, false); -// -// const TestBehaviorContextObject zero(0); -// const TestBehaviorContextObject one(1); -// const TestBehaviorContextObject otherOne(1); -// -// BinaryOpTest(one, one, true); -// BinaryOpTest(one, zero, false); -// BinaryOpTest(zero, one, false); -// BinaryOpTest(zero, zero, true); -// -// BinaryOpTest(one, one, false); -// BinaryOpTest(one, zero, true); -// BinaryOpTest(zero, one, true); -// BinaryOpTest(zero, zero, false); -// -// BinaryOpTest(one, one, false); -// BinaryOpTest(one, zero, true); -// BinaryOpTest(zero, one, false); -// BinaryOpTest(zero, zero, false); -// -// BinaryOpTest(one, one, true); -// BinaryOpTest(one, zero, true); -// BinaryOpTest(zero, one, false); -// BinaryOpTest(zero, zero, true); -// -// BinaryOpTest(one, one, false); -// BinaryOpTest(one, zero, false); -// BinaryOpTest(zero, one, true); -// BinaryOpTest(zero, zero, false); -// -// BinaryOpTest(one, one, true); -// BinaryOpTest(one, zero, false); -// BinaryOpTest(zero, one, true); -// BinaryOpTest(zero, zero, true); -// -// BinaryOpTest(one, otherOne, true); -// BinaryOpTest(otherOne, one, true); -// -// BinaryOpTest(one, otherOne, false); -// BinaryOpTest(otherOne, one, false); -// -// BinaryOpTest(one, otherOne, false); -// BinaryOpTest(otherOne, one, false); -// -// BinaryOpTest(one, otherOne, true); -// BinaryOpTest(otherOne, one, true); -// -// BinaryOpTest(one, otherOne, false); -// BinaryOpTest(otherOne, one, false); -// -// BinaryOpTest(one, otherOne, true); -// BinaryOpTest(otherOne, one, true); -// -// // force failures, to verify crash proofiness -// BinaryOpTest(one, zero, false, true); -// BinaryOpTest(one, zero, true, true); -// BinaryOpTest(one, zero, true, true); -// BinaryOpTest(one, zero, true, true); -// BinaryOpTest(one, zero, false, true); -// BinaryOpTest(one, zero, false, true); -// -// m_serializeContext->EnableRemoveReflection(); -// m_behaviorContext->EnableRemoveReflection(); -// TestBehaviorContextObject::Reflect(m_serializeContext); -// TestBehaviorContextObject::Reflect(m_behaviorContext); -// m_serializeContext->DisableRemoveReflection(); -// m_behaviorContext->DisableRemoveReflection(); -// } - -TEST_F(ScriptCanvasTestFixture, EntityRefTest) -{ - - - using namespace ScriptCanvas; - using namespace ScriptCanvas::Nodes; - - // Fake "world" entities - AZ::Entity first("First"); - first.CreateComponent(); - first.Init(); - first.Activate(); - - AZ::Entity second("Second"); - second.CreateComponent(); - second.Init(); - second.Activate(); - - // Script Canvas ScriptCanvas::Graph - ScriptCanvas::Graph* graph = nullptr; - SystemRequestBus::BroadcastResult(graph, &SystemRequests::MakeGraph); - EXPECT_TRUE(graph != nullptr); - - m_entityContext.AddEntity(first.GetId()); - m_entityContext.AddEntity(second.GetId()); - m_entityContext.AddEntity(graph->GetEntityId()); - - graph->GetEntity()->SetName("ScriptCanvas::Graph Owner Entity"); - - graph->GetEntity()->CreateComponent(); - graph->GetEntity()->Init(); - - const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId(); - - AZ::EntityId startID; - CreateTestNode(graphUniqueId, startID); - - // EntityRef node to some specific entity #1 - AZ::EntityId selfEntityIdNode; - auto selfEntityRef = CreateTestNode(graphUniqueId, selfEntityIdNode); - selfEntityRef->SetEntityRef(first.GetId()); - - // EntityRef node to some specific entity #2 - AZ::EntityId otherEntityIdNode; - auto otherEntityRef = CreateTestNode(graphUniqueId, otherEntityIdNode); - otherEntityRef->SetEntityRef(second.GetId()); - - // Explicitly set an EntityRef node with this graph's entity Id. - AZ::EntityId graphEntityIdNode; - auto graphEntityRef = CreateTestNode(graphUniqueId, graphEntityIdNode); - graphEntityRef->SetEntityRef(graph->GetEntity()->GetId()); - - // First test: directly set an entity Id on the EntityID: 0 slot - AZ::EntityId eventAid; - ScriptCanvas::Nodes::Core::Method* nodeA = CreateTestNode(graphUniqueId, eventAid); - nodeA->InitializeEvent({ {} }, "EntityRefTestEventBus", "TestEvent"); - if (auto entityId = nodeA->ModInput_UNIT_TEST("EntityID: 0")) - { - *entityId = first.GetId(); - } - - // Second test: Will connect the slot to an EntityRef node - AZ::EntityId eventBid; - ScriptCanvas::Nodes::Core::Method* nodeB = CreateTestNode(graphUniqueId, eventBid); - nodeB->InitializeEvent({ {} }, "EntityRefTestEventBus", "TestEvent"); - - // Third test: Set the slot's EntityId: 0 to SelfReferenceId, this should result in the same Id as graph->GetEntityId() - AZ::EntityId eventCid; - ScriptCanvas::Nodes::Core::Method* nodeC = CreateTestNode(graphUniqueId, eventCid); - nodeC->InitializeEvent({ {} }, "EntityRefTestEventBus", "TestEvent"); - if (auto entityId = nodeC->ModInput_UNIT_TEST("EntityID: 0")) - { - *entityId = ScriptCanvas::GraphOwnerId; - } - - // True - AZ::EntityId trueNodeId; - CreateDataNode(graphUniqueId, true, trueNodeId); - - // False - AZ::EntityId falseNodeId; - CreateDataNode(graphUniqueId, false, falseNodeId); - - // Start -> TestEvent - // O EntityId: 0 (not connected, it was set directly on the slot) - // EntityRef: first -O EntityId: 1 - // False -O Boolean: 2 - EXPECT_TRUE(Connect(*graph, startID, "Out", eventAid, "In")); - EXPECT_TRUE(Connect(*graph, eventAid, "EntityID: 1", selfEntityIdNode, "Get")); - EXPECT_TRUE(Connect(*graph, eventAid, "Boolean: 2", falseNodeId, "Get")); - - // Start -> TestEvent - // EntityRef: second -O EntityId: 0 - // EntityRef: second -O EntityId: 1 - // False -O Boolean: 2 - EXPECT_TRUE(Connect(*graph, startID, "Out", eventBid, "In")); - EXPECT_TRUE(Connect(*graph, eventBid, "EntityID: 0", otherEntityIdNode, "Get")); - EXPECT_TRUE(Connect(*graph, eventBid, "EntityID: 1", otherEntityIdNode, "Get")); - EXPECT_TRUE(Connect(*graph, eventBid, "Boolean: 2", falseNodeId, "Get")); - - // Start -> TestEvent - // -O EntityId: 0 (not connected, slot is set to SelfReferenceId) - // graphEntityIdNode -O EntityId: 1 - // True -O Boolean: 2 - EXPECT_TRUE(Connect(*graph, startID, "Out", eventCid, "In")); - EXPECT_TRUE(Connect(*graph, eventCid, "EntityID: 1", graphEntityIdNode, "Get")); - EXPECT_TRUE(Connect(*graph, eventCid, "Boolean: 2", trueNodeId, "Get")); - - // Execute the graph - - { - ScriptCanvasEditor::ScopedOutputSuppression suppressOutput; - graph->GetEntity()->Activate(); - } - - ReportErrors(graph); - delete graph->GetEntity(); - -} const int k_executionCount = 998; -TEST_F(ScriptCanvasTestFixture, ExecutionLength) -{ - - using namespace ScriptCanvas; - - ScriptCanvas::Graph* graph(nullptr); - SystemRequestBus::BroadcastResult(graph, &SystemRequests::MakeGraph); - EXPECT_TRUE(graph != nullptr); - graph->GetEntity()->Init(); - - const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId(); - - AZ::EntityId startID; - CreateTestNode(graphUniqueId, startID); - - AZ::EntityId previousID = startID; - - for (int i = 0; i < k_executionCount; ++i) - { - AZ::EntityId printNodeID; - TestResult* printNode = CreateTestNode(graphUniqueId, printNodeID); - printNode->SetInput_UNIT_TEST("Value", i); - EXPECT_TRUE(Connect(*graph, previousID, "Out", printNodeID, "In")); - previousID = printNodeID; - } - - AZ::Entity* graphEntity = graph->GetEntity(); - { - ScriptCanvasEditor::ScopedOutputSuppression suppressOutput; - graphEntity->Activate(); - } - - ReportErrors(graph); - - graphEntity->Deactivate(); - delete graphEntity; -} - TEST_F(ScriptCanvasTestFixture, While) { - RunUnitTestGraph("LY_SC_UnitTest_While", ExecutionMode::Interpreted); + RunUnitTestGraph("LY_SC_UnitTest_While", ScriptCanvas::ExecutionMode::Interpreted); } TEST_F(ScriptCanvasTestFixture, WhileBreak) { - RunUnitTestGraph("LY_SC_UnitTest_WhileBreak", ExecutionMode::Interpreted); + RunUnitTestGraph("LY_SC_UnitTest_WhileBreak", ScriptCanvas::ExecutionMode::Interpreted); } diff --git a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Math.cpp b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Math.cpp index 65236a7c92..71f0a42b03 100644 --- a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Math.cpp +++ b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Math.cpp @@ -17,76 +17,6 @@ using namespace ScriptCanvasTests; using namespace ScriptCanvas; -template -AZStd::vector TestMathFunction(std::initializer_list inputNamesList, std::initializer_list inputList, std::initializer_list outputNamesList, std::initializer_list outputList) -{ - AZStd::vector inputNames(inputNamesList); - AZStd::vector input(inputList); - AZStd::vector outputNames(outputNamesList); - AZStd::vector output(outputList); - - AZ_Assert(inputNames.size() == input.size(), "Size mismatch"); - AZ_Assert(outputNames.size() == output.size(), "Size mismatch"); - - AZ::Entity graphEntity("Graph"); - graphEntity.Init(); - SystemRequestBus::Broadcast(&SystemRequests::CreateGraphOnEntity, &graphEntity); - auto graph = graphEntity.FindComponent(); - EXPECT_NE(nullptr, graph); - - const AZ::EntityId& graphEntityId = graph->GetEntityId(); - const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId(); - - AZ::EntityId startID; - CreateTestNode(graphUniqueId, startID); - AZ::EntityId functionID; - CreateTestNode(graphUniqueId, functionID); - EXPECT_TRUE(Connect(*graph, startID, "Out", functionID, "In")); - - AZStd::vector inputNodes; - AZStd::vector inputNodeIDs; - AZStd::vector outputNodes; - AZStd::vector outputNodeIDs; - - for (int i = 0; i < input.size(); ++i) - { - AZ::EntityId inputNodeID; - auto node = CreateDataNodeByType(graphUniqueId, input[i].GetType(), inputNodeID); - inputNodeIDs.push_back(inputNodeID); - inputNodes.push_back(node); - node->SetInput_UNIT_TEST(PureData::k_setThis, input[i]); - } - - for (int i = 0; i < output.size(); ++i) - { - AZ::EntityId outputNodeID; - auto node = CreateDataNodeByType(graphUniqueId, output[i].GetType(), outputNodeID); - outputNodeIDs.push_back(outputNodeID); - outputNodes.push_back(node); - } - - for (int i = 0; i < inputNames.size(); ++i) - { - EXPECT_TRUE(Connect(*graph, inputNodeIDs[i], "Get", functionID, inputNames[i].data())); - } - - for (int i = 0; i < output.size(); ++i) - { - EXPECT_TRUE(Connect(*graph, functionID, outputNames[i].data(), outputNodeIDs[i], PureData::k_setThis)); - } - - graph->GetEntity()->Activate(); - - for (int i = 0; i < output.size(); ++i) - { - output[i] = *outputNodes[i]->GetInput_UNIT_TEST(PureData::k_setThis); - } - - graph->GetEntity()->Deactivate(); - delete graph; - return output; -} - TEST_F(ScriptCanvasTestFixture, MathOperations_Graph) { RunUnitTestGraph("LY_SC_UnitTest_MathOperations", ExecutionMode::Interpreted); diff --git a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_NodeGenerics.cpp b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_NodeGenerics.cpp index a1e48a4637..e74aa8e641 100644 --- a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_NodeGenerics.cpp +++ b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_NodeGenerics.cpp @@ -163,906 +163,5 @@ TEST_F(ScriptCanvasTestFixture, NodeGenerics) delete graph->GetEntity(); } -TEST_F(ScriptCanvasTestFixture, NodeGenericsByValue) -{ - using namespace ScriptCanvas; - using namespace ScriptCanvas::Nodes; - - RegisterComponentDescriptor(); - - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - - TestBehaviorContextObject::ResetCounts(); - - UnitTestEventsHandler unitTestHandler; - unitTestHandler.BusConnect(); - - Graph* graph = nullptr; - SystemRequestBus::BroadcastResult(graph, &SystemRequests::MakeGraph); - EXPECT_TRUE(graph != nullptr); - graph->GetEntity()->Init(); - - const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId(); - - AZ::EntityId startID; - CreateTestNode(graphUniqueId, startID); - - AZ::EntityId maxByValueID; - CreateTestNode(graphUniqueId, maxByValueID); - - AZ::EntityId valueID1, valueID2, valueID3, valueID4, valueID5; - - Core::BehaviorContextObjectNode* valueNode1 = CreateTestNode(graphUniqueId, valueID1); - valueNode1->InitializeObject(azrtti_typeid()); - valueNode1->ModInput_UNIT_TEST("Set")->SetValue(1); - EXPECT_EQ(1, valueNode1->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode2 = CreateTestNode(graphUniqueId, valueID2); - valueNode2->InitializeObject(azrtti_typeid()); - valueNode2->ModInput_UNIT_TEST("Set")->SetValue(2); - EXPECT_EQ(2, valueNode2->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode3 = CreateTestNode(graphUniqueId, valueID3); - valueNode3->InitializeObject(azrtti_typeid()); - valueNode3->ModInput_UNIT_TEST("Set")->SetValue(3); - EXPECT_EQ(3, valueNode3->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode4 = CreateTestNode(graphUniqueId, valueID4); - valueNode4->InitializeObject(azrtti_typeid()); - valueNode4->ModInput_UNIT_TEST("Set")->SetValue(4); - EXPECT_EQ(4, valueNode4->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode5 = CreateTestNode(graphUniqueId, valueID5); - valueNode5->InitializeObject(azrtti_typeid()); - valueNode5->ModInput_UNIT_TEST("Set")->SetValue(5); - EXPECT_EQ(5, valueNode5->GetInput_UNIT_TEST("Set")->GetValue()); - - auto value1 = valueNode1->GetInput_UNIT_TEST("Set"); - auto value2 = valueNode2->GetInput_UNIT_TEST("Set"); - auto value3 = valueNode3->GetInput_UNIT_TEST("Set"); - auto value4 = valueNode4->GetInput_UNIT_TEST("Set"); - auto value5 = valueNode5->GetInput_UNIT_TEST("Set"); - - EXPECT_NE(value1, value2); - EXPECT_NE(value1, value3); - EXPECT_NE(value1, value4); - EXPECT_NE(value1, value5); - EXPECT_NE(value2, value3); - EXPECT_NE(value2, value4); - EXPECT_NE(value2, value5); - EXPECT_NE(value3, value4); - EXPECT_NE(value3, value5); - EXPECT_NE(value4, value5); - - // data - EXPECT_TRUE(Connect(*graph, valueID1, "Get", maxByValueID, "TestBehaviorContextObject: 0")); - EXPECT_TRUE(Connect(*graph, valueID2, "Get", maxByValueID, "TestBehaviorContextObject: 1")); - EXPECT_TRUE(Connect(*graph, maxByValueID, "Result: TestBehaviorContextObject", valueID3, "Set")); - EXPECT_TRUE(Connect(*graph, valueID3, "Get", valueID4, "Set")); - EXPECT_TRUE(Connect(*graph, maxByValueID, "Result: TestBehaviorContextObject", valueID5, "Set")); - - delete graph->GetEntity(); - - m_serializeContext->EnableRemoveReflection(); - m_behaviorContext->EnableRemoveReflection(); - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - m_serializeContext->DisableRemoveReflection(); - m_behaviorContext->DisableRemoveReflection(); -} - -TEST_F(ScriptCanvasTestFixture, NodeGenericsByPointer) -{ - using namespace ScriptCanvas; - using namespace ScriptCanvas::Nodes; - - RegisterComponentDescriptor(); - - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - - TestBehaviorContextObject::ResetCounts(); - - UnitTestEventsHandler unitTestHandler; - unitTestHandler.BusConnect(); - - Graph* graph = nullptr; - SystemRequestBus::BroadcastResult(graph, &SystemRequests::MakeGraph); - EXPECT_TRUE(graph != nullptr); - graph->GetEntity()->Init(); - - const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId(); - - AZ::EntityId startID; - CreateTestNode(graphUniqueId, startID); - - AZ::EntityId maxByValueID; - CreateTestNode(graphUniqueId, maxByValueID); - - AZ::EntityId valueID1, valueID2, valueID3, valueID4, valueID5; - - Core::BehaviorContextObjectNode* valueNode1 = CreateTestNode(graphUniqueId, valueID1); - valueNode1->InitializeObject(azrtti_typeid()); - valueNode1->ModInput_UNIT_TEST("Set")->SetValue(1); - EXPECT_EQ(1, valueNode1->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode2 = CreateTestNode(graphUniqueId, valueID2); - valueNode2->InitializeObject(azrtti_typeid()); - valueNode2->ModInput_UNIT_TEST("Set")->SetValue(2); - EXPECT_EQ(2, valueNode2->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode3 = CreateTestNode(graphUniqueId, valueID3); - valueNode3->InitializeObject(azrtti_typeid()); - valueNode3->ModInput_UNIT_TEST("Set")->SetValue(3); - EXPECT_EQ(3, valueNode3->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode4 = CreateTestNode(graphUniqueId, valueID4); - valueNode4->InitializeObject(azrtti_typeid()); - valueNode4->ModInput_UNIT_TEST("Set")->SetValue(4); - EXPECT_EQ(4, valueNode4->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode5 = CreateTestNode(graphUniqueId, valueID5); - valueNode5->InitializeObject(azrtti_typeid()); - valueNode5->ModInput_UNIT_TEST("Set")->SetValue(5); - EXPECT_EQ(5, valueNode5->GetInput_UNIT_TEST("Set")->GetValue()); - - auto value1 = valueNode1->GetInput_UNIT_TEST("Set"); - auto value2 = valueNode2->GetInput_UNIT_TEST("Set"); - auto value3 = valueNode3->GetInput_UNIT_TEST("Set"); - auto value4 = valueNode4->GetInput_UNIT_TEST("Set"); - auto value5 = valueNode5->GetInput_UNIT_TEST("Set"); - - EXPECT_NE(value1, value2); - EXPECT_NE(value1, value3); - EXPECT_NE(value1, value4); - EXPECT_NE(value1, value5); - EXPECT_NE(value2, value3); - EXPECT_NE(value2, value4); - EXPECT_NE(value2, value5); - EXPECT_NE(value3, value4); - EXPECT_NE(value3, value5); - EXPECT_NE(value4, value5); - - // data - EXPECT_TRUE(Connect(*graph, valueID1, "Get", maxByValueID, "TestBehaviorContextObject: 0")); - EXPECT_TRUE(Connect(*graph, valueID2, "Get", maxByValueID, "TestBehaviorContextObject: 1")); - EXPECT_TRUE(Connect(*graph, maxByValueID, "Result: TestBehaviorContextObject", valueID3, "Set")); - EXPECT_TRUE(Connect(*graph, valueID3, "Get", valueID4, "Set")); - EXPECT_TRUE(Connect(*graph, maxByValueID, "Result: TestBehaviorContextObject", valueID5, "Set")); - - // execution - EXPECT_TRUE(Connect(*graph, startID, "Out", maxByValueID, "In")); - - delete graph->GetEntity(); - - m_serializeContext->EnableRemoveReflection(); - m_behaviorContext->EnableRemoveReflection(); - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - m_serializeContext->DisableRemoveReflection(); - m_behaviorContext->DisableRemoveReflection(); -} - -TEST_F(ScriptCanvasTestFixture, NodeGenericsByReference) -{ - using namespace ScriptCanvas; - using namespace ScriptCanvas::Nodes; - - RegisterComponentDescriptor(); - - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - - TestBehaviorContextObject::ResetCounts(); - - UnitTestEventsHandler unitTestHandler; - unitTestHandler.BusConnect(); - - Graph* graph = nullptr; - SystemRequestBus::BroadcastResult(graph, &SystemRequests::MakeGraph); - EXPECT_TRUE(graph != nullptr); - graph->GetEntity()->Init(); - - const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId(); - - AZ::EntityId startID; - CreateTestNode(graphUniqueId, startID); - - AZ::EntityId maxByValueID; - CreateTestNode(graphUniqueId, maxByValueID); - - AZ::EntityId valueID1, valueID2, valueID3, valueID4, valueID5; - - Core::BehaviorContextObjectNode* valueNode1 = CreateTestNode(graphUniqueId, valueID1); - valueNode1->InitializeObject(azrtti_typeid()); - valueNode1->ModInput_UNIT_TEST("Set")->SetValue(1); - EXPECT_EQ(1, valueNode1->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode2 = CreateTestNode(graphUniqueId, valueID2); - valueNode2->InitializeObject(azrtti_typeid()); - valueNode2->ModInput_UNIT_TEST("Set")->SetValue(2); - EXPECT_EQ(2, valueNode2->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode3 = CreateTestNode(graphUniqueId, valueID3); - valueNode3->InitializeObject(azrtti_typeid()); - valueNode3->ModInput_UNIT_TEST("Set")->SetValue(3); - EXPECT_EQ(3, valueNode3->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode4 = CreateTestNode(graphUniqueId, valueID4); - valueNode4->InitializeObject(azrtti_typeid()); - valueNode4->ModInput_UNIT_TEST("Set")->SetValue(4); - EXPECT_EQ(4, valueNode4->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode5 = CreateTestNode(graphUniqueId, valueID5); - valueNode5->InitializeObject(azrtti_typeid()); - valueNode5->ModInput_UNIT_TEST("Set")->SetValue(5); - EXPECT_EQ(5, valueNode5->GetInput_UNIT_TEST("Set")->GetValue()); - - auto value1 = valueNode1->GetInput_UNIT_TEST("Set"); - auto value2 = valueNode2->GetInput_UNIT_TEST("Set"); - auto value3 = valueNode3->GetInput_UNIT_TEST("Set"); - auto value4 = valueNode4->GetInput_UNIT_TEST("Set"); - auto value5 = valueNode5->GetInput_UNIT_TEST("Set"); - - EXPECT_NE(value1, value2); - EXPECT_NE(value1, value3); - EXPECT_NE(value1, value4); - EXPECT_NE(value1, value5); - EXPECT_NE(value2, value3); - EXPECT_NE(value2, value4); - EXPECT_NE(value2, value5); - EXPECT_NE(value3, value4); - EXPECT_NE(value3, value5); - EXPECT_NE(value4, value5); - - // data - EXPECT_TRUE(Connect(*graph, valueID1, "Get", maxByValueID, "TestBehaviorContextObject: 0")); - EXPECT_TRUE(Connect(*graph, valueID2, "Get", maxByValueID, "TestBehaviorContextObject: 1")); - EXPECT_TRUE(Connect(*graph, maxByValueID, "Result: TestBehaviorContextObject", valueID3, "Set")); - EXPECT_TRUE(Connect(*graph, valueID3, "Get", valueID4, "Set")); - EXPECT_TRUE(Connect(*graph, maxByValueID, "Result: TestBehaviorContextObject", valueID5, "Set")); - - delete graph->GetEntity(); - - m_serializeContext->EnableRemoveReflection(); - m_behaviorContext->EnableRemoveReflection(); - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - m_serializeContext->DisableRemoveReflection(); - m_behaviorContext->DisableRemoveReflection(); -} - -TEST_F(ScriptCanvasTestFixture, NodeGenericsByValueInteger) -{ - using namespace ScriptCanvas; - using namespace ScriptCanvas::Nodes; - - RegisterComponentDescriptor(); - - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - - TestBehaviorContextObject::ResetCounts(); - - UnitTestEventsHandler unitTestHandler; - unitTestHandler.BusConnect(); - - Graph* graph = nullptr; - SystemRequestBus::BroadcastResult(graph, &SystemRequests::MakeGraph); - EXPECT_TRUE(graph != nullptr); - graph->GetEntity()->Init(); - - const AZ::EntityId graphEntityId = graph->GetEntityId(); - const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId(); - - AZ::EntityId startID; - CreateTestNode(graphUniqueId, startID); - - AZ::EntityId maxByValueID; - CreateTestNode(graphUniqueId, maxByValueID); - - AZ::EntityId valueID1, valueID2, valueID3, valueID4, valueID5; - - Node* valueNode1 = CreateDataNode(graphUniqueId, 1, valueID1); - EXPECT_EQ(1, *valueNode1->GetInput_UNIT_TEST("Set")); - - Node* valueNode2 = CreateDataNode(graphUniqueId, 2, valueID2); - EXPECT_EQ(2, *valueNode2->GetInput_UNIT_TEST("Set")); - - Node* valueNode3 = CreateDataNode(graphUniqueId, 3, valueID3); - EXPECT_EQ(3, *valueNode3->GetInput_UNIT_TEST("Set")); - - Node* valueNode4 = CreateDataNode(graphUniqueId, 4, valueID4); - EXPECT_EQ(4, *valueNode4->GetInput_UNIT_TEST("Set")); - - Node* valueNode5 = CreateDataNode(graphUniqueId, 5, valueID5); - EXPECT_EQ(5, *valueNode5->GetInput_UNIT_TEST("Set")); - - auto value1 = valueNode1->GetInput_UNIT_TEST("Set"); - auto value2 = valueNode2->GetInput_UNIT_TEST("Set"); - auto value3 = valueNode3->GetInput_UNIT_TEST("Set"); - auto value4 = valueNode4->GetInput_UNIT_TEST("Set"); - auto value5 = valueNode5->GetInput_UNIT_TEST("Set"); - - EXPECT_NE(value1, value2); - EXPECT_NE(value1, value3); - EXPECT_NE(value1, value4); - EXPECT_NE(value1, value5); - EXPECT_NE(value2, value3); - EXPECT_NE(value2, value4); - EXPECT_NE(value2, value5); - EXPECT_NE(value3, value4); - EXPECT_NE(value3, value5); - EXPECT_NE(value4, value5); - - // data - EXPECT_TRUE(Connect(*graph, valueID1, "Get", maxByValueID, "Number: 0")); - EXPECT_TRUE(Connect(*graph, valueID2, "Get", maxByValueID, "Number: 1")); - EXPECT_TRUE(Connect(*graph, maxByValueID, "Result: Number", valueID3, "Set")); - EXPECT_TRUE(Connect(*graph, valueID3, "Get", valueID4, "Set")); - EXPECT_TRUE(Connect(*graph, maxByValueID, "Result: Number", valueID5, "Set")); - - delete graph->GetEntity(); - - m_serializeContext->EnableRemoveReflection(); - m_behaviorContext->EnableRemoveReflection(); - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - m_serializeContext->DisableRemoveReflection(); - m_behaviorContext->DisableRemoveReflection(); -} - -TEST_F(ScriptCanvasTestFixture, NodeGenericsByPointerInteger) -{ - using namespace ScriptCanvas; - using namespace ScriptCanvas::Nodes; - - RegisterComponentDescriptor(); - - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - - TestBehaviorContextObject::ResetCounts(); - - UnitTestEventsHandler unitTestHandler; - unitTestHandler.BusConnect(); - - Graph* graph = nullptr; - SystemRequestBus::BroadcastResult(graph, &SystemRequests::MakeGraph); - EXPECT_TRUE(graph != nullptr); - graph->GetEntity()->Init(); - - const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId(); - - AZ::EntityId startID; - CreateTestNode(graphUniqueId, startID); - - AZ::EntityId maxByValueID; - CreateTestNode(graphUniqueId, maxByValueID); - - AZ::EntityId valueID1, valueID2, valueID3, valueID4, valueID5; - - Node* valueNode1 = CreateDataNode(graphUniqueId, 1, valueID1); - EXPECT_EQ(1, *valueNode1->GetInput_UNIT_TEST("Set")); - - Node* valueNode2 = CreateDataNode(graphUniqueId, 2, valueID2); - EXPECT_EQ(2, *valueNode2->GetInput_UNIT_TEST("Set")); - - Node* valueNode3 = CreateDataNode(graphUniqueId, 3, valueID3); - EXPECT_EQ(3, *valueNode3->GetInput_UNIT_TEST("Set")); - - Node* valueNode4 = CreateDataNode(graphUniqueId, 4, valueID4); - EXPECT_EQ(4, *valueNode4->GetInput_UNIT_TEST("Set")); - - Node* valueNode5 = CreateDataNode(graphUniqueId, 5, valueID5); - EXPECT_EQ(5, *valueNode5->GetInput_UNIT_TEST("Set")); - - auto value1 = valueNode1->GetInput_UNIT_TEST("Set"); - auto value2 = valueNode2->GetInput_UNIT_TEST("Set"); - auto value3 = valueNode3->GetInput_UNIT_TEST("Set"); - auto value4 = valueNode4->GetInput_UNIT_TEST("Set"); - auto value5 = valueNode5->GetInput_UNIT_TEST("Set"); - - EXPECT_NE(value1, value2); - EXPECT_NE(value1, value3); - EXPECT_NE(value1, value4); - EXPECT_NE(value1, value5); - EXPECT_NE(value2, value3); - EXPECT_NE(value2, value4); - EXPECT_NE(value2, value5); - EXPECT_NE(value3, value4); - EXPECT_NE(value3, value5); - EXPECT_NE(value4, value5); - - // data - EXPECT_TRUE(Connect(*graph, valueID1, "Get", maxByValueID, "Number: 0")); - EXPECT_TRUE(Connect(*graph, valueID2, "Get", maxByValueID, "Number: 1")); - EXPECT_TRUE(Connect(*graph, maxByValueID, "Result: Number", valueID3, "Set")); - EXPECT_TRUE(Connect(*graph, valueID3, "Get", valueID4, "Set")); - EXPECT_TRUE(Connect(*graph, maxByValueID, "Result: Number", valueID5, "Set")); - - EXPECT_TRUE(Connect(*graph, startID, "Out", maxByValueID, "In")); - - delete graph->GetEntity(); - - m_serializeContext->EnableRemoveReflection(); - m_behaviorContext->EnableRemoveReflection(); - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - m_serializeContext->DisableRemoveReflection(); - m_behaviorContext->DisableRemoveReflection(); -} - -TEST_F(ScriptCanvasTestFixture, NodeGenericsByReferenceInteger) -{ - using namespace ScriptCanvas; - using namespace ScriptCanvas::Nodes; - - RegisterComponentDescriptor(); - - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - - TestBehaviorContextObject::ResetCounts(); - - UnitTestEventsHandler unitTestHandler; - unitTestHandler.BusConnect(); - - Graph* graph = nullptr; - SystemRequestBus::BroadcastResult(graph, &SystemRequests::MakeGraph); - EXPECT_TRUE(graph != nullptr); - graph->GetEntity()->Init(); - - const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId(); - - AZ::EntityId startID; - CreateTestNode(graphUniqueId, startID); - - AZ::EntityId maxByValueID; - CreateTestNode(graphUniqueId, maxByValueID); - - AZ::EntityId valueID1, valueID2, valueID3, valueID4, valueID5; - - Node* valueNode1 = CreateDataNode(graphUniqueId, 1, valueID1); - EXPECT_EQ(1, *valueNode1->GetInput_UNIT_TEST("Set")); - - Node* valueNode2 = CreateDataNode(graphUniqueId, 2, valueID2); - EXPECT_EQ(2, *valueNode2->GetInput_UNIT_TEST("Set")); - - Node* valueNode3 = CreateDataNode(graphUniqueId, 3, valueID3); - EXPECT_EQ(3, *valueNode3->GetInput_UNIT_TEST("Set")); - - Node* valueNode4 = CreateDataNode(graphUniqueId, 4, valueID4); - EXPECT_EQ(4, *valueNode4->GetInput_UNIT_TEST("Set")); - - Node* valueNode5 = CreateDataNode(graphUniqueId, 5, valueID5); - EXPECT_EQ(5, *valueNode5->GetInput_UNIT_TEST("Set")); - - auto value1 = valueNode1->GetInput_UNIT_TEST("Set"); - auto value2 = valueNode2->GetInput_UNIT_TEST("Set"); - auto value3 = valueNode3->GetInput_UNIT_TEST("Set"); - auto value4 = valueNode4->GetInput_UNIT_TEST("Set"); - auto value5 = valueNode5->GetInput_UNIT_TEST("Set"); - - EXPECT_NE(value1, value2); - EXPECT_NE(value1, value3); - EXPECT_NE(value1, value4); - EXPECT_NE(value1, value5); - EXPECT_NE(value2, value3); - EXPECT_NE(value2, value4); - EXPECT_NE(value2, value5); - EXPECT_NE(value3, value4); - EXPECT_NE(value3, value5); - EXPECT_NE(value4, value5); - - // data - EXPECT_TRUE(Connect(*graph, valueID1, "Get", maxByValueID, "Number: 0")); - EXPECT_TRUE(Connect(*graph, valueID2, "Get", maxByValueID, "Number: 1")); - EXPECT_TRUE(Connect(*graph, maxByValueID, "Result: Number", valueID3, "Set")); - EXPECT_TRUE(Connect(*graph, valueID3, "Get", valueID4, "Set")); - EXPECT_TRUE(Connect(*graph, maxByValueID, "Result: Number", valueID5, "Set")); - - EXPECT_TRUE(Connect(*graph, startID, "Out", maxByValueID, "In")); - - delete graph->GetEntity(); - - m_serializeContext->EnableRemoveReflection(); - m_behaviorContext->EnableRemoveReflection(); - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - m_serializeContext->DisableRemoveReflection(); - m_behaviorContext->DisableRemoveReflection(); -} - -TEST_F(ScriptCanvasTestFixture, NodeGenericsByValueMulti) -{ - using namespace ScriptCanvas; - using namespace ScriptCanvas::Nodes; - - RegisterComponentDescriptor(); - - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - - TestBehaviorContextObject::ResetCounts(); - - UnitTestEventsHandler unitTestHandler; - unitTestHandler.BusConnect(); - - Graph* graph = nullptr; - SystemRequestBus::BroadcastResult(graph, &SystemRequests::MakeGraph); - EXPECT_TRUE(graph != nullptr); - graph->GetEntity()->Init(); - - const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId(); - - AZ::EntityId startID; - CreateTestNode(graphUniqueId, startID); - - AZ::EntityId maxByValueID; - CreateTestNode(graphUniqueId, maxByValueID); - AZ::EntityId valueID1, valueID2, valueID3, valueID4, valueID5; - - Core::BehaviorContextObjectNode* valueNode1 = CreateTestNode(graphUniqueId, valueID1); - valueNode1->InitializeObject(azrtti_typeid()); - valueNode1->ModInput_UNIT_TEST("Set")->SetValue(1); - EXPECT_EQ(1, valueNode1->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode2 = CreateTestNode(graphUniqueId, valueID2); - valueNode2->InitializeObject(azrtti_typeid()); - valueNode2->ModInput_UNIT_TEST("Set")->SetValue(2); - EXPECT_EQ(2, valueNode2->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode3 = CreateTestNode(graphUniqueId, valueID3); - valueNode3->InitializeObject(azrtti_typeid()); - valueNode3->ModInput_UNIT_TEST("Set")->SetValue(3); - EXPECT_EQ(3, valueNode3->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode4 = CreateTestNode(graphUniqueId, valueID4); - valueNode4->InitializeObject(azrtti_typeid()); - valueNode4->ModInput_UNIT_TEST("Set")->SetValue(4); - EXPECT_EQ(4, valueNode4->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode5 = CreateTestNode(graphUniqueId, valueID5); - valueNode5->InitializeObject(azrtti_typeid()); - valueNode5->ModInput_UNIT_TEST("Set")->SetValue(5); - EXPECT_EQ(5, valueNode5->GetInput_UNIT_TEST("Set")->GetValue()); - - auto value1 = valueNode1->GetInput_UNIT_TEST("Set"); - auto value2 = valueNode2->GetInput_UNIT_TEST("Set"); - auto value3 = valueNode3->GetInput_UNIT_TEST("Set"); - auto value4 = valueNode4->GetInput_UNIT_TEST("Set"); - auto value5 = valueNode5->GetInput_UNIT_TEST("Set"); - - EXPECT_NE(value1, value2); - EXPECT_NE(value1, value3); - EXPECT_NE(value1, value4); - EXPECT_NE(value1, value5); - EXPECT_NE(value2, value3); - EXPECT_NE(value2, value4); - EXPECT_NE(value2, value5); - EXPECT_NE(value3, value4); - EXPECT_NE(value3, value5); - EXPECT_NE(value4, value5); - - AZ::EntityId valueIntegerID1, valueIntegerID2, valueIntegerID3, valueIntegerID4, valueIntegerID5; - - Node* valueIntegerNode1 = CreateDataNode(graphUniqueId, 1, valueIntegerID1); - EXPECT_EQ(1, *valueIntegerNode1->GetInput_UNIT_TEST("Set")); - - Node* valueIntegerNode2 = CreateDataNode(graphUniqueId, 2, valueIntegerID2); - EXPECT_EQ(2, *valueIntegerNode2->GetInput_UNIT_TEST("Set")); - - Node* valueIntegerNode3 = CreateDataNode(graphUniqueId, 3, valueIntegerID3); - EXPECT_EQ(3, *valueIntegerNode3->GetInput_UNIT_TEST("Set")); - - Node* valueIntegerNode4 = CreateDataNode(graphUniqueId, 4, valueIntegerID4); - EXPECT_EQ(4, *valueIntegerNode4->GetInput_UNIT_TEST("Set")); - - Node* valueIntegerNode5 = CreateDataNode(graphUniqueId, 5, valueIntegerID5); - EXPECT_EQ(5, *valueIntegerNode5->GetInput_UNIT_TEST("Set")); - - auto valueInteger1 = valueIntegerNode1->GetInput_UNIT_TEST("Set"); - auto valueInteger2 = valueIntegerNode2->GetInput_UNIT_TEST("Set"); - auto valueInteger3 = valueIntegerNode3->GetInput_UNIT_TEST("Set"); - auto valueInteger4 = valueIntegerNode4->GetInput_UNIT_TEST("Set"); - auto valueInteger5 = valueIntegerNode5->GetInput_UNIT_TEST("Set"); - - EXPECT_NE(valueInteger1, valueInteger2); - EXPECT_NE(valueInteger1, valueInteger3); - EXPECT_NE(valueInteger1, valueInteger4); - EXPECT_NE(valueInteger1, valueInteger5); - EXPECT_NE(valueInteger2, valueInteger3); - EXPECT_NE(valueInteger2, valueInteger4); - EXPECT_NE(valueInteger2, valueInteger5); - EXPECT_NE(valueInteger3, valueInteger4); - EXPECT_NE(valueInteger3, valueInteger5); - EXPECT_NE(valueInteger4, valueInteger5); - - // data - EXPECT_TRUE(Connect(*graph, valueID1, "Get", maxByValueID, "TestBehaviorContextObject: 0")); - EXPECT_TRUE(Connect(*graph, valueID2, "Get", maxByValueID, "TestBehaviorContextObject: 1")); - EXPECT_TRUE(Connect(*graph, maxByValueID, "Result: TestBehaviorContextObject", valueID3, "Set")); - EXPECT_TRUE(Connect(*graph, valueID3, "Get", valueID4, "Set")); - EXPECT_TRUE(Connect(*graph, maxByValueID, "Result: TestBehaviorContextObject", valueID5, "Set")); - - EXPECT_TRUE(Connect(*graph, valueIntegerID1, "Get", maxByValueID, "Number: 0")); - EXPECT_TRUE(Connect(*graph, valueIntegerID2, "Get", maxByValueID, "Number: 1")); - EXPECT_TRUE(Connect(*graph, maxByValueID, "Result: Number", valueIntegerID3, "Set")); - EXPECT_TRUE(Connect(*graph, valueIntegerID3, "Get", valueIntegerID4, "Set")); - EXPECT_TRUE(Connect(*graph, maxByValueID, "Result: Number", valueIntegerID5, "Set")); - - EXPECT_TRUE(Connect(*graph, startID, "Out", maxByValueID, "In")); - - delete graph->GetEntity(); - - m_serializeContext->EnableRemoveReflection(); - m_behaviorContext->EnableRemoveReflection(); - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - m_serializeContext->DisableRemoveReflection(); - m_behaviorContext->DisableRemoveReflection(); -} - -TEST_F(ScriptCanvasTestFixture, NodeGenericsByReferenceMulti) -{ - using namespace ScriptCanvas; - using namespace ScriptCanvas::Nodes; - - RegisterComponentDescriptor(); - - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - - TestBehaviorContextObject::ResetCounts(); - - UnitTestEventsHandler unitTestHandler; - unitTestHandler.BusConnect(); - - Graph* graph = nullptr; - SystemRequestBus::BroadcastResult(graph, &SystemRequests::MakeGraph); - EXPECT_TRUE(graph != nullptr); - graph->GetEntity()->Init(); - - const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId(); - - AZ::EntityId startID; - CreateTestNode(graphUniqueId, startID); - - AZ::EntityId maxByReferenceID; - CreateTestNode(graphUniqueId, maxByReferenceID); - AZ::EntityId valueID1, valueID2, valueID3, valueID4, valueID5; - - Core::BehaviorContextObjectNode* valueNode1 = CreateTestNode(graphUniqueId, valueID1); - valueNode1->InitializeObject(azrtti_typeid()); - valueNode1->ModInput_UNIT_TEST("Set")->SetValue(1); - EXPECT_EQ(1, valueNode1->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode2 = CreateTestNode(graphUniqueId, valueID2); - valueNode2->InitializeObject(azrtti_typeid()); - valueNode2->ModInput_UNIT_TEST("Set")->SetValue(2); - EXPECT_EQ(2, valueNode2->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode3 = CreateTestNode(graphUniqueId, valueID3); - valueNode3->InitializeObject(azrtti_typeid()); - valueNode3->ModInput_UNIT_TEST("Set")->SetValue(3); - EXPECT_EQ(3, valueNode3->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode4 = CreateTestNode(graphUniqueId, valueID4); - valueNode4->InitializeObject(azrtti_typeid()); - valueNode4->ModInput_UNIT_TEST("Set")->SetValue(4); - EXPECT_EQ(4, valueNode4->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode5 = CreateTestNode(graphUniqueId, valueID5); - valueNode5->InitializeObject(azrtti_typeid()); - valueNode5->ModInput_UNIT_TEST("Set")->SetValue(5); - EXPECT_EQ(5, valueNode5->GetInput_UNIT_TEST("Set")->GetValue()); - - auto value1 = valueNode1->GetInput_UNIT_TEST("Set"); - auto value2 = valueNode2->GetInput_UNIT_TEST("Set"); - auto value3 = valueNode3->GetInput_UNIT_TEST("Set"); - auto value4 = valueNode4->GetInput_UNIT_TEST("Set"); - auto value5 = valueNode5->GetInput_UNIT_TEST("Set"); - - EXPECT_NE(value1, value2); - EXPECT_NE(value1, value3); - EXPECT_NE(value1, value4); - EXPECT_NE(value1, value5); - EXPECT_NE(value2, value3); - EXPECT_NE(value2, value4); - EXPECT_NE(value2, value5); - EXPECT_NE(value3, value4); - EXPECT_NE(value3, value5); - EXPECT_NE(value4, value5); - - AZ::EntityId valueIntegerID1, valueIntegerID2, valueIntegerID3, valueIntegerID4, valueIntegerID5; - - Node* valueIntegerNode1 = CreateDataNode(graphUniqueId, 1, valueIntegerID1); - EXPECT_EQ(1, *valueIntegerNode1->GetInput_UNIT_TEST("Set")); - - Node* valueIntegerNode2 = CreateDataNode(graphUniqueId, 2, valueIntegerID2); - EXPECT_EQ(2, *valueIntegerNode2->GetInput_UNIT_TEST("Set")); - - Node* valueIntegerNode3 = CreateDataNode(graphUniqueId, 3, valueIntegerID3); - EXPECT_EQ(3, *valueIntegerNode3->GetInput_UNIT_TEST("Set")); - - Node* valueIntegerNode4 = CreateDataNode(graphUniqueId, 4, valueIntegerID4); - EXPECT_EQ(4, *valueIntegerNode4->GetInput_UNIT_TEST("Set")); - - Node* valueIntegerNode5 = CreateDataNode(graphUniqueId, 5, valueIntegerID5); - EXPECT_EQ(5, *valueIntegerNode5->GetInput_UNIT_TEST("Set")); - - auto valueInteger1 = valueIntegerNode1->GetInput_UNIT_TEST("Set"); - auto valueInteger2 = valueIntegerNode2->GetInput_UNIT_TEST("Set"); - auto valueInteger3 = valueIntegerNode3->GetInput_UNIT_TEST("Set"); - auto valueInteger4 = valueIntegerNode4->GetInput_UNIT_TEST("Set"); - auto valueInteger5 = valueIntegerNode5->GetInput_UNIT_TEST("Set"); - - EXPECT_NE(valueInteger1, valueInteger2); - EXPECT_NE(valueInteger1, valueInteger3); - EXPECT_NE(valueInteger1, valueInteger4); - EXPECT_NE(valueInteger1, valueInteger5); - EXPECT_NE(valueInteger2, valueInteger3); - EXPECT_NE(valueInteger2, valueInteger4); - EXPECT_NE(valueInteger2, valueInteger5); - EXPECT_NE(valueInteger3, valueInteger4); - EXPECT_NE(valueInteger3, valueInteger5); - EXPECT_NE(valueInteger4, valueInteger5); - - // data - EXPECT_TRUE(Connect(*graph, valueID1, "Get", maxByReferenceID, "TestBehaviorContextObject: 0")); - EXPECT_TRUE(Connect(*graph, valueID2, "Get", maxByReferenceID, "TestBehaviorContextObject: 1")); - EXPECT_TRUE(Connect(*graph, maxByReferenceID, "Result: TestBehaviorContextObject", valueID3, "Set")); - EXPECT_TRUE(Connect(*graph, valueID3, "Get", valueID4, "Set")); - EXPECT_TRUE(Connect(*graph, maxByReferenceID, "Result: TestBehaviorContextObject", valueID5, "Set")); - - EXPECT_TRUE(Connect(*graph, valueIntegerID1, "Get", maxByReferenceID, "Number: 0")); - EXPECT_TRUE(Connect(*graph, valueIntegerID2, "Get", maxByReferenceID, "Number: 1")); - EXPECT_TRUE(Connect(*graph, maxByReferenceID, "Result: Number", valueIntegerID3, "Set")); - EXPECT_TRUE(Connect(*graph, valueIntegerID3, "Get", valueIntegerID4, "Set")); - EXPECT_TRUE(Connect(*graph, maxByReferenceID, "Result: Number", valueIntegerID5, "Set")); - - EXPECT_TRUE(Connect(*graph, startID, "Out", maxByReferenceID, "In")); - - delete graph->GetEntity(); - - m_serializeContext->EnableRemoveReflection(); - m_behaviorContext->EnableRemoveReflection(); - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - m_serializeContext->DisableRemoveReflection(); - m_behaviorContext->DisableRemoveReflection(); -} - -TEST_F(ScriptCanvasTestFixture, NodeGenericsByPointerMulti) -{ - using namespace ScriptCanvas; - using namespace ScriptCanvas::Nodes; - - RegisterComponentDescriptor(); - - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - - TestBehaviorContextObject::ResetCounts(); - - UnitTestEventsHandler unitTestHandler; - unitTestHandler.BusConnect(); - - Graph* graph = nullptr; - SystemRequestBus::BroadcastResult(graph, &SystemRequests::MakeGraph); - EXPECT_TRUE(graph != nullptr); - graph->GetEntity()->Init(); - - const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId(); - - AZ::EntityId startID; - CreateTestNode(graphUniqueId, startID); - - AZ::EntityId maxByPointerID; - CreateTestNode(graphUniqueId, maxByPointerID); - AZ::EntityId valueID1, valueID2, valueID3, valueID4, valueID5; - - Core::BehaviorContextObjectNode* valueNode1 = CreateTestNode(graphUniqueId, valueID1); - valueNode1->InitializeObject(azrtti_typeid()); - valueNode1->ModInput_UNIT_TEST("Set")->SetValue(1); - EXPECT_EQ(1, valueNode1->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode2 = CreateTestNode(graphUniqueId, valueID2); - valueNode2->InitializeObject(azrtti_typeid()); - valueNode2->ModInput_UNIT_TEST("Set")->SetValue(2); - EXPECT_EQ(2, valueNode2->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode3 = CreateTestNode(graphUniqueId, valueID3); - valueNode3->InitializeObject(azrtti_typeid()); - valueNode3->ModInput_UNIT_TEST("Set")->SetValue(3); - EXPECT_EQ(3, valueNode3->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode4 = CreateTestNode(graphUniqueId, valueID4); - valueNode4->InitializeObject(azrtti_typeid()); - valueNode4->ModInput_UNIT_TEST("Set")->SetValue(4); - EXPECT_EQ(4, valueNode4->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode5 = CreateTestNode(graphUniqueId, valueID5); - valueNode5->InitializeObject(azrtti_typeid()); - valueNode5->ModInput_UNIT_TEST("Set")->SetValue(5); - EXPECT_EQ(5, valueNode5->GetInput_UNIT_TEST("Set")->GetValue()); - - auto value1 = valueNode1->GetInput_UNIT_TEST("Set"); - auto value2 = valueNode2->GetInput_UNIT_TEST("Set"); - auto value3 = valueNode3->GetInput_UNIT_TEST("Set"); - auto value4 = valueNode4->GetInput_UNIT_TEST("Set"); - auto value5 = valueNode5->GetInput_UNIT_TEST("Set"); - - EXPECT_NE(value1, value2); - EXPECT_NE(value1, value3); - EXPECT_NE(value1, value4); - EXPECT_NE(value1, value5); - EXPECT_NE(value2, value3); - EXPECT_NE(value2, value4); - EXPECT_NE(value2, value5); - EXPECT_NE(value3, value4); - EXPECT_NE(value3, value5); - EXPECT_NE(value4, value5); - - AZ::EntityId valueIntegerID1, valueIntegerID2, valueIntegerID3, valueIntegerID4, valueIntegerID5; - - Node* valueIntegerNode1 = CreateDataNode(graphUniqueId, 1, valueIntegerID1); - EXPECT_EQ(1, *valueIntegerNode1->GetInput_UNIT_TEST("Set")); - - Node* valueIntegerNode2 = CreateDataNode(graphUniqueId, 2, valueIntegerID2); - EXPECT_EQ(2, *valueIntegerNode2->GetInput_UNIT_TEST("Set")); - - Node* valueIntegerNode3 = CreateDataNode(graphUniqueId, 3, valueIntegerID3); - EXPECT_EQ(3, *valueIntegerNode3->GetInput_UNIT_TEST("Set")); - - Node* valueIntegerNode4 = CreateDataNode(graphUniqueId, 4, valueIntegerID4); - EXPECT_EQ(4, *valueIntegerNode4->GetInput_UNIT_TEST("Set")); - - Node* valueIntegerNode5 = CreateDataNode(graphUniqueId, 5, valueIntegerID5); - EXPECT_EQ(5, *valueIntegerNode5->GetInput_UNIT_TEST("Set")); - - auto valueInteger1 = valueIntegerNode1->GetInput_UNIT_TEST("Set"); - auto valueInteger2 = valueIntegerNode2->GetInput_UNIT_TEST("Set"); - auto valueInteger3 = valueIntegerNode3->GetInput_UNIT_TEST("Set"); - auto valueInteger4 = valueIntegerNode4->GetInput_UNIT_TEST("Set"); - auto valueInteger5 = valueIntegerNode5->GetInput_UNIT_TEST("Set"); - - EXPECT_NE(valueInteger1, valueInteger2); - EXPECT_NE(valueInteger1, valueInteger3); - EXPECT_NE(valueInteger1, valueInteger4); - EXPECT_NE(valueInteger1, valueInteger5); - EXPECT_NE(valueInteger2, valueInteger3); - EXPECT_NE(valueInteger2, valueInteger4); - EXPECT_NE(valueInteger2, valueInteger5); - EXPECT_NE(valueInteger3, valueInteger4); - EXPECT_NE(valueInteger3, valueInteger5); - EXPECT_NE(valueInteger4, valueInteger5); - - // data - EXPECT_TRUE(Connect(*graph, valueID1, "Get", maxByPointerID, "TestBehaviorContextObject: 0")); - EXPECT_TRUE(Connect(*graph, valueID2, "Get", maxByPointerID, "TestBehaviorContextObject: 1")); - EXPECT_TRUE(Connect(*graph, maxByPointerID, "Result: TestBehaviorContextObject", valueID3, "Set")); - EXPECT_TRUE(Connect(*graph, valueID3, "Get", valueID4, "Set")); - EXPECT_TRUE(Connect(*graph, maxByPointerID, "Result: TestBehaviorContextObject", valueID5, "Set")); - - EXPECT_TRUE(Connect(*graph, valueIntegerID1, "Get", maxByPointerID, "Number: 0")); - EXPECT_TRUE(Connect(*graph, valueIntegerID2, "Get", maxByPointerID, "Number: 1")); - EXPECT_TRUE(Connect(*graph, maxByPointerID, "Result: Number", valueIntegerID3, "Set")); - EXPECT_TRUE(Connect(*graph, valueIntegerID3, "Get", valueIntegerID4, "Set")); - EXPECT_TRUE(Connect(*graph, maxByPointerID, "Result: Number", valueIntegerID5, "Set")); - - EXPECT_TRUE(Connect(*graph, startID, "Out", maxByPointerID, "In")); - - delete graph->GetEntity(); - - m_serializeContext->EnableRemoveReflection(); - m_behaviorContext->EnableRemoveReflection(); - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - m_serializeContext->DisableRemoveReflection(); - m_behaviorContext->DisableRemoveReflection(); -} #pragma warning( pop ) diff --git a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_RuntimeInterpreted.cpp b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_RuntimeInterpreted.cpp index e7657cff65..db3d2223d6 100644 --- a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_RuntimeInterpreted.cpp +++ b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_RuntimeInterpreted.cpp @@ -14,8 +14,6 @@ #include #include #include -#include -#include #include #include #include @@ -85,6 +83,16 @@ public: } }; +TEST_F(ScriptCanvasTestFixture, ProveError) +{ + EXPECT_TRUE(false); +} + +TEST_F(ScriptCanvasTestFixture, ParseErrorOnKnownNull) +{ + ExpectParseError("LY_SC_UnitTest_ParseErrorOnKnownNull"); +} + TEST_F(ScriptCanvasTestFixture, UseBehaviorContextClassConstant) { RunUnitTestGraph("LY_SC_UnitTest_UseBehaviorContextClassConstant"); @@ -931,181 +939,3 @@ TEST_F(ScriptCanvasTestFixture, InterpretedExecutionOutPerformance) { RunUnitTestGraph("LY_SC_UnitTest_ExecutionOutPerformance", ExecutionMode::Interpreted); } - -#if defined(FUNCTION_LEGACY_SUPPORT_ENABLED) - -TEST_F(ScriptCanvasTestFixture, InterpretedSubgraph_UserNodeable) -{ - ExpectParse("LY_SC_UnitTest_Subgraph_UserNodeableD"); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedSubgraph_UserNodeableLatent) -{ - ExpectParse("LY_SC_UnitTest_Subgraph_UserNodeableLatent"); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedUseFunctionWithOnGraphStart) -{ - RunUnitTestGraph("LY_SC_UnitTest_UseFunctionWithOnGraphStart"); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedUseSubgraphWithStartAndEBus) -{ - RunUnitTestGraph("LY_SC_UnitTests_UseSubgraphWithStartAndEBus"); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedDeviousStateFunctionFixGraph) -{ - RunUnitTestGraph("LY_SC_UnitTest_DeviousStateFunctionFixGraph"); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedCallFunctionLocalValues) -{ - RunUnitTestGraph("LY_SC_UnitTest_CallFunctionLocalValues"); -} - -TEST_F(ScriptCanvasTestFixture, ParseFunctionLocalObjects) -{ - ExpectParse("LY_SC_UnitTest_FunctionLocalObjects"); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedFunctionLocalObjectsCall) -{ - RunUnitTestGraph("LY_SC_UnitTest_FunctionLocalObjectsCall", ExecutionMode::Interpreted, DurationSpec::Ticks(31)); -} - -TEST_F(ScriptCanvasTestFixture, ParseFunctionWithOnGraphStart) -{ - ExpectParse("LY_SC_UnitTest_FunctionWithOnGraphStart"); -} - -TEST_F(ScriptCanvasTestFixture, NodeableDurationSubgraphDirectionExposedOutWithOutput) -{ - RunUnitTestGraph("LY_SC_UnitTest_NodeableDurationSubgraphDirectionExposedOutWithOutput", ExecutionMode::Interpreted, DurationSpec::Ticks(3)); -} - -TEST_F(ScriptCanvasTestFixture, ParseOrderedSequencerFunction) -{ - ExpectParse("LY_SC_UnitTest_OrderedSequencerFunction"); -} - -TEST_F(ScriptCanvasTestFixture, ParseFunction_Names_With_Spaces) -{ - ExpectParse("LY_SC_UnitTest_Function Names With Spaces"); -} - -TEST_F(ScriptCanvasTestFixture, ParseFunctionNameEvilVersion) -{ - ExpectParse("LY_SC_UnitTest_Function Names(With) Random+Strings Evil~Version"); -} - -TEST_F(ScriptCanvasTestFixture, ParseFunctionNameEvilVersionInFolder) -{ - ExpectParse("TestFunction/LY_SC_UnitTest_Function Names(With) Random+Strings Evil~Version-In^Forder"); -} - -TEST_F(ScriptCanvasTestFixture, ParseNodeableDurationFunction) -{ - ExpectParse("LY_SC_UnitTest_NodeableDurationFunction"); -} - -TEST_F(ScriptCanvasTestFixture, ParseNodeableDurationFunctionDirectExposure) -{ - ExpectParse("LY_SC_UnitTest_NodeableDurationFunctionDirectExposure"); -} - -TEST_F(ScriptCanvasTestFixture, ParseNodeableDurationFunctionDirectExposureWithOutput) -{ - ExpectParse("LY_SC_UnitTest_NodeableDurationFunctionDirectExposureWithOutput"); -} - - -TEST_F(ScriptCanvasTestFixture, ParseFunctionBranchSingleNamedOutJustReturns) -{ - ExpectParse("LY_SC_UnitTest_ParseFunctionBranchSingleNamedOutJustReturns"); -} - -TEST_F(ScriptCanvasTestFixture, ParseExposeAnyOut) -{ - ExpectParse("LY_SC_UnitTest_ExposeAnyOut"); -} - -TEST_F(ScriptCanvasTestFixture, ParseMultipleInputNoParseError) -{ - ExpectParse("LY_SC_UnitTest_MultipleInputNoParseError"); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedSubgraphMultipleInError) -{ - ExpectParseError("LY_SC_UnitTest_InterpretedSubgraphMultipleInError"); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedSubgraphMultipleOutError) -{ - ExpectParseError("LY_SC_UnitTest_InterpretedSubgraphMultipleOutError"); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedSubgraphOutInLoop) -{ - ExpectParseError("LY_SC_UnitTest_InterpretedSubgraphOutInLoop"); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedSubgraphOutMidCycleMissingSlots) -{ - ExpectParseError("LY_SC_UnitTest_InterpretedSubgraphOutMidCycleMissingSlots"); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedSubgraphComplexityError) -{ - ExpectParseError("LY_SC_UnitTest_SubgraphComplexityError"); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedSubgraphReturnValueFromIn) -{ - ExpectParseError("LY_SC_UnitTest_SubgraphReturnValueFromIn"); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedSubgraphReturnValueFromInOut) -{ - ExpectParseError("LY_SC_UnitTest_SubgraphReturnValueFromInOut"); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedVerifyByValueCorrectness) -{ - RunUnitTestGraph("LY_SC_UnitTest_VerifyByValueCorrectness", ExecutionMode::Interpreted); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedFunctionNoInputOneOutputCall) -{ - RunUnitTestGraph("LY_SC_UnitTest_FunctionNoInputOneOutputCall", ExecutionMode::Interpreted); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedFunctionAddVector3Call) -{ - RunUnitTestGraph("LY_SC_UnitTest_FunctionAddVector3Call", ExecutionMode::Interpreted); -} -TEST_F(ScriptCanvasTestFixture, InterpretedParseFunction) -{ - ExpectParse("LY_SC_UnitTest_ParseFunction"); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedParseFunctionBranch) -{ - ExpectParse("LY_SC_UnitTest_ParseFunctionBranch"); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedParseFunctionBranchDefaultOut) -{ - ExpectParse("LY_SC_UnitTest_ParseFunctionBranchDefaultOut"); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedParseFunctionDefaultOut) -{ - ExpectParse("LY_SC_UnitTest_ParseFunctionDefaultOut"); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedParseFunctionOut) -{ - ExpectParse("LY_SC_UnitTest_ParseFunctionOut"); -} -#endif diff --git a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_VM.cpp b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_VM.cpp index 0733101743..8c4983da0f 100644 --- a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_VM.cpp +++ b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_VM.cpp @@ -14,8 +14,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/Gems/ScriptCanvasTesting/Code/scriptcanvastestingeditor_tests_files.cmake b/Gems/ScriptCanvasTesting/Code/scriptcanvastestingeditor_tests_files.cmake index 681a3c0ba1..b6ab617e26 100644 --- a/Gems/ScriptCanvasTesting/Code/scriptcanvastestingeditor_tests_files.cmake +++ b/Gems/ScriptCanvasTesting/Code/scriptcanvastestingeditor_tests_files.cmake @@ -15,7 +15,6 @@ set(FILES Source/Framework/ScriptCanvasTestApplication.h Source/Framework/EntityRefTests.h Tests/ScriptCanvasTestingTest.cpp - Tests/ScriptCanvas_Async.cpp Tests/ScriptCanvas_BehaviorContext.cpp Tests/ScriptCanvas_ContainerSupport.cpp Tests/ScriptCanvas_Core.cpp diff --git a/Gems/StartingPointInput/Code/Source/InputNode.cpp b/Gems/StartingPointInput/Code/Source/InputNode.cpp deleted file mode 100644 index e0f9de3657..0000000000 --- a/Gems/StartingPointInput/Code/Source/InputNode.cpp +++ /dev/null @@ -1,90 +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 - -namespace StartingPointInput -{ - void InputNode::OnPostActivate() - { - //if (GetExecutionType() == ScriptCanvas::ExecutionType::Runtime) - //{ - // const ScriptCanvas::SlotId eventNameSlotId = InputNodeProperty::GetEventNameSlotId(this); - - // m_eventName = (*(FindDatum(eventNameSlotId)->GetAs())); - // InputEventNotificationBus::Handler::BusConnect(InputEventNotificationId(m_eventName.c_str())); - //} - } - - void InputNode::OnDeactivate() - { - InputEventNotificationBus::Handler::BusDisconnect(); - } - - void InputNode::OnInputChanged(const ScriptCanvas::Datum& input, const ScriptCanvas::SlotId& slotId) - { - // we got a new event name, we need to drop our connection to the old and connect to the new event - const ScriptCanvas::SlotId eventNameSlotId = InputNodeProperty::GetEventNameSlotId(this); - - if (slotId == eventNameSlotId) - { - InputEventNotificationBus::Handler::BusDisconnect(); - - m_eventName = (*input.GetAs()); - InputEventNotificationBus::Handler::BusConnect(InputEventNotificationId(m_eventName.c_str())); - } - } - - void InputNode::OnPressed(float value) - { - m_value = value; - const ScriptCanvas::Datum output = ScriptCanvas::Datum(m_value); - const ScriptCanvas::SlotId pressedSlotId = InputNodeProperty::GetPressedSlotId(this); - const ScriptCanvas::SlotId valueId = InputNodeProperty::GetValueSlotId(this); - - if (auto* slot = GetSlot(valueId)) - { - PushOutput(output, *slot); - } - - SignalOutput(pressedSlotId); - } - - void InputNode::OnHeld(float value) - { - m_value = value; - const ScriptCanvas::Datum output = ScriptCanvas::Datum(m_value); - const ScriptCanvas::SlotId heldSlotId = InputNodeProperty::GetHeldSlotId(this); - const ScriptCanvas::SlotId valueId = InputNodeProperty::GetValueSlotId(this); - if (auto* slot = GetSlot(valueId)) - { - PushOutput(output, *slot); - } - SignalOutput(heldSlotId); - } - - void InputNode::OnReleased(float value) - { - m_value = value; - const ScriptCanvas::Datum output = ScriptCanvas::Datum(m_value); - const ScriptCanvas::SlotId releasedSlotId = InputNodeProperty::GetReleasedSlotId(this); - const ScriptCanvas::SlotId valueId = InputNodeProperty::GetValueSlotId(this); - - if (auto* slot = GetSlot(valueId)) - { - PushOutput(output, *slot); - } - SignalOutput(releasedSlotId); - } -} diff --git a/Gems/StartingPointInput/Code/Source/InputNode.h b/Gems/StartingPointInput/Code/Source/InputNode.h index d71c302f2b..c4e85f2a5b 100644 --- a/Gems/StartingPointInput/Code/Source/InputNode.h +++ b/Gems/StartingPointInput/Code/Source/InputNode.h @@ -10,18 +10,15 @@ #include #include - -#include - #include namespace StartingPointInput { ////////////////////////////////////////////////////////////////////////// /// Input handles raw input from any source and outputs Pressed, Held, and Released input events + /// This nodes id deprecated in favor of its nodeable counterpart. class InputNode : public ScriptCanvas::Node - , protected InputEventNotificationBus::Handler { public: @@ -35,21 +32,5 @@ namespace StartingPointInput AZStd::string m_eventName; float m_value; - - ////////////////////////////////////////////////////////////////////////// - /// ScriptCanvas_Node - void OnInputChanged(const ScriptCanvas::Datum& input, const ScriptCanvas::SlotId& slotId) override; - - protected: - ////////////////////////////////////////////////////////////////////////// - /// Node - void OnPostActivate() override; - void OnDeactivate() override; - - ////////////////////////////////////////////////////////////////////////// - /// InputEventNotificationBus::Handler - void OnPressed(float value) override; - void OnHeld(float value) override; - void OnReleased(float value) override; }; } diff --git a/Gems/StartingPointInput/Code/startingpointinput_files.cmake b/Gems/StartingPointInput/Code/startingpointinput_files.cmake index 933f32ec66..000c361b5b 100644 --- a/Gems/StartingPointInput/Code/startingpointinput_files.cmake +++ b/Gems/StartingPointInput/Code/startingpointinput_files.cmake @@ -17,7 +17,6 @@ set(FILES Source/InputLibrary.h Source/InputLibrary.cpp Source/InputNode.h - Source/InputNode.cpp Source/InputHandlerNodeable.h Source/InputHandlerNodeable.cpp Source/InputHandlerNodeable.ScriptCanvasNodeable.xml diff --git a/Gems/Vegetation/Code/Source/Debugger/DebugComponent.cpp b/Gems/Vegetation/Code/Source/Debugger/DebugComponent.cpp index c24c380d6f..2f3c8d08be 100644 --- a/Gems/Vegetation/Code/Source/Debugger/DebugComponent.cpp +++ b/Gems/Vegetation/Code/Source/Debugger/DebugComponent.cpp @@ -10,7 +10,10 @@ #include "AreaSystemComponent.h" #include "InstanceSystemComponent.h" +#include +#include #include +#include #include #include #include @@ -22,11 +25,6 @@ #include #include -#include -#include -#include -#include - #include namespace Vegetation @@ -112,18 +110,16 @@ void DebugComponent::Activate() DebugRequestBus::Handler::BusConnect(); DebugNotificationBus::Handler::BusConnect(); DebugNotificationBus::AllowFunctionQueuing(true); - AzFramework::DebugDisplayEventBus::Handler::BusConnect(); + AzFramework::EntityDebugDisplayEventBus::Handler::BusConnect(GetEntityId()); SystemConfigurationRequestBus::Handler::BusConnect(); - AddConsoleVariables(); VEG_PROFILE_METHOD(DebugSystemDataBus::BroadcastResult(m_debugData, &DebugSystemDataBus::Events::GetDebugData)); } void DebugComponent::Deactivate() { - RemoveConsoleVariables(); SystemConfigurationRequestBus::Handler::BusDisconnect(); - AzFramework::DebugDisplayEventBus::Handler::BusDisconnect(); + AzFramework::EntityDebugDisplayEventBus::Handler::BusDisconnect(); DebugRequestBus::Handler::BusDisconnect(); DebugNotificationBus::Handler::BusDisconnect(); @@ -153,7 +149,7 @@ bool DebugComponent::WriteOutConfig(AZ::ComponentConfig* outBaseConfig) const return false; } -void DebugComponent::DrawGlobalDebugInfo() +void DebugComponent::DisplayEntityViewport(const AzFramework::ViewportInfo& viewportInfo, AzFramework::DebugDisplayRequests& debugDisplay) { // time to collect the report? if (AZStd::chrono::microseconds(AZStd::chrono::system_clock::now() - m_lastCollectionTime).count() > m_configuration.m_collectionFrequencyUs) @@ -173,23 +169,25 @@ void DebugComponent::DrawGlobalDebugInfo() m_exportCurrentReport = false; } + if (m_configuration.m_showVisualization) + { + DrawSectorTimingData(viewportInfo, debugDisplay); + } + if (m_configuration.m_showDebugStats) { - DrawDebugStats(); + DrawDebugStats(debugDisplay); } if (m_configuration.m_showInstanceVisualization) { - DrawInstanceDebug(); + DrawInstanceDebug(debugDisplay); } } -void DebugComponent::DrawInstanceDebug() +void DebugComponent::DrawInstanceDebug([[maybe_unused]] AzFramework::DebugDisplayRequests& debugDisplay) { #if defined(VEG_PROFILE_ENABLED) - // ToDo: Re-implement with Atom. LYN-3681 - /*renderAuxGeom->SetRenderFlags(e_Mode3D | e_FillModeSolid | e_CullModeBack | e_DepthWriteOff | e_DepthTestOn); - AZStd::unordered_map areaDebugDisplayDataMap; for (const auto& instance : m_activeInstances) @@ -213,16 +211,87 @@ void DebugComponent::DrawInstanceDebug() { continue; } - - Vec3 pos(AZVec3ToLYVec3(instanceData.m_position)); - Vec3 radius(areaDebugDisplayData.m_instanceSize * 0.5f); - AABB bounds(pos - radius, pos + radius); - renderAuxGeom->DrawAABB(bounds, true, ColorB(areaDebugDisplayData.m_instanceColor.ToU32()), eBBD_Faceted); - }*/ + AZ::Vector3 radius(areaDebugDisplayData.m_instanceSize * 0.5f); + debugDisplay.SetColor(areaDebugDisplayData.m_instanceColor); + debugDisplay.DrawSolidBox(instanceData.m_position - radius, instanceData.m_position + radius); + } #endif } +void DebugComponent::DrawSectorTimingData(const AzFramework::ViewportInfo& viewportInfo, AzFramework::DebugDisplayRequests& debugDisplay) +{ + static const AZ::Color s_green = AZ::Color(0.3f, 0.9f, 0.3f, .05f); + static const AZ::Color s_yellow = AZ::Color(1.0f, 1.0f, 0.0f, .05f); + static const AZ::Color s_red = AZ::Color(1.0f, 0.0f, 0.0f, .05f); + static const float boxHeightAboveTerrain = 3.0f; + + + AreaSystemConfig areaConfig; + SystemConfigurationRequestBus::Broadcast(&SystemConfigurationRequestBus::Events::GetSystemConfig, &areaConfig); + const auto sectorSizeInMeters = areaConfig.m_sectorSizeInMeters; + const AZ::u32 maxTextDisplayDistance = m_configuration.m_maxLabelDisplayDistance; + const int maxDisplayCount = m_configuration.m_maxDatapointDisplayCount; + + AZ::Vector3 cameraPos(0.0f); + if (auto viewportContextRequests = AZ::RPI::ViewportContextRequests::Get(); viewportContextRequests) + { + AZ::RPI::ViewportContextPtr viewportContext = viewportContextRequests->GetViewportContextById(viewportInfo.m_viewportId); + cameraPos = viewportContext->GetCameraTransform().GetTranslation(); + } + AZ::Vector2 cameraPos2d(cameraPos.GetX(), cameraPos.GetY()); + + for (int i = 0; i < maxDisplayCount && i < m_currentSortedTimingList.size(); ++i) + { + const auto& sectorTiming = m_currentSortedTimingList[i]; + + AZ::Vector3 topCorner{ float(sectorTiming.m_id.first), float(sectorTiming.m_id.second), 0.0f }; + topCorner *= float(sectorSizeInMeters); + + AZ::Vector3 bottomCorner = topCorner + + AZ::Vector3(float(sectorSizeInMeters), float(sectorSizeInMeters), sectorTiming.m_worldPosition.GetZ() + boxHeightAboveTerrain); + + auto aabb = AZ::Aabb::CreateFromMinMax(topCorner, bottomCorner); + const AZ::Color* color = &s_yellow; + + if (sectorTiming.m_averageTimeUs >= m_configuration.m_maxThresholdUs) + { + color = &s_red; + } + else if (sectorTiming.m_averageTimeUs < m_configuration.m_minThresholdUs) + { + color = &s_green; + } + + AZ::Color outlineColor(color->GetR(), color->GetG(), color->GetB(), 1.0f); + + // Box around the entire sector + debugDisplay.SetColor(*color); + debugDisplay.DrawSolidBox(aabb.GetMin(), aabb.GetMax()); + debugDisplay.SetColor(outlineColor); + debugDisplay.DrawWireBox(aabb.GetMin(), aabb.GetMax()); + + // Smaller box inside the sector + const AZ::Vector3 innerBoxRadius(0.5f); + debugDisplay.SetColor(outlineColor); + debugDisplay.DrawSolidBox(sectorTiming.m_worldPosition - innerBoxRadius, sectorTiming.m_worldPosition + innerBoxRadius); + + AZ::Vector2 sectorPos2d(sectorTiming.m_worldPosition.GetX(), sectorTiming.m_worldPosition.GetY()); + float distanceToCamera = cameraPos2d.GetDistance(sectorPos2d); + + if (distanceToCamera <= maxTextDisplayDistance) + { + AZStd::string displayString = AZStd::string::format("Sector %d, %d\nTime: %dus\nUpdate Count: %d", sectorTiming.m_id.first, + sectorTiming.m_id.second, static_cast(sectorTiming.m_averageTimeUs), sectorTiming.m_updateCount); + + constexpr bool centerText = true; + constexpr float fontSize = 1.5f; + debugDisplay.SetColor(AZ::Color(1.0f)); + debugDisplay.DrawTextLabel(sectorTiming.m_worldPosition, fontSize, displayString.c_str(), centerText); + } + } +} + void DebugComponent::CopyReportToSortedList() { m_currentSortedTimingList.clear(); @@ -885,23 +954,9 @@ void DebugComponent::PrepareNextReport() }); } -void DebugComponent::RemoveConsoleVariables() +void DebugComponent::DrawDebugStats(AzFramework::DebugDisplayRequests& debugDisplay) { - ISystem* crySystem = GetISystem(); - if (crySystem && crySystem->GetIConsole()) - { - IConsole* console = crySystem->GetIConsole(); - console->RemoveCommand("veg_debugToggleVisualization"); - console->RemoveCommand("veg_debugDumpReport"); - console->RemoveCommand("veg_debugRefreshAllAreas"); - console->RemoveCommand("veg_debugClearAllAreas"); - } -} - -void DebugComponent::DrawDebugStats() -{ - // ToDo: Re-implement with Atom. LYN-3681 - /*if (!m_debugData) + if (!m_debugData) { return; } @@ -915,52 +970,48 @@ void DebugComponent::DrawDebugStats() AZ::u32 destroyTaskCount = 0; InstanceSystemStatsRequestBus::BroadcastResult(destroyTaskCount, &InstanceSystemStatsRequestBus::Events::GetDestroyTaskCount); - renderAuxGeom->Draw2dLabel(4, 16, 1.5f, ColorF(1, 1, 1), false, - AZStd::string::format("VegetationSystemStats:\nActive Instances Count: %d\nInstance Register Queue: %d\nInstance Unregister Queue: %d\nThread Queue Count: %d\nThread Processing Count: %d", - instanceCount, - createTaskCount, - destroyTaskCount, - m_debugData->m_areaTaskQueueCount.load(AZStd::memory_order_relaxed), - m_debugData->m_areaTaskActiveCount.load(AZStd::memory_order_relaxed) - ).c_str());*/ -} - -void DebugComponent::AddConsoleVariables() -{ - ISystem* crySystem = GetISystem(); - if (crySystem && crySystem->GetIConsole()) - { - IConsole* console = crySystem->GetIConsole(); - - static auto fnCmdToggleDebugger = []([[maybe_unused]] IConsoleCmdArgs* args) - { - DebugNotificationBus::Broadcast(&DebugNotificationBus::Events::ToggleVisualization); - }; - console->AddCommand("veg_debugToggleVisualization", fnCmdToggleDebugger, VF_NULL, "Toggles visualization of sector timings"); - - static auto fnCmdDumpReport = []([[maybe_unused]] IConsoleCmdArgs* args) - { - DebugNotificationBus::Broadcast(&DebugNotificationBus::Events::ExportCurrentReport); - }; - console->AddCommand("veg_debugDumpReport", fnCmdDumpReport, VF_NULL, "Writes out a vegetation sector report"); - - static auto fnRefreshAllAreas = []([[maybe_unused]] IConsoleCmdArgs* args) - { - AreaSystemRequestBus::Broadcast(&AreaSystemRequestBus::Events::RefreshAllAreas); - }; - console->AddCommand("veg_debugRefreshAllAreas", fnRefreshAllAreas, VF_NULL, "Refresh all vegetation areas in the current view"); - - static auto fnClearAllAreas = []([[maybe_unused]] IConsoleCmdArgs* args) - { - AreaSystemRequestBus::Broadcast(&AreaSystemRequestBus::Events::ClearAllAreas); - AreaSystemRequestBus::Broadcast(&AreaSystemRequestBus::Events::RefreshAllAreas); - }; - console->AddCommand("veg_debugClearAllAreas", fnClearAllAreas, VF_NULL, "Clear and refresh all vegetation areas in the current view"); - } + debugDisplay.SetColor(AZ::Color(1.0f)); + debugDisplay.Draw2dTextLabel( + 4.0f, 16.0f, 1.5f, + AZStd::string::format( + "VegetationSystemStats:\nActive Instances Count: %d\nInstance Register Queue: %d\nInstance Unregister Queue: %d\nThread " + "Queue Count: %d\nThread Processing Count: %d", + instanceCount, createTaskCount, destroyTaskCount, m_debugData->m_areaTaskQueueCount.load(AZStd::memory_order_relaxed), + m_debugData->m_areaTaskActiveCount.load(AZStd::memory_order_relaxed)) + .c_str(), + false); } namespace { + static void veg_debugToggleVisualization([[maybe_unused]] const AZ::ConsoleCommandContainer& arguments) + { + DebugNotificationBus::Broadcast(&DebugNotificationBus::Events::ToggleVisualization); + } + AZ_CONSOLEFREEFUNC(veg_debugToggleVisualization, AZ::ConsoleFunctorFlags::DontReplicate, "Toggles visualization of sector timings"); + + static void veg_debugDumpReport([[maybe_unused]] const AZ::ConsoleCommandContainer& arguments) + { + DebugNotificationBus::Broadcast(&DebugNotificationBus::Events::ExportCurrentReport); + } + AZ_CONSOLEFREEFUNC(veg_debugDumpReport, AZ::ConsoleFunctorFlags::DontReplicate, "Writes out a vegetation sector report"); + + static void veg_debugRefreshAllAreas([[maybe_unused]] const AZ::ConsoleCommandContainer& arguments) + { + AreaSystemRequestBus::Broadcast(&AreaSystemRequestBus::Events::RefreshAllAreas); + } + AZ_CONSOLEFREEFUNC( + veg_debugRefreshAllAreas, AZ::ConsoleFunctorFlags::DontReplicate, "Refresh all vegetation areas in the current view"); + + static void veg_debugClearAllAreas([[maybe_unused]] const AZ::ConsoleCommandContainer& arguments) + { + AreaSystemRequestBus::Broadcast(&AreaSystemRequestBus::Events::ClearAllAreas); + AreaSystemRequestBus::Broadcast(&AreaSystemRequestBus::Events::RefreshAllAreas); + } + AZ_CONSOLEFREEFUNC( + veg_debugClearAllAreas, AZ::ConsoleFunctorFlags::DontReplicate, "Clear and refresh all vegetation areas in the current view"); + + const char* GetSortTypeString(DebugRequests::SortType sortType) { switch (sortType) diff --git a/Gems/Vegetation/Code/Source/Debugger/DebugComponent.h b/Gems/Vegetation/Code/Source/Debugger/DebugComponent.h index 6362d98371..224ad5ded5 100644 --- a/Gems/Vegetation/Code/Source/Debugger/DebugComponent.h +++ b/Gems/Vegetation/Code/Source/Debugger/DebugComponent.h @@ -54,7 +54,7 @@ namespace Vegetation class DebugComponent : public AZ::Component - , private AzFramework::DebugDisplayEventBus::Handler + , private AzFramework::EntityDebugDisplayEventBus::Handler , private DebugRequestBus::Handler , private DebugNotificationBus::Handler , private SystemConfigurationRequestBus::Handler @@ -79,7 +79,8 @@ namespace Vegetation ////////////////////////////////////////////////////////////////////////// // EntityDebugDisplayEventBus - void DrawGlobalDebugInfo() override; + void DisplayEntityViewport( + const AzFramework::ViewportInfo& viewportInfo, AzFramework::DebugDisplayRequests& debugDisplay) override; ////////////////////////////////////////////////////////////////////////// // DebugNotifications @@ -112,10 +113,9 @@ namespace Vegetation protected: void PrepareNextReport(); void CopyReportToSortedList(); - void AddConsoleVariables(); - void RemoveConsoleVariables(); - void DrawDebugStats(); - void DrawInstanceDebug(); + void DrawSectorTimingData(const AzFramework::ViewportInfo& viewportInfo, AzFramework::DebugDisplayRequests& debugDisplay); + void DrawDebugStats(AzFramework::DebugDisplayRequests& debugDisplay); + void DrawInstanceDebug(AzFramework::DebugDisplayRequests& debugDisplay); private: AZStd::atomic_bool m_exportCurrentReport{ false }; diff --git a/Gems/WhiteBox/Code/Source/SubComponentModes/EditorWhiteBoxDefaultMode.cpp b/Gems/WhiteBox/Code/Source/SubComponentModes/EditorWhiteBoxDefaultMode.cpp index e9b5514006..b1f26e2e2e 100644 --- a/Gems/WhiteBox/Code/Source/SubComponentModes/EditorWhiteBoxDefaultMode.cpp +++ b/Gems/WhiteBox/Code/Source/SubComponentModes/EditorWhiteBoxDefaultMode.cpp @@ -34,8 +34,8 @@ namespace WhiteBox AZ::Color, cl_whiteBoxVertexIndicatorColor, AZ::Color::CreateFromRgba(0, 0, 0, 102), nullptr, AZ::ConsoleFunctorFlags::Null, "The color of the vertex indicator"); - static const AZ::Crc32 HideEdge = AZ_CRC("com.amazon.action.whitebox.hide_edge", 0x6a60ae23); - static const AZ::Crc32 HideVertex = AZ_CRC("com.amazon.action.whitebox.hide_vertex", 0x4a4bd092); + static const AZ::Crc32 HideEdge = AZ_CRC("com.o3de.action.whitebox.hide_edge", 0x6a60ae23); + static const AZ::Crc32 HideVertex = AZ_CRC("com.o3de.action.whitebox.hide_vertex", 0x4a4bd092); static const char* const HideEdgeTitle = "Hide Edge"; static const char* const HideEdgeDesc = "Hide the selected edge to merge the two connected polygons"; diff --git a/README.md b/README.md index 9cc816efe9..6b88097739 100644 --- a/README.md +++ b/README.md @@ -1,77 +1,33 @@ -## Updates to this readme -July 06, 2021 -- Switch licenses to APACHE-2.0 OR MIT +# Open 3D Engine -May 14, 2021 -- Removed instructions for the 3rdParty zip file and downloader URL. This is no longer a requirement. -- Updated instructions for dependencies -- Links to full documentation +Open 3D Engine (O3DE) is an open-source, real-time, multi-platform 3D engine that enables developers and content creators to build AAA games, cinema-quality 3D worlds, and high-fidelity simulations without any fees or commercial obligations. -April 7-13, 2021 -- Updates to the 3rdParty zip file - -March 25, 2021 -- Initial commit for instructions +## Contribute +For information about contributing to Open 3D Engine, visit https://o3de.org/docs/contributing/ ## Download and Install -This repository uses Git LFS for storing large binary files. You will need to create a Github personal access token to authenticate with the LFS service. +This repository uses Git LFS for storing large binary files. -To install Git LFS, download the binary here: https://git-lfs.github.com/. +Verify you have Git LFS installed by running the following command to print the version number. +``` +git lfs --version +``` -After installation, you will need to install the necessary git hooks with this command +If Git LFS is not installed, download and run the installer from: https://git-lfs.github.com/. + +### Install Git LFS hooks ``` git lfs install ``` -### Create a Git Personal Access Token - -You will need your personal access token credentials to authenticate when you clone the repository and when downloading objects from Git LFS - -[Create a personal access token with the 'repo' scope.](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) - -During the clone operation, you will be prompted to enter a password. Your token will be used as the password. You will also be prompted a second time for Git LFS. - -### (Recommended) Verify you have a credential manager installed to store your credentials - -Recent versions of Git install a credential manager to store your credentials so you don't have to put in the credentials for every request. - -It is highly recommended you check that you have a [credential manager installed and configured](https://github.com/microsoft/Git-Credential-Manager-Core) - -For Linux and Mac, use the following commands to store credentials - -Linux: -``` -git config --global credential.helper cache -``` -Mac: -``` -git config --global credential.helper osxkeychain -``` ### Clone the repository ```shell -> git clone https://github.com/o3de/o3de.git -Cloning into 'o3de'... - -# initial prompt for credentials to download the repository code -# enter your Github username and personal access token - -remote: Counting objects: 29619, done. -Receiving objects: 100% (29619/29619), 40.50 MiB | 881.00 KiB/s, done. -Resolving deltas: 100% (8829/8829), done. -Updating files: 100% (27037/27037), done. - -# second prompt for credentials when downloading LFS files -# enter your Github username and personal access token - -Filtering content: 100% (3853/3853), 621.43 MiB | 881.00 KiB/s, done. - +git clone https://github.com/o3de/o3de.git ``` -If you have the Git credential manager core or other credential helpers installed, you should not be prompted for your credentials anymore. - ## Building the Engine ### Build Requirements and redistributables #### Windows @@ -85,33 +41,21 @@ If you have the Git credential manager core or other credential helpers installe #### Optional -* WWise - 2019.2.8.7432 minimum: [https://www.audiokinetic.com/download/](https://www.audiokinetic.com/download/) - * Note: This requires registration and installation of a client to download - * You will also need to set a environment variable: `set LY_WWISE_INSTALL_PATH=` - * For example: `set LY_WWISE_INSTALL_PATH="C:\Program Files (x86)\Audiokinetic\Wwise 2019.2.8.7432"` +* Wwise - 2021.1.1.7601 minimum: [https://www.audiokinetic.com/download/](https://www.audiokinetic.com/download/) + * Note: This requires registration and installation of a client application to download + * Make sure to select the SDK(C++) component during installation of Wwise + * You will also need to set an environment variable: `set LY_WWISE_INSTALL_PATH=` + * For example: `set LY_WWISE_INSTALL_PATH="C:\Program Files (x86)\Audiokinetic\Wwise 2021.1.1.7601"` ### Quick Start Build Steps 1. Create a writable folder to cache 3rd Party dependencies. You can also use this to store other redistributable SDKs. - > For the 0.5 branch - Create an empty text file named `3rdParty.txt` in this folder, to allow a legacy CMake validator to pass - 1. Install the following redistributables to the following: - Visual Studio and VC++ redistributable can be installed to any location - CMake can be installed to any location, as long as it's available in the system path - - WWise can be installed anywhere, but you will need to set an environment variable for CMake to detect it: `set LY_WWISE_INSTALL_PATH=` + - (Optional) Wwise can be installed anywhere, but you will need to set an environment variable for CMake to detect it: `set LY_WWISE_INSTALL_PATH=` -1. Navigate into the repo folder, then download the python runtime with this command - - > For the 0.5 branch - Set this environment variable prior to the `get_python` command below: - > ``` - > set LY_PACKAGE_SERVER_URLS=https://d2c171ws20a1rv.cloudfront.net - > ``` - - ``` - python\get_python.bat - ``` - 1. Configure the source into a solution using this command line, replacing and <3rdParty cache path> to a path you've created: ``` cmake -B -S -G "Visual Studio 16" -DLY_3RDPARTY_PATH=<3rdParty cache path> -DLY_UNITY_BUILD=ON -DLY_PROJECTS=AutomatedTesting @@ -139,7 +83,7 @@ If you have the Git credential manager core or other credential helpers installe ``` scripts\o3de.bat register --this-engine ``` -1. Setup new projects using the `o3de create-project` command. In the 0.5 branch, the project directory must be a subdirectory in the repo folder. +1. Setup new projects using the `o3de create-project` command. ``` \scripts\o3de.bat create-project --project-path ``` @@ -151,10 +95,6 @@ If you have the Git credential manager core or other credential helpers installe ``` cmake -B -S -G "Visual Studio 16" -DLY_3RDPARTY_PATH=<3rdParty cache path> - // For the 0.5 branch, you must build a new Editor for each project: - cmake --build --target .GameLauncher Editor --config profile -- /m - - // For all other branches, just build the project: cmake --build --target .GameLauncher --config profile -- /m ``` diff --git a/Registry/AssetProcessorPlatformConfig.setreg b/Registry/AssetProcessorPlatformConfig.setreg index 0e91bec8a7..26aa5b2663 100644 --- a/Registry/AssetProcessorPlatformConfig.setreg +++ b/Registry/AssetProcessorPlatformConfig.setreg @@ -76,7 +76,8 @@ "animsettings": "i_caf", "Animations/SkeletonList.xml": "i_caf", "cbc": "abc", - "fbx.assetinfo": "fbx" + "fbx.assetinfo": "fbx", + "stl.assetinfo": "stl" }, // ---- add any folders to scan here. The priority order is the order they appear here diff --git a/Templates/DefaultGem/Template/CMakeLists.txt b/Templates/DefaultGem/Template/CMakeLists.txt index d00a5f0128..5ea435a790 100644 --- a/Templates/DefaultGem/Template/CMakeLists.txt +++ b/Templates/DefaultGem/Template/CMakeLists.txt @@ -10,13 +10,7 @@ set(o3de_gem_json ${o3de_gem_path}/gem.json) o3de_read_json_key(o3de_gem_name ${o3de_gem_json} "gem_name") o3de_restricted_path(${o3de_gem_json} o3de_gem_restricted_path) -# Currently we are in the DefaultProjectSource folder: ${CMAKE_CURRENT_LIST_DIR} -# Get the platform specific folder ${pal_dir} for the current folder: ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} -# Note: ly_get_list_relative_pal_filename will take care of the details for us, as this may be a restricted platform -# in which case it will see if that platform is present here or in the restricted folder. -# i.e. It could here: DefaultProjectSource/Platform/ or -# //DefaultProjectSource -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${o3de_gem_restricted_path} ${o3de_gem_path} ${o3de_gem_name}) +ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} "${o3de_gem_restricted_path}" ${o3de_gem_path} ${o3de_gem_name}) # Now that we have the platform abstraction layer (PAL) folder for this folder, thats where we will find the # project cmake for this platform. diff --git a/Templates/DefaultProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/Contents.json b/Templates/DefaultProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/Contents.json index bfa8bcf478..2b63c0ee15 100644 --- a/Templates/DefaultProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/Contents.json +++ b/Templates/DefaultProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/Contents.json @@ -33,7 +33,7 @@ { "size" : "128x128", "idiom" : "mac", - "filename" : "icon_128 _2x.png", + "filename" : "icon_128_2x.png", "scale" : "2x" }, { @@ -45,7 +45,7 @@ { "size" : "256x256", "idiom" : "mac", - "filename" : "icon_256 _2x.png", + "filename" : "icon_256_2x.png", "scale" : "2x" }, { diff --git a/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128 _2x.png b/Templates/DefaultProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128_2x.png similarity index 100% rename from Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128 _2x.png rename to Templates/DefaultProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128_2x.png diff --git a/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256 _2x.png b/Templates/DefaultProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256_2x.png similarity index 100% rename from Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256 _2x.png rename to Templates/DefaultProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256_2x.png diff --git a/Templates/DefaultProject/preview.png b/Templates/DefaultProject/preview.png new file mode 100644 index 0000000000..78a2a735d2 --- /dev/null +++ b/Templates/DefaultProject/preview.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ae503ec99c8358991dc3c6e50737844d3602b81a49abbbed7d697d7238547c0 +size 28026 diff --git a/Templates/DefaultProject/template.json b/Templates/DefaultProject/template.json index 5eaf66e3af..37409a11b4 100644 --- a/Templates/DefaultProject/template.json +++ b/Templates/DefaultProject/template.json @@ -271,8 +271,8 @@ "isOptional": false }, { - "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128 _2x.png", - "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128 _2x.png", + "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128_2x.png", + "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128_2x.png", "isTemplated": false, "isOptional": false }, @@ -295,8 +295,8 @@ "isOptional": false }, { - "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256 _2x.png", - "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256 _2x.png", + "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256_2x.png", + "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256_2x.png", "isTemplated": false, "isOptional": false }, diff --git a/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/Contents.json b/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/Contents.json index bfa8bcf478..2b63c0ee15 100644 --- a/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/Contents.json +++ b/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/Contents.json @@ -33,7 +33,7 @@ { "size" : "128x128", "idiom" : "mac", - "filename" : "icon_128 _2x.png", + "filename" : "icon_128_2x.png", "scale" : "2x" }, { @@ -45,7 +45,7 @@ { "size" : "256x256", "idiom" : "mac", - "filename" : "icon_256 _2x.png", + "filename" : "icon_256_2x.png", "scale" : "2x" }, { diff --git a/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128_2x.png b/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128_2x.png new file mode 100644 index 0000000000..d30f2d3686 --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128_2x.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:094620c172320b062f9a1f8cc758ef4bbee11bc0a6049f46ad6b42f9bf613c92 +size 9679 diff --git a/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256_2x.png b/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256_2x.png new file mode 100644 index 0000000000..f9ff1c15e3 --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256_2x.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:934502e242ff7a2e34e21eed1424b5e0953e701761d158520b3297944132328e +size 18716 diff --git a/Templates/MinimalProject/preview.png b/Templates/MinimalProject/preview.png new file mode 100644 index 0000000000..b94e84a348 --- /dev/null +++ b/Templates/MinimalProject/preview.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1c14254e4c822fb50bfec42691c49f1089ab020a873c366f71168390d3705c6e +size 17522 diff --git a/Templates/MinimalProject/template.json b/Templates/MinimalProject/template.json index a244904578..9d9ef730c1 100644 --- a/Templates/MinimalProject/template.json +++ b/Templates/MinimalProject/template.json @@ -269,8 +269,8 @@ "isOptional": false }, { - "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128 _2x.png", - "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128 _2x.png", + "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128_2x.png", + "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128_2x.png", "isTemplated": false, "isOptional": false }, @@ -293,8 +293,8 @@ "isOptional": false }, { - "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256 _2x.png", - "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256 _2x.png", + "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256_2x.png", + "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256_2x.png", "isTemplated": false, "isOptional": false }, diff --git a/Tools/LyTestTools/ly_test_tools/log/log_monitor.py b/Tools/LyTestTools/ly_test_tools/log/log_monitor.py index a2556fa41d..54d71b62c0 100755 --- a/Tools/LyTestTools/ly_test_tools/log/log_monitor.py +++ b/Tools/LyTestTools/ly_test_tools/log/log_monitor.py @@ -133,12 +133,12 @@ class LogMonitor(object): except AssertionError: # Raised by waiter when timeout is reached. logger.warning(f"Timeout of '{timeout}' seconds was reached, log lines may not have been found") # exception will be raised below by _validate_results with failure analysis - - logger.info("Python log output:\n" + self.py_log) - logger.info( - "Finished log monitoring for '{}' seconds, validating results.\n" - "expected_lines_not_found: {}\n unexpected_lines_found: {}".format( - timeout, self.expected_lines_not_found, self.unexpected_lines_found)) + finally: + logger.info("Python log output:\n" + self.py_log) + logger.info( + "Finished log monitoring for '{}' seconds, validating results.\n" + "expected_lines_not_found: {}\n unexpected_lines_found: {}".format( + timeout, self.expected_lines_not_found, self.unexpected_lines_found)) return self._validate_results(self.expected_lines_not_found, self.unexpected_lines_found, expected_lines, unexpected_lines) @@ -265,12 +265,21 @@ class LogMonitor(object): self.unexpected_lines_found = unexpected_lines_found self.expected_lines_not_found = expected_lines_not_found + exception_info = None + # To avoid race conditions, we will check *before reading* # If in the mean time the file is closed, we will make sure we read everything by issuing an extra call # by returning the previous alive state process_runing = self.launcher.is_alive() for line in log: line = line[:-1] # remove /n - process_line(line) + try: + process_line(line) + except LogMonitorException as e: + if exception_info is None: + exception_info = e.args + + if exception_info is not None: + raise LogMonitorException(*exception_info) return not process_runing # Will loop until the process ends diff --git a/Tools/LyTestTools/ly_test_tools/mars/filebeat_client.py b/Tools/LyTestTools/ly_test_tools/mars/filebeat_client.py new file mode 100644 index 0000000000..a1e3cf67e2 --- /dev/null +++ b/Tools/LyTestTools/ly_test_tools/mars/filebeat_client.py @@ -0,0 +1,67 @@ +""" +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 datetime +import json +import socket + + +class FilebeatExn(Exception): + pass + + +class FilebeatClient(object): + def __init__(self, logger, host="127.0.0.1", port=9000, timeout=20): + self._logger = logger.getChild("filebeat_client") + self._filebeat_host = host + self._filebeat_port = port + self._socket_timeout = timeout + self._socket = None + + self._open_socket() + + def send_event(self, payload, index, timestamp=None, pipeline="filebeat"): + if timestamp is None: + timestamp = datetime.datetime.utcnow().timestamp() + + event = { + "index": index, + "timestamp": timestamp, + "pipeline": pipeline, + "payload": json.dumps(payload) + } + + # Serialise event, add new line and encode as UTF-8 before sending to Filebeat. + data = json.dumps(event, sort_keys=True) + "\n" + data = data.encode() + + self._logger.debug(f"-> {data}") + self._send_data(data) + + def _open_socket(self): + self._logger.info(f"Connecting to Filebeat on {self._filebeat_host}:{self._filebeat_port}") + + self._socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + self._socket.settimeout(self._socket_timeout) + + try: + self._socket.connect((self._filebeat_host, self._filebeat_port)) + except (ConnectionError, socket.timeout): + raise FilebeatExn("Failed to connect to Filebeat") from None + + def _send_data(self, data): + total_sent = 0 + + while total_sent < len(data): + try: + sent = self._socket.send(data[total_sent:]) + except BrokenPipeError: + self._logger.debug("Filebeat socket closed by peer") + self._socket.close() + self._open_socket() + total_sent = 0 + else: + total_sent = total_sent + sent diff --git a/cmake/3rdParty.cmake b/cmake/3rdParty.cmake index 15dde3c3f8..96d59e6105 100644 --- a/cmake/3rdParty.cmake +++ b/cmake/3rdParty.cmake @@ -29,6 +29,9 @@ set(LY_3RDPARTY_PATH "${o3de_default_third_party_path}" CACHE PATH "Path to the if(LY_3RDPARTY_PATH) file(TO_CMAKE_PATH ${LY_3RDPARTY_PATH} LY_3RDPARTY_PATH) + if(NOT EXISTS ${LY_3RDPARTY_PATH}) + file(MAKE_DIRECTORY ${LY_3RDPARTY_PATH}) + endif() endif() if(NOT EXISTS ${LY_3RDPARTY_PATH}) message(FATAL_ERROR "3rdParty folder: ${LY_3RDPARTY_PATH} does not exist, call cmake defining a valid LY_3RDPARTY_PATH or use cmake-gui to configure it") diff --git a/cmake/3rdParty/Platform/Mac/BuiltInPackages_mac.cmake b/cmake/3rdParty/Platform/Mac/BuiltInPackages_mac.cmake index a7a5c99adf..5e2fdff8ea 100644 --- a/cmake/3rdParty/Platform/Mac/BuiltInPackages_mac.cmake +++ b/cmake/3rdParty/Platform/Mac/BuiltInPackages_mac.cmake @@ -42,5 +42,5 @@ ly_associate_package(PACKAGE_NAME mikkelsen-1.0.0.4-mac ly_associate_package(PACKAGE_NAME googletest-1.8.1-rev4-mac TARGETS googletest PACKAGE_HASH cbf020d5ef976c5db8b6e894c6c63151ade85ed98e7c502729dd20172acae5a8) ly_associate_package(PACKAGE_NAME googlebenchmark-1.5.0-rev2-mac TARGETS GoogleBenchmark PACKAGE_HASH ad25de0146769c91e179953d845de2bec8ed4a691f973f47e3eb37639381f665) ly_associate_package(PACKAGE_NAME OpenSSL-1.1.1b-rev1-mac TARGETS OpenSSL PACKAGE_HASH 28adc1c0616ac0482b2a9d7b4a3a3635a1020e87b163f8aba687c501cf35f96c) -ly_associate_package(PACKAGE_NAME qt-5.15.2-rev4-mac TARGETS Qt PACKAGE_HASH 08790d03a0e6ad808ad64cf25c3d75abd69a343f3d224fc39927e5c6e8738b98) +ly_associate_package(PACKAGE_NAME qt-5.15.2-rev5-mac TARGETS Qt PACKAGE_HASH 9d25918351898b308ded3e9e571fff6f26311b2071aeafd00dd5b249fdf53f7e) ly_associate_package(PACKAGE_NAME libsamplerate-0.2.1-rev2-mac TARGETS libsamplerate PACKAGE_HASH b912af40c0ac197af9c43d85004395ba92a6a859a24b7eacd920fed5854a97fe) diff --git a/cmake/LYWrappers.cmake b/cmake/LYWrappers.cmake index b6daf8b6d7..40bf6ef541 100644 --- a/cmake/LYWrappers.cmake +++ b/cmake/LYWrappers.cmake @@ -380,12 +380,14 @@ function(ly_delayed_target_link_libraries) cmake_parse_arguments(ly_delayed_target_link_libraries "" "" "${visibilities}" ${delayed_link}) foreach(visibility ${visibilities}) - foreach(item ${ly_delayed_target_link_libraries_${visibility}}) + foreach(alias_item ${ly_delayed_target_link_libraries_${visibility}}) - if(TARGET ${item}) - get_target_property(item_type ${item} TYPE) + if(TARGET ${alias_item}) + get_target_property(item_type ${alias_item} TYPE) + ly_de_alias_target(${alias_item} item) else() unset(item_type) + set(item ${alias_item}) endif() if(item_type STREQUAL MODULE_LIBRARY) diff --git a/cmake/PAL.cmake b/cmake/PAL.cmake index 11541d395a..c51b39482f 100644 --- a/cmake/PAL.cmake +++ b/cmake/PAL.cmake @@ -29,7 +29,8 @@ function(o3de_restricted_id o3de_json_file restricted) ly_file_read(${o3de_json_file} json_data) string(JSON restricted_entry ERROR_VARIABLE json_error GET ${json_data} "restricted_name") if(json_error) - message(WARNING "Unable to read restricted from '${o3de_json_file}', error: ${json_error}") + # Restricted fields can never be a requirement so no warning is issued + return() endif() if(restricted_entry) set(${restricted} ${restricted_entry} PARENT_SCOPE) @@ -148,86 +149,89 @@ function(ly_get_absolute_pal_filename out_name in_name) set(full_name ${in_name}) if(${ARGC} GREATER 4) - # The user has supplied an object restricted path, the object path and the object name for consideration - set(object_restricted_path ${ARGV2}) - set(object_path ${ARGV3}) + # The object name is used to resolve ambiguities when a PAL directory is requested from + # two different external subdirectory root paths + # Such as if a PAL directory for two root object paths with same relative structure was requested to be Palified + # i.e /Platform//IO and /Platform//IO + # Normally the restricted PAL path for both gems would be "//IO". + # The object name can be used to make this path unique + # "///IO" for gem 1 and + # "///IO" for gem 2 set(object_name ${ARGV4}) - - # if the file is not in the object path then we cannot determine a PAL file for it - file(RELATIVE_PATH relative_path ${object_path} ${full_name}) - if (NOT (IS_ABSOLUTE relative_path OR relative_path MATCHES [[^(\.\./)+(.*)]])) - if (NOT EXISTS ${full_name}) - string(REGEX MATCH "${object_path}/(.*)/Platform/([^/]*)/?(.*)$" match ${full_name}) - if(NOT CMAKE_MATCH_1) - string(REGEX MATCH "${object_path}/Platform/([^/]*)/?(.*)$" match ${full_name}) - set(full_name ${object_restricted_path}/${CMAKE_MATCH_1}/${object_name}) - if(CMAKE_MATCH_2) - string(APPEND full_name "/" ${CMAKE_MATCH_2}) - endif() - elseif("${CMAKE_MATCH_2}" IN_LIST PAL_RESTRICTED_PLATFORMS) - set(full_name ${object_restricted_path}/${CMAKE_MATCH_2}/${object_name}/${CMAKE_MATCH_1}) - if(CMAKE_MATCH_3) - string(APPEND full_name "/" ${CMAKE_MATCH_3}) - endif() - endif() - endif() - endif() - set(${out_name} ${full_name} PARENT_SCOPE) - - elseif(${ARGC} GREATER 3) - # The user has supplied an object restricted path, the object path for consideration - set(object_restricted_path ${ARGV2}) - set(object_path ${ARGV3}) - - # if the file is not in the object path then we cannot determine a PAL file for it - file(RELATIVE_PATH relative_path ${object_path} ${full_name}) - if (NOT (IS_ABSOLUTE relative_path OR relative_path MATCHES [[^(\.\./)+(.*)]])) - if (NOT EXISTS ${full_name}) - string(REGEX MATCH "${object_path}/(.*)/Platform/([^/]*)/?(.*)$" match ${full_name}) - if(NOT CMAKE_MATCH_1) - string(REGEX MATCH "${object_path}/Platform/([^/]*)/?(.*)$" match ${full_name}) - set(full_name ${object_restricted_path}/${CMAKE_MATCH_1}) - if(CMAKE_MATCH_2) - string(APPEND full_name "/" ${CMAKE_MATCH_2}) - endif() - elseif("${CMAKE_MATCH_2}" IN_LIST PAL_RESTRICTED_PLATFORMS) - set(full_name ${object_restricted_path}/${CMAKE_MATCH_2}/${CMAKE_MATCH_1}) - if(CMAKE_MATCH_3) - string(APPEND full_name "/" ${CMAKE_MATCH_3}) - endif() - endif() - endif() - endif() - set(${out_name} ${full_name} PARENT_SCOPE) - - else() - # The user has not supplied any path so we must assume it is the o3de engine restricted and o3de engine path - # if the file is not in the o3de engine path then we cannot determine a PAL file for it - file(RELATIVE_PATH relative_path ${LY_ROOT_FOLDER} ${full_name}) - if (NOT (IS_ABSOLUTE relative_path OR relative_path MATCHES [[^(\.\./)+(.*)]])) - if (NOT EXISTS ${full_name}) - string(REGEX MATCH "${LY_ROOT_FOLDER}/(.*)/Platform/([^/]*)/?(.*)$" match ${full_name}) - if(NOT CMAKE_MATCH_1) - string(REGEX MATCH "${LY_ROOT_FOLDER}/Platform/([^/]*)/?(.*)$" match ${full_name}) - set(full_name ${O3DE_ENGINE_RESTRICTED_PATH}/${CMAKE_MATCH_1}) - if(CMAKE_MATCH_2) - string(APPEND full_name "/" ${CMAKE_MATCH_2}) - endif() - elseif("${CMAKE_MATCH_2}" IN_LIST PAL_RESTRICTED_PLATFORMS) - set(full_name ${O3DE_ENGINE_RESTRICTED_PATH}/${CMAKE_MATCH_2}/${CMAKE_MATCH_1}) - if(CMAKE_MATCH_3) - string(APPEND full_name "/" ${CMAKE_MATCH_3}) - endif() - endif() - endif() - endif() - set(${out_name} ${full_name} PARENT_SCOPE) endif() + + # The Default object path for path is the LY_ROOT_FOLDER + cmake_path(SET object_path NORMALIZE "${LY_ROOT_FOLDER}") + if(${ARGC} GREATER 3) + # The user has supplied an object restricted path, the object path for consideration + cmake_path(SET object_path NORMALIZE ${ARGV3}) + endif() + + # The Default restricted object path is the result of the read_engine_restricted_path function + cmake_path(SET object_restricted_path NORMALIZE "${O3DE_ENGINE_RESTRICTED_PATH}") + if(${ARGC} GREATER 2) + # The user has supplied an object restricted path + cmake_path(SET object_restricted_path NORMALIZE ${ARGV2}) + endif() + + # The input path must exist in order to form a PAL path + if (NOT EXISTS ${full_name}) + # if the file is not in the object path then we cannot determine a PAL file for it + cmake_path(IS_PREFIX object_path ${full_name} is_input_path_in_root) + if(is_input_path_in_root) + cmake_path(RELATIVE_PATH full_name BASE_DIRECTORY ${object_path} OUTPUT_VARIABLE relative_object_path) + cmake_path(SET current_object_path ${relative_object_path}) + + # Remove one path segment from the end of the current_object_path and prepend it to the list path_segments + cmake_path(GET current_object_path PARENT_PATH parent_path) + cmake_path(GET current_object_path FILENAME path_segment) + list(PREPEND path_segments_visited path_segment) + cmake_path(COMPARE current_object_path NOT_EQUAL parent_path is_prev_path_segment) + cmake_path(SET current_object_path "${parent_path}") + + while(is_prev_path_segment) + # The Path is in a PAL structure + # Decompose the path into sections before "Platform" and after "Platform" + if(path_segment STREQUAL "Platform") + # The first path segment after the "/Platform/" + # is a potential platform name. Store it off for later checks + list(GET path_segments_visited 0 candidate_platform_name) + + # Store off all the path segments iterated from the end in the post-"Platform" path + cmake_path(APPEND post_platform_paths ${path_segments_visited}) + # The parent path is just the pre-"Platform" section of the path + cmake_path(SET pre_platform_paths "${parent_path}") + break() + endif() + + # Remove one path segment from the end of the current_object_path and prepend it to the list path_segments + cmake_path(GET current_object_path PARENT_PATH parent_path) + cmake_path(GET current_object_path FILENAME path_segment) + list(PREPEND path_segments_visited path_segment) + cmake_path(COMPARE current_object_path NOT_EQUAL parent_path is_prev_path_segment) + cmake_path(SET current_object_path "${parent_path}") + endwhile() + + # Compose a candidate restricted path and examine if it exists + cmake_path(APPEND object_restricted_path ${pre_platform_paths} "Platform" ${post_platform_paths} + OUTPUT_VARIABLE candidate_PAL_path) + if(NOT EXISTS ${candidate_PAL_path}) + if("${candidate_platform_name}" IN_LIST PAL_RESTRICTED_PLATFORMS) + cmake_path(APPEND object_restricted_path ${candidate_platform_name} ${object_name} + ${pre_platform_paths} ${post_platform_paths} OUTPUT_VARIABLE candidate_PAL_path) + endif() + endif() + if(EXISTS ${candidate_PAL_path}) + cmake_path(SET full_name ${candidate_PAL_path}) + endif() + endif() + endif() + set(${out_name} ${full_name} PARENT_SCOPE) endfunction() function(ly_get_list_relative_pal_filename out_name in_name) ly_get_absolute_pal_filename(abs_name ${in_name} ${ARGN}) - file(RELATIVE_PATH relative_name ${CMAKE_CURRENT_LIST_DIR} ${abs_name}) + cmake_path(RELATIVE_PATH abs_name BASE_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} OUTPUT_VARIABLE relative_name) set(${out_name} ${relative_name} PARENT_SCOPE) endfunction() diff --git a/cmake/Platform/Common/RuntimeDependencies_common.cmake b/cmake/Platform/Common/RuntimeDependencies_common.cmake index 734dd94203..31c8191a57 100644 --- a/cmake/Platform/Common/RuntimeDependencies_common.cmake +++ b/cmake/Platform/Common/RuntimeDependencies_common.cmake @@ -254,7 +254,8 @@ function(ly_delayed_generate_runtime_dependencies) # Generate the output file set(target_file_dir "$") - file(READ ${LY_RUNTIME_DEPENDENCIES_TEMPLATE} template_file) + set(target_file "$") + ly_file_read(${LY_RUNTIME_DEPENDENCIES_TEMPLATE} template_file) string(CONFIGURE "${LY_COPY_COMMANDS}" LY_COPY_COMMANDS @ONLY) string(CONFIGURE "${template_file}" configured_template_file @ONLY) file(GENERATE diff --git a/cmake/Platform/Common/runtime_dependencies_common.cmake.in b/cmake/Platform/Common/runtime_dependencies_common.cmake.in index e2a85374b8..9d23a73a26 100644 --- a/cmake/Platform/Common/runtime_dependencies_common.cmake.in +++ b/cmake/Platform/Common/runtime_dependencies_common.cmake.in @@ -13,6 +13,7 @@ function(ly_copy source_file target_directory) 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}") + message(STATUS "Copying \"${source_file}\" to \"${target_directory}\"...") file(COPY "${source_file}" DESTINATION "${target_directory}" FILE_PERMISSIONS @LY_COPY_PERMISSIONS@ FOLLOW_SYMLINK_CHAIN) endif() endif() diff --git a/cmake/Platform/Linux/RuntimeDependencies_linux.cmake b/cmake/Platform/Linux/RuntimeDependencies_linux.cmake index 45fdaec202..5957f42fe6 100644 --- a/cmake/Platform/Linux/RuntimeDependencies_linux.cmake +++ b/cmake/Platform/Linux/RuntimeDependencies_linux.cmake @@ -5,5 +5,5 @@ # # -set(LY_RUNTIME_DEPENDENCIES_TEMPLATE ${LY_ROOT_FOLDER}/cmake/Platform/Common/runtime_dependencies_common.cmake.in) +set(LY_RUNTIME_DEPENDENCIES_TEMPLATE ${LY_ROOT_FOLDER}/cmake/Platform/Linux/runtime_dependencies_linux.cmake.in) include(cmake/Platform/Common/RuntimeDependencies_common.cmake) \ No newline at end of file diff --git a/cmake/Platform/Linux/runtime_dependencies_linux.cmake.in b/cmake/Platform/Linux/runtime_dependencies_linux.cmake.in new file mode 100644 index 0000000000..d66dba7704 --- /dev/null +++ b/cmake/Platform/Linux/runtime_dependencies_linux.cmake.in @@ -0,0 +1,30 @@ +# +# 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 +# +# + +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) + 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(COPY "${source_file}" DESTINATION "${target_directory}" FILE_PERMISSIONS @LY_COPY_PERMISSIONS@ FOLLOW_SYMLINK_CHAIN) + + # 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/..") + endif() + + endif() + endif() +endfunction() + +@LY_COPY_COMMANDS@ diff --git a/cmake/Platform/Mac/runtime_dependencies_mac.cmake.in b/cmake/Platform/Mac/runtime_dependencies_mac.cmake.in index 92ad3514d4..9f9006c4c0 100644 --- a/cmake/Platform/Mac/runtime_dependencies_mac.cmake.in +++ b/cmake/Platform/Mac/runtime_dependencies_mac.cmake.in @@ -19,56 +19,96 @@ endfunction() include(BundleUtilities) cmake_policy(SET CMP0012 NEW) # new policy for the if that evaluates a boolean out of the LY_BUILD_FIXUP_BUNDLE expansion +cmake_policy(SET CMP0009 NEW) # do not traverse symlinks on GLOB_RECURSE set(anything_new FALSE) set(plugin_libs) set(plugin_dirs) +set(depends_on_python FALSE) + +find_program(LY_INSTALL_NAME_TOOL install_name_tool) +if (NOT LY_INSTALL_NAME_TOOL) + message(FATAL_ERROR "Unable to locate 'install_name_tool'") +endif() function(ly_copy source_file target_directory) get_filename_component(target_filename "${source_file}" NAME) - # If source_file is a Framework and target_directory is a bundle - if("${source_file}" MATCHES "\\.[Ff]ramework[^\\.]" AND "${target_directory}" MATCHES "\\.app/Contents/MacOS") + # If target_directory is a bundle + if("${target_directory}" MATCHES "\\.app/Contents/MacOS") - if(NOT @LY_BUILD_FIXUP_BUNDLE@) - return() - endif() + set(target_is_bundle TRUE) + if("${source_file}" MATCHES "\\.[Ff]ramework[^\\.]") - # fixup origin to copy the whole Framework folder and change destination to Contents/Frameworks - string(REGEX REPLACE "(.*\\.[Ff]ramework).*" "\\1" source_file "${source_file}") - get_filename_component(source_file_folder "${source_file}" DIRECTORY) + if(NOT @LY_BUILD_FIXUP_BUNDLE@) + return() + endif() + + # fixup origin to copy the whole Framework folder and change destination to Contents/Frameworks + string(REGEX REPLACE "(.*\\.[Ff]ramework).*" "\\1" source_file "${source_file}") + get_filename_component(source_file_folder "${source_file}" DIRECTORY) + + # Python.framework produces a bug in BundleUtilities so it needs manual handling + # https://gitlab.kitware.com/cmake/cmake/-/issues/20165 + if("${source_file}" MATCHES "Python.framework") + # fixup the destination so it ends up in Contents/Frameworks + string(REGEX REPLACE "(.*\\.app/Contents)/MacOS" "\\1/Frameworks" target_directory "${target_directory}") + set(local_plugin_dirs ${plugin_dirs}) + list(APPEND local_plugin_dirs "${target_directory}/Python.framework") + set(target_filename Python.framework) + set(plugin_dirs ${local_plugin_dirs} PARENT_SCOPE) + set(depends_on_python TRUE PARENT_SCOPE) + else() + set(local_plugin_dirs ${plugin_dirs}) + list(APPEND local_plugin_dirs "${source_file_folder}") + set(plugin_dirs ${local_plugin_dirs} PARENT_SCOPE) + return() + endif() + + elseif("${source_file}" MATCHES "qt/plugins") + + if(NOT @LY_BUILD_FIXUP_BUNDLE@) + return() + endif() + + # fixup the destination so it ends up in Contents/Plugins + string(REGEX REPLACE "(.*\\.app/Contents)/MacOS" "\\1/plugins" target_directory "${target_directory}") + + set(local_plugin_dirs ${plugin_dirs}) + list(APPEND local_plugin_dirs "${target_directory}") + set(plugin_dirs ${local_plugin_dirs} PARENT_SCOPE) + set(local_plugin_libs ${plugin_libs}) + list(APPEND local_plugin_libs "${target_directory}/${target_filename}") + set(plugin_libs ${local_plugin_libs} PARENT_SCOPE) + + elseif("${source_file}" MATCHES "qt/translations") + + return() # skip, is this used? - set(local_plugin_dirs ${plugin_dirs}) - list(APPEND local_plugin_dirs "${source_file_folder}") - set(plugin_dirs ${local_plugin_dirs} PARENT_SCOPE) - return() + elseif("${source_file}" MATCHES ".dylib") + + set(local_plugin_dirs ${plugin_dirs}) + list(APPEND local_plugin_dirs "${target_directory}") + set(plugin_dirs ${local_plugin_dirs} PARENT_SCOPE) - elseif("${source_file}" MATCHES "qt/plugins" AND "${target_directory}" MATCHES "\\.app/Contents/MacOS") - - if(NOT @LY_BUILD_FIXUP_BUNDLE@) - return() endif() - - # fixup the destination so it ends up in Contents/Plugins - string(REGEX REPLACE "(.*\\.app/Contents)/MacOS" "\\1/plugins" target_directory "${target_directory}") - - set(local_plugin_dirs ${plugin_dirs}) - list(APPEND local_plugin_dirs "${target_directory}") - set(plugin_dirs ${local_plugin_dirs} PARENT_SCOPE) - set(local_plugin_libs ${plugin_libs}) - list(APPEND local_plugin_libs "${target_directory}/${target_filename}") - set(plugin_libs ${local_plugin_libs} PARENT_SCOPE) - - elseif("${source_file}" MATCHES "qt/translations" AND "${target_directory}" MATCHES "\\.app/Contents/MacOS") - - return() # skip, is this used? - elseif("${source_file}" MATCHES ".dylib") + else() - set(local_plugin_dirs ${plugin_dirs}) - list(APPEND local_plugin_dirs "${target_directory}") - set(plugin_dirs ${local_plugin_dirs} PARENT_SCOPE) + # target is not a bundle + set(target_is_bundle FALSE) + if("${source_file}" MATCHES "\\.[Ff]ramework[^\\.]") + + # fixup origin to copy the whole Framework folder + string(REGEX REPLACE "(.*\\.[Ff]ramework).*" "\\1" source_file "${source_file}") + get_filename_component(target_filename "${source_file}" NAME) + + if("${source_file}" MATCHES "Python.framework") + set(depends_on_python TRUE PARENT_SCOPE) + endif() + + endif() endif() @@ -79,6 +119,11 @@ function(ly_copy source_file 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) + endif() file(COPY "${source_file}" DESTINATION "${target_directory}" FILE_PERMISSIONS @LY_COPY_PERMISSIONS@ FOLLOW_SYMLINK_CHAIN) file(TOUCH ${target_directory}/${target_filename}) set(anything_new TRUE PARENT_SCOPE) @@ -93,6 +138,7 @@ if(NOT @LY_BUILD_FIXUP_BUNDLE@) endif() if(@target_file_dir@ MATCHES ".app/Contents/MacOS") + string(REGEX REPLACE "(.*\\.app)/Contents/MacOS.*" "\\1" bundle_path "@target_file_dir@") set(fixup_timestamp_file "${bundle_path}.fixup.stamp") if(NOT anything_new) @@ -106,31 +152,44 @@ if(@target_file_dir@ MATCHES ".app/Contents/MacOS") if(EXISTS ${bundle_path}/Contents/MacOS/Builders/DirectXShaderCompiler/bin/dxc-3.7) list(APPEND fixup_bundle_ignore dxc-3.7) endif() - # Python.framework being copied by fixup_bundle - #if(EXISTS ${bundle_path}/Contents/Frameworks/Python.framework) - # # LYN-4502: Patch python bundle, it contains some windows executables, some files that fixup_bundle doesnt like and has - # # duplicated binaries between Versions/3.7 and Versions/Current. - # file(GLOB exe_files - # ${bundle_path}/Contents/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/*.exe - # ${bundle_path}/Contents/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_vendor/distlib/*.exe - # ${bundle_path}/Contents/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/*.exe - # ) - # foreach(exe_file ${exe_files}) - # file(REMOVE ${exe_file}) - # endforeach() - # file(REMOVE_RECURSE - # ${bundle_path}/Contents/Frameworks/Python.framework/Versions/3.7/lib/python3.7/test - # ${bundle_path}/Contents/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/scipy/io/tests - # ${bundle_path}/Contents/Frameworks/Python.framework/Versions/3.7/Resources - # ${bundle_path}/Contents/Frameworks/Python.framework/Python - # ${bundle_path}/Contents/Frameworks/Python.framework/Resources/Python.app - # ${bundle_path}/Contents/Frameworks/Python.framework/Versions/3.7/Python - # ) - # file(REMOVE_RECURSE ${bundle_path}/Contents/Frameworks/Python.framework/Versions/Current) - # execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink 3.7 Current - # WORKING_DIRECTORY ${bundle_path}/Contents/Frameworks/Python.framework/Versions/ - # ) - #endif() + # LYN-4502: Patch python bundle, it contains some windows executables, some files that fixup_bundle doesnt like and has + # other issues that produce signature problems + if(depends_on_python) + message(STATUS "Fixing ${bundle_path}/Contents/Frameworks/Python.framework...") + list(APPEND fixup_bundle_ignore Python python3.7m python3.7) + file(REMOVE_RECURSE + ${bundle_path}/Contents/Frameworks/Python.framework/Versions/Current + ${bundle_path}/Contents/Frameworks/Python.framework/Versions/3.7/Headers + ${bundle_path}/Contents/Frameworks/Python.framework/Versions/3.7/lib/Python + ${bundle_path}/Contents/Frameworks/Python.framework/Versions/3.7/lib/python3.7/test + ${bundle_path}/Contents/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/scipy/io/tests + ${bundle_path}/Contents/Frameworks/Python.framework/Python + ${bundle_path}/Contents/Frameworks/Python.framework/Resources + ${bundle_path}/Contents/Frameworks/Python.framework/Headers + ) + file(GLOB_RECURSE exe_file_list "${bundle_path}/Contents/Frameworks/Python.framework/**/*.exe") + if(exe_file_list) + file(REMOVE_RECURSE ${exe_file_list}) + endif() + execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink include/python3.7m Headers + WORKING_DIRECTORY ${bundle_path}/Contents/Frameworks/Python.framework/Versions/3.7 + ) + execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink 3.7 Current + WORKING_DIRECTORY ${bundle_path}/Contents/Frameworks/Python.framework/Versions/ + ) + execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink Versions/Current/Python Python + WORKING_DIRECTORY ${bundle_path}/Contents/Frameworks/Python.framework + ) + execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink Versions/Current/Headers Headers + WORKING_DIRECTORY ${bundle_path}/Contents/Frameworks/Python.framework + ) + execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink Versions/Current/Resources Resources + WORKING_DIRECTORY ${bundle_path}/Contents/Frameworks/Python.framework + ) + file(CHMOD ${bundle_path}/Contents/Frameworks/Python.framework/Versions/Current/Python + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE + ) + endif() list(REMOVE_DUPLICATES plugin_libs) list(REMOVE_DUPLICATES plugin_dirs) fixup_bundle("${bundle_path}" "${plugin_libs}" "${plugin_dirs}" IGNORE_ITEM ${fixup_bundle_ignore}) @@ -139,11 +198,27 @@ if(@target_file_dir@ MATCHES ".app/Contents/MacOS") # fixup bundle ends up removing the rpath of dxc (despite we exclude it) if(EXISTS ${bundle_path}/Contents/MacOS/Builders/DirectXShaderCompiler/bin/dxc-3.7) - find_program(LY_INSTALL_NAME_TOOL install_name_tool) - if (NOT LY_INSTALL_NAME_TOOL) - message(FATAL_ERROR "Unable to locate 'install_name_tool'") - endif() execute_process(COMMAND ${LY_INSTALL_NAME_TOOL} -add_rpath @executable_path/../lib ${bundle_path}/Contents/MacOS/Builders/DirectXShaderCompiler/bin/dxc-3.7) endif() + + # misplaced .DS_Store files can cause signing to fail + # Interrupted signatures can leave cstemp files behind that fail next signature + file(GLOB_RECURSE remove_file_list + "${bundle_path}/**/.DS_Store" + "${bundle_path/}**/*.cstemp" + ) + if(remove_file_list) + file(REMOVE_RECURSE ${remove_file_list}) + endif() + + endif() + +else() # Non-bundle case + + if(depends_on_python) + # RPATH fix python + execute_process(COMMAND ${LY_INSTALL_NAME_TOOL} -change @rpath/Python @rpath/Python.framework/Versions/Current/Python @target_file@) + endif() + endif() diff --git a/cmake/Platform/Windows/Packaging/Shortcuts.wxs b/cmake/Platform/Windows/Packaging/Shortcuts.wxs index 283a3c08ea..fefd15294a 100644 --- a/cmake/Platform/Windows/Packaging/Shortcuts.wxs +++ b/cmake/Platform/Windows/Packaging/Shortcuts.wxs @@ -26,10 +26,15 @@ - + + + Name="$(var.CPACK_PACKAGE_NAME) Project Manager" /> diff --git a/cmake/Platform/Windows/PackagingPostBuild.cmake b/cmake/Platform/Windows/PackagingPostBuild.cmake index 2d003d6062..70f8834207 100644 --- a/cmake/Platform/Windows/PackagingPostBuild.cmake +++ b/cmake/Platform/Windows/PackagingPostBuild.cmake @@ -105,39 +105,94 @@ 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) file(TO_NATIVE_PATH "${_cpack_wix_out_dir}" _cpack_wix_out_dir) -# strip the scheme and extract the bucket/key prefix from the URL -string(REPLACE "s3://" "" _stripped_url ${CPACK_UPLOAD_URL}) -string(REPLACE "/" ";" _tokens ${_stripped_url}) +function(upload_to_s3 in_url in_local_path in_file_regex) -list(POP_FRONT _tokens _bucket) -string(JOIN "/" _prefix ${_tokens}) + # strip the scheme and extract the bucket/key prefix from the URL + string(REPLACE "s3://" "" _stripped_url ${in_url}) + string(REPLACE "/" ";" _tokens ${_stripped_url}) -set(_file_regex ".*(cab|exe|msi)$") -set(_extra_args [[{"ACL":"bucket-owner-full-control"}]]) + list(POP_FRONT _tokens _bucket) + string(JOIN "/" _prefix ${_tokens}) -set(_upload_command - ${_python_cmd} -s - -u ${_upload_script} - --base_dir ${_cpack_wix_out_dir} - --file_regex="${_file_regex}" - --bucket ${_bucket} - --key_prefix ${_prefix} - --extra_args ${_extra_args} -) + set(_extra_args [[{"ACL":"bucket-owner-full-control"}]]) -if(CPACK_AWS_PROFILE) - list(APPEND _upload_command --profile ${CPACK_AWS_PROFILE}) -endif() + 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 (NOT ${_upload_result} EQUAL 0) + message(FATAL_ERROR "An error occurred uploading to s3.\nOutput:\n${_upload_output}") + endif() +endfunction() message(STATUS "Uploading artifacts to ${CPACK_UPLOAD_URL}") -execute_process( - COMMAND ${_upload_command} - RESULT_VARIABLE _upload_result - ERROR_VARIABLE _upload_errors +upload_to_s3( + ${CPACK_UPLOAD_URL} + ${_cpack_wix_out_dir} + ".*(cab|exe|msi)$" ) +message(STATUS "Artifact uploading complete!") -if (${_upload_result} EQUAL 0) - message(STATUS "Artifact uploading complete!") -else() - message(FATAL_ERROR "An error occurred uploading artifacts. ${_upload_errors}") +# 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/SettingsRegistry.cmake b/cmake/SettingsRegistry.cmake index 0eae244c4f..934bae4e30 100644 --- a/cmake/SettingsRegistry.cmake +++ b/cmake/SettingsRegistry.cmake @@ -160,12 +160,6 @@ function(ly_delayed_generate_settings_registry) get_property(has_manually_added_dependencies TARGET ${gem_target} PROPERTY MANUALLY_ADDED_DEPENDENCIES SET) get_target_property(target_type ${gem_target} TYPE) - if (target_type STREQUAL "INTERFACE_LIBRARY" AND has_manually_added_dependencies) - # don't use interface libraries here, we only want ones which produce actual binaries unless the target - # is empty. We have still already recursed into their dependencies - they'll show up later. - # When the target has no dependencies however we want to add the gem root path to the generated setreg - continue() - endif() ly_get_gem_module_root(gem_module_root ${gem_target}) diff --git a/python/python.sh b/python/python.sh index 6d53c2ee07..a67cdb2b22 100755 --- a/python/python.sh +++ b/python/python.sh @@ -1,7 +1,7 @@ #!/bin/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 # @@ -15,9 +15,10 @@ while [[ -h "$SOURCE" ]]; do done DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" -if [[ "$OSTYPE" = *"darwin"* ]]; -then +if [[ "$OSTYPE" == *"darwin"* ]]; then PYTHON=$DIR/runtime/python-3.7.10-rev1-darwin/Python.framework/Versions/3.7/bin/python3 +elif [[ "$OSTYPE" == "msys" ]]; then + PYTHON=$DIR/runtime/python-3.7.10-rev1-windows/python/python.exe else PYTHON=$DIR/runtime/python-3.7.10-rev2-linux/python/bin/python fi diff --git a/scripts/build/Jenkins/Jenkinsfile b/scripts/build/Jenkins/Jenkinsfile index 3567267eab..e2f341ba7b 100644 --- a/scripts/build/Jenkins/Jenkinsfile +++ b/scripts/build/Jenkins/Jenkinsfile @@ -216,8 +216,6 @@ def CheckoutRepo(boolean disableSubmodules = false) { if (!fileExists(ENGINE_REPOSITORY_NAME)) { palMkdir(ENGINE_REPOSITORY_NAME) } - - palSh('git lfs uninstall', 'Git LFS Uninstall') // Prevent git from pulling lfs objects during checkout if(fileExists('.git')) { // If the repository after checkout is locked, likely we took a snapshot while git was running, @@ -251,13 +249,6 @@ def CheckoutRepo(boolean disableSubmodules = false) { ] } - // Run lfs in a separate step. Jenkins is unable to load the credentials for the custom LFS endpoint - withCredentials([usernamePassword(credentialsId: "${env.GITHUB_USER}", passwordVariable: 'accesstoken', usernameVariable: 'username')]) { - palSh("git config -f .lfsconfig lfs.url https://${username}:${accesstoken}@${env.LFS_URL}", 'Set credentials', false) - } - palSh('git lfs install', 'Git LFS Install') - palSh('git lfs pull', 'Git LFS Pull') - // CHANGE_ID is used by some scripts to identify uniquely the current change (usually metric jobs) palSh('git rev-parse HEAD > commitid', 'Getting commit id') env.CHANGE_ID = readFile file: 'commitid' @@ -281,8 +272,8 @@ def PreBuildCommonSteps(Map pipelineConfig, String snapshot, String repositoryNa unstash name: 'incremental_build_script' def pythonCmd = '' - if(env.IS_UNIX) pythonCmd = 'sudo -E python -u ' - else pythonCmd = 'python -u ' + if(env.IS_UNIX) pythonCmd = 'sudo -E python3 -u ' + else pythonCmd = 'python3 -u ' if(env.RECREATE_VOLUME?.toBoolean()) { palSh("${pythonCmd} ${INCREMENTAL_BUILD_SCRIPT_PATH} --action delete --repository_name ${repositoryName} --project ${projectName} --pipeline ${pipeline} --branch ${branchName} --platform ${platform} --build_type ${buildType}", 'Deleting volume', winSlashReplacement=false) @@ -394,8 +385,8 @@ def PostBuildCommonSteps(String workspace, boolean mount = true) { if (mount) { def pythonCmd = '' - if(env.IS_UNIX) pythonCmd = 'sudo -E python -u ' - else pythonCmd = 'python -u ' + if(env.IS_UNIX) pythonCmd = 'sudo -E python3 -u ' + else pythonCmd = 'python3 -u ' try { timeout(5) { diff --git a/scripts/build/TestImpactAnalysis/tiaf.py b/scripts/build/TestImpactAnalysis/tiaf.py index 1ba0a3f195..304982a84d 100644 --- a/scripts/build/TestImpactAnalysis/tiaf.py +++ b/scripts/build/TestImpactAnalysis/tiaf.py @@ -49,12 +49,13 @@ class TestImpact: # Config self.__parse_config_file(config_file) # Sequence - if self.__use_test_impact_analysis: - if self.__is_seeding_branch and self.__is_seeding_pipeline: - self.__is_seeding = True - else: - self.__is_seeding = False - self.__generate_change_list() + if self.__is_seeding_branch and self.__is_seeding_pipeline: + self.__is_seeding = True + else: + self.__is_seeding = False + print(f"Is seeding: '{self.__is_seeding}'.") + if self.__use_test_impact_analysis and not self.__is_seeding: + self.__generate_change_list() # Parse the configuration file and retrieve the data needed for launching the test impact analysis runtime def __parse_config_file(self, config_file): @@ -92,7 +93,7 @@ class TestImpact: self.__has_src_commit = True def __write_last_run_hash(self, last_run_hash): - os.mkdir(self.__historic_workspace) + os.makedirs(self.__historic_workspace, exist_ok=True) f = open(self.__last_commit_hash_path, "w") f.write(last_run_hash) f.close() @@ -192,6 +193,9 @@ class TestImpact: # Sequence type args.append("--sequence=tianowrite") print("Sequence type is set to 'tianowrite'.") + # Integrity failure policy + args.append("--ipolicy=continue") + print("Integration failure policy is set to 'continue'.") # Safe mode if safe_mode: args.append("--safemode=on") @@ -210,12 +214,12 @@ class TestImpact: # Sequence type args.append("--sequence=regular") print("Sequence type is set to 'regular'.") - # Pipeline of truth sequence - if self.__is_pipeline_of_truth: + # Seeding job + if self.__is_seeding: # Test failure policy args.append(f"--fpolicy={seed_sequence_test_failure_policy}") print(f"Test failure policy is set to '{seed_sequence_test_failure_policy}'.") - # Non pipeline of truth sequence + # Non seeding job else: # Test failure policy args.append(f"--fpolicy={test_failure_policy}") @@ -227,7 +231,7 @@ class TestImpact: # If the sequence completed (with or without failures) we will update the historical meta-data if result.returncode == 0 or result.returncode == 7: print("Test impact analysis runtime returned successfully.") - if self.__is_pipeline_of_truth: + if self.__is_seeding: print("Writing historical meta-data...") self.__write_last_run_hash(self.__dst_commit) print("Complete!") diff --git a/scripts/build/TestImpactAnalysis/tiaf_driver.py b/scripts/build/TestImpactAnalysis/tiaf_driver.py index a9be7c8cbc..42234f803d 100644 --- a/scripts/build/TestImpactAnalysis/tiaf_driver.py +++ b/scripts/build/TestImpactAnalysis/tiaf_driver.py @@ -60,6 +60,6 @@ if __name__ == "__main__": # Non-gating will be removed from this script and handled at the job level in SPEC-7413 #sys.exit(return_code) sys.exit(0) - except: + except Exception as e: # Non-gating will be removed from this script and handled at the job level in SPEC-7413 - sys.exit(0) \ No newline at end of file + print(f"Exception caught by TIAF driver: {e}") diff --git a/scripts/build/bootstrap/incremental_build_util.py b/scripts/build/bootstrap/incremental_build_util.py old mode 100755 new mode 100644 index c414818d70..d5e3e1a200 --- a/scripts/build/bootstrap/incremental_build_util.py +++ b/scripts/build/bootstrap/incremental_build_util.py @@ -7,7 +7,7 @@ import argparse import ast import boto3 import datetime -import urllib2 +import urllib.request, urllib.error, urllib.parse import os import psutil import time @@ -49,7 +49,7 @@ if os.name == 'nt': def is_dir_symlink(path): FILE_ATTRIBUTE_REPARSE_POINT = 0x0400 - return os.path.isdir(path) and (ctypes.windll.kernel32.GetFileAttributesW(unicode(path)) & FILE_ATTRIBUTE_REPARSE_POINT) + return os.path.isdir(path) and (ctypes.windll.kernel32.GetFileAttributesW(str(path)) & FILE_ATTRIBUTE_REPARSE_POINT) def get_free_space_mb(path): if sys.version_info < (3,): # Python 2? @@ -84,7 +84,7 @@ else: return st.f_bavail * st.f_frsize / 1024 / 1024 def error(message): - print message + print(message) exit(1) def parse_args(): @@ -138,19 +138,19 @@ def get_ec2_client(region): def get_ec2_instance_id(): try: - instance_id = urllib2.urlopen('http://169.254.169.254/latest/meta-data/instance-id').read() - return instance_id + instance_id = urllib.request.urlopen('http://169.254.169.254/latest/meta-data/instance-id').read() + return instance_id.decode("utf-8") except Exception as e: - print e.message + print(e.message) error('No EC2 metadata! Check if you are running this script on an EC2 instance.') def get_availability_zone(): try: - availability_zone = urllib2.urlopen('http://169.254.169.254/latest/meta-data/placement/availability-zone').read() - return availability_zone + availability_zone = urllib.request.urlopen('http://169.254.169.254/latest/meta-data/placement/availability-zone').read() + return availability_zone.decode("utf-8") except Exception as e: - print e.message + print(e.message) error('No EC2 metadata! Check if you are running this script on an EC2 instance.') @@ -159,11 +159,11 @@ def kill_processes(workspace='/dev/'): Kills all processes that have open file paths associated with the workspace. Uses PSUtil for cross-platform compatibility ''' - print 'Checking for any stuck processes...' + print('Checking for any stuck processes...') for proc in psutil.process_iter(): try: if workspace in str(proc.open_files()): - print "{} has open files in {}. Terminating".format(proc.name(), proc.open_files()) + print("{} has open files in {}. Terminating".format(proc.name(), proc.open_files())) proc.kill() time.sleep(1) # Just to make sure a parent process has time to close except (psutil.NoSuchProcess, psutil.AccessDenied, psutil.ZombieProcess): @@ -172,7 +172,7 @@ def kill_processes(workspace='/dev/'): def delete_volume(ec2_client, volume_id): response = ec2_client.delete_volume(VolumeId=volume_id) - print 'Volume {} deleted'.format(volume_id) + print('Volume {} deleted'.format(volume_id)) def find_snapshot_id(ec2_client, snapshot_hint, repository_name, project, pipeline, platform, build_type, disk_size): mount_name = get_mount_name(repository_name, project, pipeline, snapshot_hint, platform, build_type) @@ -236,29 +236,29 @@ def create_volume(ec2_client, availability_zone, snapshot_hint, repository_name, time.sleep(1) response = ec2_client.describe_volumes(VolumeIds=[volume_id, ]) - print("Volume {} created\n\tSnapshot: {}\n\tRepository {}\n\tProject {}\n\tPipeline {}\n\tBranch {}\n\tPlatform: {}\n\tBuild type: {}" - .format(volume_id, snapshot_id, repository_name, project, pipeline, branch, platform, build_type)) + print(("Volume {} created\n\tSnapshot: {}\n\tRepository {}\n\tProject {}\n\tPipeline {}\n\tBranch {}\n\tPlatform: {}\n\tBuild type: {}" + .format(volume_id, snapshot_id, repository_name, project, pipeline, branch, platform, build_type))) return volume_id, created def mount_volume(created): - print 'Mounting volume...' + print('Mounting volume...') if os.name == 'nt': f = tempfile.NamedTemporaryFile(delete=False) f.write(""" select disk 1 online disk attribute disk clear readonly - """) # assume disk # for now + """.encode('utf-8')) # assume disk # for now if created: - print 'Creating filesystem on new volume' + print('Creating filesystem on new volume') f.write("""create partition primary select partition 1 format quick fs=ntfs assign active - """) + """.encode('utf-8')) f.close() @@ -269,7 +269,7 @@ def mount_volume(created): drives_after = win32api.GetLogicalDriveStrings() drives_after = drives_after.split('\000')[:-1] - print drives_after + print(drives_after) #drive_letter = next(item for item in drives_after if item not in drives_before) drive_letter = MOUNT_PATH @@ -286,7 +286,7 @@ def mount_volume(created): def attach_volume(volume, volume_id, instance_id, timeout=DEFAULT_TIMEOUT): - print 'Attaching volume {} to instance {}'.format(volume_id, instance_id) + print('Attaching volume {} to instance {}'.format(volume_id, instance_id)) volume.attach_to_instance(Device='xvdf', InstanceId=instance_id, VolumeId=volume_id) @@ -299,7 +299,7 @@ def attach_volume(volume, volume_id, instance_id, timeout=DEFAULT_TIMEOUT): time.sleep(1) volume.load() if (time.clock() - timeout_init) > timeout: - print 'ERROR: Timeout reached trying to mount EBS' + print('ERROR: Timeout reached trying to mount EBS') exit(1) volume.create_tags( Tags=[ @@ -309,18 +309,18 @@ def attach_volume(volume, volume_id, instance_id, timeout=DEFAULT_TIMEOUT): }, ] ) - print 'Volume {} has been attached to instance {}'.format(volume_id, instance_id) + print('Volume {} has been attached to instance {}'.format(volume_id, instance_id)) def unmount_volume(): - print 'Umounting volume...' + print('Umounting volume...') if os.name == 'nt': kill_processes(MOUNT_PATH + 'workspace') f = tempfile.NamedTemporaryFile(delete=False) f.write(""" select disk 1 offline disk - """) + """.encode('utf-8')) f.close() subprocess.call('diskpart /s %s' % f.name) os.unlink(f.name) @@ -330,7 +330,7 @@ def unmount_volume(): def detach_volume(volume, ec2_instance_id, force, timeout=DEFAULT_TIMEOUT): - print 'Detaching volume {} from instance {}'.format(volume.volume_id, ec2_instance_id) + print('Detaching volume {} from instance {}'.format(volume.volume_id, ec2_instance_id)) volume.detach_from_instance(Device='xvdf', Force=force, InstanceId=ec2_instance_id, @@ -340,16 +340,16 @@ def detach_volume(volume, ec2_instance_id, force, timeout=DEFAULT_TIMEOUT): time.sleep(1) volume.load() if (time.clock() - timeout_init) > timeout: - print 'ERROR: Timeout reached trying to unmount EBS.' + print('ERROR: Timeout reached trying to unmount EBS.') volume.detach_from_instance(Device='xvdf',Force=True,InstanceId=ec2_instance_id,VolumeId=volume.volume_id) exit(1) - print 'Volume {} has been detached from instance {}'.format(volume.volume_id, ec2_instance_id) + print('Volume {} has been detached from instance {}'.format(volume.volume_id, ec2_instance_id)) volume.load() if len(volume.attachments): - print 'Volume still has attachments' + print('Volume still has attachments') for attachment in volume.attachments: - print 'Volume {} {} to instance {}'.format(attachment['VolumeId'], attachment['State'], attachment['InstanceId']) + print('Volume {} {} to instance {}'.format(attachment['VolumeId'], attachment['State'], attachment['InstanceId'])) def attach_ebs_and_create_partition_with_retry(volume, volume_id, ec2_instance_id, created): @@ -381,10 +381,10 @@ def mount_ebs(snapshot_hint, repository_name, project, pipeline, branch, platfor for volume in ec2_instance.volumes.all(): for attachment in volume.attachments: - print 'attachment device: {}'.format(attachment['Device']) + print('attachment device: {}'.format(attachment['Device'])) if 'xvdf' in attachment['Device'] and attachment['State'] != 'detached': - print 'A device is already attached to xvdf. This likely means a previous build failed to detach its ' \ - 'build volume. This volume is considered orphaned and will be detached from this instance.' + print('A device is already attached to xvdf. This likely means a previous build failed to detach its ' \ + 'build volume. This volume is considered orphaned and will be detached from this instance.') unmount_volume() detach_volume(volume, ec2_instance_id, False) # Force unmounts should not be used, as that will cause the EBS block device driver to fail the remount @@ -395,21 +395,21 @@ def mount_ebs(snapshot_hint, repository_name, project, pipeline, branch, platfor created = False if 'Volumes' in response and not len(response['Volumes']): - print 'Volume for {} doesn\'t exist creating it...'.format(mount_name) + print('Volume for {} doesn\'t exist creating it...'.format(mount_name)) # volume doesn't exist, create it volume_id, created = create_volume(ec2_client, ec2_availability_zone, snapshot_hint, repository_name, project, pipeline, branch, platform, build_type, disk_size, disk_type) else: volume = response['Volumes'][0] volume_id = volume['VolumeId'] - print 'Current volume {} is a {} GB {}'.format(volume_id, volume['Size'], volume['VolumeType']) + print('Current volume {} is a {} GB {}'.format(volume_id, volume['Size'], volume['VolumeType'])) if (volume['Size'] != disk_size or volume['VolumeType'] != disk_type): - print 'Override disk attributes does not match the existing volume, deleting {} and replacing the volume'.format(volume_id) + print('Override disk attributes does not match the existing volume, deleting {} and replacing the volume'.format(volume_id)) delete_volume(ec2_client, volume_id) volume_id, created = create_volume(ec2_client, ec2_availability_zone, snapshot_hint, repository_name, project, pipeline, branch, platform, build_type, disk_size, disk_type) if len(volume['Attachments']): # this is bad we shouldn't be attached, we should have detached at the end of a build attachment = volume['Attachments'][0] - print ('Volume already has attachment {}, detaching...'.format(attachment)) + print(('Volume already has attachment {}, detaching...'.format(attachment))) detach_volume(ec2_resource.Volume(volume_id), attachment['InstanceId'], True) volume = ec2_resource.Volume(volume_id) @@ -418,23 +418,23 @@ def mount_ebs(snapshot_hint, repository_name, project, pipeline, branch, platfor drives_before = win32api.GetLogicalDriveStrings() drives_before = drives_before.split('\000')[:-1] - print drives_before + print(drives_before) attach_ebs_and_create_partition_with_retry(volume, volume_id, ec2_instance_id, created) free_space_mb = get_free_space_mb(MOUNT_PATH) - print 'Free disk space {}MB'.format(free_space_mb) + print('Free disk space {}MB'.format(free_space_mb)) if free_space_mb < LOW_EBS_DISK_SPACE_LIMIT: - print 'Volume is running below EBS free disk space treshhold {}MB. Recreating volume and running clean build.'.format(LOW_EBS_DISK_SPACE_LIMIT) + print('Volume is running below EBS free disk space treshhold {}MB. Recreating volume and running clean build.'.format(LOW_EBS_DISK_SPACE_LIMIT)) unmount_volume() detach_volume(volume, ec2_instance_id, False) delete_volume(ec2_client, volume_id) new_disk_size = int(volume.size * 1.25) if new_disk_size > MAX_EBS_DISK_SIZE: - print 'Error: EBS disk size reached to the allowed maximum disk size {}MB, please contact ly-infra@ and ly-build@ to investigate.'.format(MAX_EBS_DISK_SIZE) + print('Error: EBS disk size reached to the allowed maximum disk size {}MB, please contact ly-infra@ and ly-build@ to investigate.'.format(MAX_EBS_DISK_SIZE)) exit(1) - print 'Recreating the EBS with disk size {}'.format(new_disk_size) + print('Recreating the EBS with disk size {}'.format(new_disk_size)) volume_id, created = create_volume(ec2_client, ec2_availability_zone, snapshot_hint, repository_name, project, pipeline, branch, platform, build_type, new_disk_size, disk_type) volume = ec2_resource.Volume(volume_id) attach_ebs_and_create_partition_with_retry(volume, volume_id, ec2_instance_id, created) @@ -456,13 +456,13 @@ def unmount_ebs(): for attached_volume in ec2_instance.volumes.all(): for attachment in attached_volume.attachments: - print 'attachment device: {}'.format(attachment['Device']) + print('attachment device: {}'.format(attachment['Device'])) if attachment['Device'] == 'xvdf': volume = attached_volume if not volume: # volume is not mounted - print 'Volume is not mounted' + print('Volume is not mounted') else: unmount_volume() detach_volume(volume, ec2_instance_id, 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 201e4e8424..9cc9d934c1 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 @@ -9,6 +9,7 @@ ninja-build # For the compiler and its dependencies 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 zlib1g-dev 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 13b6376911..d5a50cfa97 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 @@ -9,6 +9,7 @@ ninja-build # For the compiler and its dependencies 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 zlib1g-dev diff --git a/scripts/o3de/o3de/register.py b/scripts/o3de/o3de/register.py index ff4ccdc0a6..9d1d6e3122 100644 --- a/scripts/o3de/o3de/register.py +++ b/scripts/o3de/o3de/register.py @@ -253,7 +253,8 @@ def add_engine_name_to_path(json_data: dict, engine_path: pathlib.Path, force: b logger.error( f'Attempting to register existing engine "{engine_name}" with a new path of {engine_path.as_posix()}.' f' The current path is {pathlib.Path(engines_path_json[engine_name]).as_posix()}.' - f' To force registration of a new engine path, specify the -f/--force option.') + f' To force registration of a new engine path, specify the -f/--force option.' + f'\nAlternatively the engine can be registered with a different name by changing the "engine_name" field in the engine.json.') return 1 engines_path_json[engine_name] = engine_path.as_posix() return 0 @@ -665,7 +666,7 @@ def remove_invalid_o3de_projects(manifest_path: pathlib.Path = None) -> int: result = 0 - for project in json_data['projects']: + 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 @@ -677,36 +678,36 @@ def remove_invalid_o3de_projects(manifest_path: pathlib.Path = None) -> int: def remove_invalid_o3de_objects() -> None: json_data = manifest.load_o3de_manifest() - for engine_object in json_data['engines']: - engine_path = engine_object['path'] + for engine_object in json_data.get('engines', []): + engine_path = engine_object.get('path', '') 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 gem in json_data['gems']: + for gem in json_data.get('gems', []): if not validation.valid_o3de_gem_json(pathlib.Path(gem).resolve() / 'gem.json'): logger.warn(f"Gem path {gem} is invalid.") register(gem_path=gem, remove=True) - for external in json_data['external_subdirectories']: + for external in json_data.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 json_data['templates']: + for template in json_data.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 json_data['restricted']: + for restricted in json_data.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) - default_engines_folder = pathlib.Path(json_data['default_engines_folder']).resolve() + 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) @@ -714,7 +715,7 @@ def remove_invalid_o3de_objects() -> None: 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['default_projects_folder']).resolve() + 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) @@ -722,7 +723,7 @@ def remove_invalid_o3de_objects() -> None: 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['default_gems_folder']).resolve() + 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) @@ -730,7 +731,7 @@ def remove_invalid_o3de_objects() -> None: f" Set default {new_default_gems_folder}") register(default_gems_folder=new_default_gems_folder.as_posix()) - default_templates_folder = pathlib.Path(json_data['default_templates_folder']).resolve() + 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) @@ -739,7 +740,7 @@ def remove_invalid_o3de_objects() -> None: f" Set default {new_default_templates_folder}") register(default_templates_folder=new_default_templates_folder.as_posix()) - default_restricted_folder = pathlib.Path(json_data['default_restricted_folder']).resolve() + 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) @@ -748,7 +749,7 @@ def remove_invalid_o3de_objects() -> None: f" Set default {default_restricted_folder}") register(default_restricted_folder=default_restricted_folder.as_posix()) - default_third_party_folder = pathlib.Path(json_data['default_third_party_folder']).resolve() + 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)