diff --git a/AutomatedTesting/AssetProcessorGamePlatformConfig.setreg b/AutomatedTesting/AssetProcessorGamePlatformConfig.setreg
deleted file mode 100644
index c9876cb1f9..0000000000
--- a/AutomatedTesting/AssetProcessorGamePlatformConfig.setreg
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "Amazon": {
- "AssetProcessor": {
- "Settings": {
- "RC cgf": {
- "ignore": true
- },
- "RC fbx": {
- "ignore": true
- }
- }
- }
- }
-}
diff --git a/AutomatedTesting/Gem/PythonTests/NvCloth/C18977329_NvCloth_AddClothSimulationToMesh.py b/AutomatedTesting/Gem/PythonTests/NvCloth/C18977329_NvCloth_AddClothSimulationToMesh.py
index 625c9772bd..5cfc57fd5f 100755
--- a/AutomatedTesting/Gem/PythonTests/NvCloth/C18977329_NvCloth_AddClothSimulationToMesh.py
+++ b/AutomatedTesting/Gem/PythonTests/NvCloth/C18977329_NvCloth_AddClothSimulationToMesh.py
@@ -11,7 +11,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# Test case ID : C18977329
# Test Case Title : Add cloth simulation to a Mesh
-# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/18977329
# fmt: off
class Tests:
diff --git a/AutomatedTesting/Gem/PythonTests/NvCloth/C18977330_NvCloth_AddClothSimulationToActor.py b/AutomatedTesting/Gem/PythonTests/NvCloth/C18977330_NvCloth_AddClothSimulationToActor.py
index 9b3135cd2b..c21df8ea4c 100755
--- a/AutomatedTesting/Gem/PythonTests/NvCloth/C18977330_NvCloth_AddClothSimulationToActor.py
+++ b/AutomatedTesting/Gem/PythonTests/NvCloth/C18977330_NvCloth_AddClothSimulationToActor.py
@@ -11,7 +11,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# Test case ID : C18977330
# Test Case Title : Add cloth simulation to an Actor
-# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/18977330
# fmt: off
class Tests:
diff --git a/AutomatedTesting/Gem/PythonTests/WhiteBox/C28798177_WhiteBox_AddComponentToEntity.py b/AutomatedTesting/Gem/PythonTests/WhiteBox/C28798177_WhiteBox_AddComponentToEntity.py
index dabc04575f..86a27e588e 100755
--- a/AutomatedTesting/Gem/PythonTests/WhiteBox/C28798177_WhiteBox_AddComponentToEntity.py
+++ b/AutomatedTesting/Gem/PythonTests/WhiteBox/C28798177_WhiteBox_AddComponentToEntity.py
@@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# Test case ID : C28798177
# Test Case Title : White Box Tool Component can be added to an Entity
-# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/28798177
# fmt:off
diff --git a/AutomatedTesting/Gem/PythonTests/WhiteBox/C28798205_WhiteBox_SetInvisible.py b/AutomatedTesting/Gem/PythonTests/WhiteBox/C28798205_WhiteBox_SetInvisible.py
index 18a5c3164e..7a2a08a8ce 100755
--- a/AutomatedTesting/Gem/PythonTests/WhiteBox/C28798205_WhiteBox_SetInvisible.py
+++ b/AutomatedTesting/Gem/PythonTests/WhiteBox/C28798205_WhiteBox_SetInvisible.py
@@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# Test case ID : C28798205
# Test Case Title : From the White Box Component Card the White Box Mesh can be set to be invisible in Game View
-# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/28798205
# fmt:off
diff --git a/AutomatedTesting/Gem/PythonTests/WhiteBox/C29279329_WhiteBox_SetDefaultShape.py b/AutomatedTesting/Gem/PythonTests/WhiteBox/C29279329_WhiteBox_SetDefaultShape.py
index e892285dde..635c804914 100755
--- a/AutomatedTesting/Gem/PythonTests/WhiteBox/C29279329_WhiteBox_SetDefaultShape.py
+++ b/AutomatedTesting/Gem/PythonTests/WhiteBox/C29279329_WhiteBox_SetDefaultShape.py
@@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# Test case ID : C29279329
# Test Case Title : White Box mesh shape can be changed with the Default Shape dropdown on the Component
-# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/29279329
# fmt:off
diff --git a/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_MainSuite.py b/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_MainSuite.py
index f84e367d1d..0b75760e05 100644
--- a/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_MainSuite.py
+++ b/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_MainSuite.py
@@ -18,7 +18,7 @@ import pytest
import editor_python_test_tools.hydra_test_utils as hydra
logger = logging.getLogger(__name__)
-EDITOR_TIMEOUT = 120
+EDITOR_TIMEOUT = 300
TEST_DIRECTORY = os.path.join(os.path.dirname(__file__), "atom_hydra_scripts")
diff --git a/AutomatedTesting/Gem/PythonTests/physics/C14976308_ScriptCanvas_SetKinematicTargetTransform.py b/AutomatedTesting/Gem/PythonTests/physics/C14976308_ScriptCanvas_SetKinematicTargetTransform.py
index c76c5cab80..8400364626 100755
--- a/AutomatedTesting/Gem/PythonTests/physics/C14976308_ScriptCanvas_SetKinematicTargetTransform.py
+++ b/AutomatedTesting/Gem/PythonTests/physics/C14976308_ScriptCanvas_SetKinematicTargetTransform.py
@@ -68,7 +68,7 @@ def C14976308_ScriptCanvas_SetKinematicTargetTransform():
the script deactivates Signal, Sphere's transform will update to that of Transform_Target.
NOTE: There is a known bug (LY-107723) which causes the rotation to update to a value that is not sufficiently close
to the expected result when using Set Kinematic Target which will cause the test to fail:
- https://jira.agscollab.com/browse/LY-107723
+ LY-107723
Test Steps:
1) Open level and enter game mode
diff --git a/AutomatedTesting/Gem/PythonTests/physics/C3510644_Collider_CollisionGroups.py b/AutomatedTesting/Gem/PythonTests/physics/C3510644_Collider_CollisionGroups.py
index 4ae10288bd..e714da9de7 100755
--- a/AutomatedTesting/Gem/PythonTests/physics/C3510644_Collider_CollisionGroups.py
+++ b/AutomatedTesting/Gem/PythonTests/physics/C3510644_Collider_CollisionGroups.py
@@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# Test case ID : C3510644
# Test Case Title : Check that the collision layer and collision group of the terrain can be changed
# and the collision behavior of the terrain changes accordingly
-# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/3510644
# fmt: off
diff --git a/AutomatedTesting/Gem/PythonTests/physics/C6321601_Force_HighValuesDirectionAxes.py b/AutomatedTesting/Gem/PythonTests/physics/C6321601_Force_HighValuesDirectionAxes.py
index 4b0b036970..08083a7868 100755
--- a/AutomatedTesting/Gem/PythonTests/physics/C6321601_Force_HighValuesDirectionAxes.py
+++ b/AutomatedTesting/Gem/PythonTests/physics/C6321601_Force_HighValuesDirectionAxes.py
@@ -239,7 +239,7 @@ def C6321601_Force_HighValuesDirectionAxes():
force_notification_handler.add_callback("OnCalculateNetForce", on_calc_net_force)
# Wait for 3 secs, because there is a known bug identified and filed in
- # JIRA https://jira.agscollab.com/browse/LY-107677
+ # JIRA LY-107677
# The error "[Error] Huge object being added to a COctreeNode, name: 'MeshComponentRenderNode', objBox:"
# will show (if occured) in about 3 sec into the game mode.
helper.wait_for_condition(has_physx_error, 3.0)
diff --git a/AutomatedTesting/Gem/PythonTests/physics/TestSuite_InDevelopment.py b/AutomatedTesting/Gem/PythonTests/physics/TestSuite_InDevelopment.py
index 8f098941ea..8986c1024a 100755
--- a/AutomatedTesting/Gem/PythonTests/physics/TestSuite_InDevelopment.py
+++ b/AutomatedTesting/Gem/PythonTests/physics/TestSuite_InDevelopment.py
@@ -50,7 +50,7 @@ class TestAutomation(TestAutomationBase):
unexpected_lines = ["Assert"]
self._run_test(request, workspace, editor, test_module, expected_lines, unexpected_lines)
- # BUG: https://jira.agscollab.com/browse/LY-107723")
+ # BUG: LY-107723")
def test_C14976308_ScriptCanvas_SetKinematicTargetTransform(self, request, workspace, editor):
from . import C14976308_ScriptCanvas_SetKinematicTargetTransform as test_module
diff --git a/AutomatedTesting/Gem/PythonTests/physics/UtilTest_Physmaterial_Editor.py b/AutomatedTesting/Gem/PythonTests/physics/UtilTest_Physmaterial_Editor.py
index 5f24f41083..b6d7c610e3 100755
--- a/AutomatedTesting/Gem/PythonTests/physics/UtilTest_Physmaterial_Editor.py
+++ b/AutomatedTesting/Gem/PythonTests/physics/UtilTest_Physmaterial_Editor.py
@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
'''
This unittest might have to be refactored once changes to Physmaterial_Editor.py are made.
These changes will occur after the but, reverence below is resloved.
-Bug: https://jira.agscollab.com/browse/LY-107392
+Bug: LY-107392
'''
class Tests:
opening_bad_file = ("Bad file could not be opened", "Bad file was opened")
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/AssetEditor_CreateScriptEventFile.py b/AutomatedTesting/Gem/PythonTests/scripting/AssetEditor_CreateScriptEventFile.py
index dcbbf47f0c..b844f9e4af 100644
--- a/AutomatedTesting/Gem/PythonTests/scripting/AssetEditor_CreateScriptEventFile.py
+++ b/AutomatedTesting/Gem/PythonTests/scripting/AssetEditor_CreateScriptEventFile.py
@@ -10,7 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92569013
Test Case Title: Script Event file can be created
-URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569013
"""
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/AssetEditor_NewScriptEvent.py b/AutomatedTesting/Gem/PythonTests/scripting/AssetEditor_NewScriptEvent.py
index 1f801d4eeb..e4fec76fe2 100644
--- a/AutomatedTesting/Gem/PythonTests/scripting/AssetEditor_NewScriptEvent.py
+++ b/AutomatedTesting/Gem/PythonTests/scripting/AssetEditor_NewScriptEvent.py
@@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92568942
Test Case Title: Clicking the "+" button and selecting "New Script Event" opens the
Asset Editor with a new Script Event asset
-URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92568942
"""
from PySide2 import QtWidgets
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/Debugging_TargetMultipleEntities.py b/AutomatedTesting/Gem/PythonTests/scripting/Debugging_TargetMultipleEntities.py
index a26cb4f923..0947b0bb51 100644
--- a/AutomatedTesting/Gem/PythonTests/scripting/Debugging_TargetMultipleEntities.py
+++ b/AutomatedTesting/Gem/PythonTests/scripting/Debugging_TargetMultipleEntities.py
@@ -11,7 +11,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92568856
Test Case Title: Multiple Entities can be targeted in the Debugger tool
-URLs of the test case: https://testrail.agscollab.com/index.php?/tests/view/92568856
"""
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/Debugging_TargetMultipleGraphs.py b/AutomatedTesting/Gem/PythonTests/scripting/Debugging_TargetMultipleGraphs.py
index 4aa5c822a7..8d2c39f288 100644
--- a/AutomatedTesting/Gem/PythonTests/scripting/Debugging_TargetMultipleGraphs.py
+++ b/AutomatedTesting/Gem/PythonTests/scripting/Debugging_TargetMultipleGraphs.py
@@ -11,7 +11,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92569137
Test Case Title: Multiple Graphs can be targeted in the Debugger tool
-URLs of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569137
"""
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/Docking_Pane.py b/AutomatedTesting/Gem/PythonTests/scripting/Docking_Pane.py
index 4fa1e1257f..537b4d817a 100755
--- a/AutomatedTesting/Gem/PythonTests/scripting/Docking_Pane.py
+++ b/AutomatedTesting/Gem/PythonTests/scripting/Docking_Pane.py
@@ -10,7 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: C1702824
Test Case Title: Docking
-URLs of the test case: https://testrail.agscollab.com/index.php?/cases/view/1702824
"""
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/EditMenu_UndoRedo.py b/AutomatedTesting/Gem/PythonTests/scripting/EditMenu_UndoRedo.py
index a87d9e9be9..38ceb8335b 100644
--- a/AutomatedTesting/Gem/PythonTests/scripting/EditMenu_UndoRedo.py
+++ b/AutomatedTesting/Gem/PythonTests/scripting/EditMenu_UndoRedo.py
@@ -11,10 +11,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92569049
Test Case Title: Edit > Undo undoes the last action
-URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569049
Test case ID: T92569051
Test Case Title: Edit > Redo redoes the last undone action
-URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569051
"""
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/Entity_AddScriptCanvasComponent.py b/AutomatedTesting/Gem/PythonTests/scripting/Entity_AddScriptCanvasComponent.py
index fd8e9b1173..47bbb955ec 100644
--- a/AutomatedTesting/Gem/PythonTests/scripting/Entity_AddScriptCanvasComponent.py
+++ b/AutomatedTesting/Gem/PythonTests/scripting/Entity_AddScriptCanvasComponent.py
@@ -10,7 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92562978
Test Case Title: Script Canvas Component can be added to an entity
-URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92562978
"""
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/FileMenu_New_Open.py b/AutomatedTesting/Gem/PythonTests/scripting/FileMenu_New_Open.py
index f72ac8ea01..3206590a8d 100644
--- a/AutomatedTesting/Gem/PythonTests/scripting/FileMenu_New_Open.py
+++ b/AutomatedTesting/Gem/PythonTests/scripting/FileMenu_New_Open.py
@@ -11,10 +11,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92569037
Test Case Title: File > New Script creates a new script
-URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569037
Test case ID: T92569039
Test Case Title: File > Open opens the Open... dialog
-URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569039
"""
import os
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/GraphClose_SavePrompt.py b/AutomatedTesting/Gem/PythonTests/scripting/GraphClose_SavePrompt.py
index ce610b159b..ec8f0c8fb6 100644
--- a/AutomatedTesting/Gem/PythonTests/scripting/GraphClose_SavePrompt.py
+++ b/AutomatedTesting/Gem/PythonTests/scripting/GraphClose_SavePrompt.py
@@ -11,11 +11,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92563070
Test Case Title: Graphs can be closed by clicking X on the Graph name tab
-URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92563070
Test case ID: T92563068
Test Case Title: Save Prompt: User is prompted to save a graph on close after
creating a new graph
-URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92563068
"""
import os
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/Graph_ZoomInZoomOut.py b/AutomatedTesting/Gem/PythonTests/scripting/Graph_ZoomInZoomOut.py
index a93b6e61d1..d2765bfdf7 100644
--- a/AutomatedTesting/Gem/PythonTests/scripting/Graph_ZoomInZoomOut.py
+++ b/AutomatedTesting/Gem/PythonTests/scripting/Graph_ZoomInZoomOut.py
@@ -11,10 +11,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92569079
Test Case Title: View > Zoom In zooms the graph in
-URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569079
Test case ID: T92569081
Test Case Title: View > Zoom In zooms the graph out
-URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569081
"""
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/ImportPathHelper.py b/AutomatedTesting/Gem/PythonTests/scripting/ImportPathHelper.py
index a45024cebf..23e5f87030 100755
--- a/AutomatedTesting/Gem/PythonTests/scripting/ImportPathHelper.py
+++ b/AutomatedTesting/Gem/PythonTests/scripting/ImportPathHelper.py
@@ -9,9 +9,9 @@ remove or modify any license notices. This file is distributed on an "AS IS" BAS
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
"""
+
def init():
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../automatedtesting_shared')
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../EditorPythonTestTools/editor_python_test_tools')
-
\ No newline at end of file
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/NodeCategory_ExpandOnClick.py b/AutomatedTesting/Gem/PythonTests/scripting/NodeCategory_ExpandOnClick.py
new file mode 100644
index 0000000000..141cdbea8d
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/scripting/NodeCategory_ExpandOnClick.py
@@ -0,0 +1,128 @@
+"""
+All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+its licensors.
+
+For complete copyright and license terms please see the LICENSE at the root of this
+distribution (the "License"). All use of this software is governed by the License,
+or, if provided, by the license below or the license accompanying this file. Do not
+remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+Test case ID: T92562988
+Test Case Title: Left-click/double click expands and collapses node categories
+"""
+
+
+# fmt: off
+class Tests():
+ pane_open = ("Script Canvas pane successfully opened", "Script Canvas pane failed to open")
+ click_expand = ("Category expanded on left click", "Category failed to expand on left click")
+ click_collapse = ("Category collapsed on left click", "Category failed to collapse on left click")
+ dClick_expand = ("Category expanded on double click", "Category failed to expand on double click")
+ dClick_collapse = ("Category collapsed on double click", "Category failed to collapse on double click")
+# fmt: on
+
+
+def NodeCategory_ExpandOnClick():
+ """
+ Summary:
+ Verifying the expand/collapse functionality on node categories
+
+ Expected Behavior:
+ The node category should expand when double clicked or when the drop down indicator is
+ left-clicked. Once expanded, it should be collapsed via the same actions.
+
+ Test Steps:
+ 1) Open Script Canvas pane
+ 2) Get the SC window objects
+ 3) Ensure all categories are collapsed for a clean state
+ 4) Left-Click on a node category arrow to expand it
+ 5) Verify it expanded
+ 6) Left-Click on a node category arrow to collapse it
+ 7) Verify it collapsed
+ 8) Double-Click on a node category to expand it
+ 9) Verify it expanded
+ 10) Double-Click on a node category to collapse it
+ 11) Verify it collapsed
+
+ Note:
+ - This test file must be called from the Open 3D Engine Editor command terminal
+ - Any passed and failed tests are written to the Editor.log file.
+ Parsing the file or running a log_monitor are required to observe the test results.
+
+ :return: None
+ """
+ from utils import Report
+ from PySide2 import QtCore, QtWidgets, QtTest
+ from PySide2.QtTest import QTest
+ import pyside_utils
+ import azlmbr.legacy.general as general
+
+ def left_click_arrow(item_view, index):
+ original_state = item_view.isExpanded(index)
+ rect_center_y = item_view.visualRect(index).center().y()
+ rect_left_x = item_view.visualRect(index).left()
+ for i in range(5): # this range can be increased for safe side
+ QtTest.QTest.mouseClick(
+ item_view.viewport(),
+ QtCore.Qt.LeftButton,
+ QtCore.Qt.NoModifier,
+ QtCore.QPoint(rect_left_x - i, rect_center_y),
+ )
+ if item_view.isExpanded(index) != original_state:
+ break
+
+ def double_click(item_view, index):
+ item_index_center = item_view.visualRect(index).center()
+ # Left click on the item before trying to double click, will otherwise fail to expand
+ # as first click would highlight and second click would be a 'single click'
+ pyside_utils.item_view_index_mouse_click(item_view, index)
+ QTest.mouseDClick(item_view.viewport(), QtCore.Qt.LeftButton, QtCore.Qt.NoModifier, item_index_center)
+
+ # 1) Open Script Canvas pane
+ general.open_pane("Script Canvas")
+ Report.critical_result(Tests.pane_open, general.is_pane_visible("Script Canvas"))
+
+ # 2) Get the SC window objects
+ editor_window = pyside_utils.get_editor_main_window()
+ sc = editor_window.findChild(QtWidgets.QDockWidget, "Script Canvas")
+ if sc.findChild(QtWidgets.QDockWidget, "NodePalette") is None:
+ action = pyside_utils.find_child_by_pattern(sc, {"text": "Node Palette", "type": QtWidgets.QAction})
+ action.trigger()
+ node_palette = sc.findChild(QtWidgets.QDockWidget, "NodePalette")
+ nodeTree = node_palette.findChild(QtWidgets.QTreeView, "treeView")
+ ai_index = pyside_utils.find_child_by_pattern(nodeTree, "AI")
+
+ # 3) Ensure all categories are collapsed for a clean state
+ nodeTree.collapseAll()
+
+ # 4) Left-Click on a node category arrow to expand it
+ left_click_arrow(nodeTree, ai_index)
+
+ # 5) Verify it expanded
+ Report.result(Tests.click_expand, nodeTree.isExpanded(ai_index))
+
+ # 6) Left-Click on a node category arrow to collapse it
+ left_click_arrow(nodeTree, ai_index)
+
+ # 7) Verify it collapsed
+ Report.result(Tests.click_collapse, not nodeTree.isExpanded(ai_index))
+
+ # 8) Double-Click on a node category to expand it
+ double_click(nodeTree, ai_index)
+
+ # 9) Verify it expanded
+ Report.result(Tests.dClick_expand, nodeTree.isExpanded(ai_index))
+
+ # 10) Double-Click on a node category to collapse it
+ double_click(nodeTree, ai_index)
+
+ # 11) Verify it collapsed
+ Report.result(Tests.dClick_collapse, not nodeTree.isExpanded(ai_index))
+
+
+if __name__ == "__main__":
+ import ImportPathHelper as imports
+ imports.init()
+ from utils import Report
+ Report.start_test(NodeCategory_ExpandOnClick)
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/NodeInspector_RenameVariable.py b/AutomatedTesting/Gem/PythonTests/scripting/NodeInspector_RenameVariable.py
index 33d3f4137a..550969e32a 100644
--- a/AutomatedTesting/Gem/PythonTests/scripting/NodeInspector_RenameVariable.py
+++ b/AutomatedTesting/Gem/PythonTests/scripting/NodeInspector_RenameVariable.py
@@ -10,7 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92568982
Test Case Title: Renaming variables in the Node Inspector
-URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92568982
"""
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/NodePalette_ClearSelection.py b/AutomatedTesting/Gem/PythonTests/scripting/NodePalette_ClearSelection.py
index de30e46767..979bcff02e 100644
--- a/AutomatedTesting/Gem/PythonTests/scripting/NodePalette_ClearSelection.py
+++ b/AutomatedTesting/Gem/PythonTests/scripting/NodePalette_ClearSelection.py
@@ -10,7 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92562993
Test Case Title: Clicking the X button on the Search Box clears the currently entered string
-URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92562993
"""
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/NodePalette_SearchText_Deletion.py b/AutomatedTesting/Gem/PythonTests/scripting/NodePalette_SearchText_Deletion.py
new file mode 100644
index 0000000000..0739a8e637
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/scripting/NodePalette_SearchText_Deletion.py
@@ -0,0 +1,91 @@
+"""
+All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+its licensors.
+
+For complete copyright and license terms please see the LICENSE at the root of this
+distribution (the "License"). All use of this software is governed by the License,
+or, if provided, by the license below or the license accompanying this file. Do not
+remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+"""
+
+
+# fmt: off
+class Tests():
+ set_search_string = ("Search string is set", "Search string is not set")
+ search_string_deleted = ("Search string deleted as expected", "Search string not deleted")
+# fmt: on
+
+
+def NodePalette_SearchText_Deletion():
+ """
+ Summary:
+ We enter some string in the Node Palette Search box, select that text and delete it.
+
+ Expected Behavior:
+ After RightClick->Delete the text in the Searchbox should be deleted.
+
+ Test Steps:
+ 1) Open Script Canvas window (Tools > Script Canvas)
+ 2) Get the SC window object
+ 3) Open Node Manager if not opened already
+ 4) Set some string in the Search box
+ 5) Verify if the test string is set
+ 6) Delete search string using right click and verify if it is cleared
+
+ Note:
+ - This test file must be called from the Open 3D Engine Editor command terminal
+ - Any passed and failed tests are written to the Editor.log file.
+ Parsing the file or running a log_monitor are required to observe the test results.
+
+ :return: None
+ """
+
+ from PySide2 import QtWidgets, QtTest, QtCore
+
+ from utils import TestHelper as helper
+
+ import azlmbr.legacy.general as general
+
+ import pyside_utils
+
+ TEST_STRING = "TestString"
+
+ # 1) Open Script Canvas window (Tools > Script Canvas)
+ general.idle_enable(True)
+ general.open_pane("Script Canvas")
+ helper.wait_for_condition(lambda: general.is_pane_visible("Script Canvas"), 3.0)
+
+ # 2) Get the SC window object
+ editor_window = pyside_utils.get_editor_main_window()
+ sc = editor_window.findChild(QtWidgets.QDockWidget, "Script Canvas")
+
+ # 3) Open Node Manager if not opened already
+ if sc.findChild(QtWidgets.QDockWidget, "NodePalette") is None:
+ action = pyside_utils.find_child_by_pattern(sc, {"text": "Node Palette", "type": QtWidgets.QAction})
+ action.trigger()
+ node_palette = sc.findChild(QtWidgets.QDockWidget, "NodePalette")
+ search_frame = node_palette.findChild(QtWidgets.QFrame, "searchFrame")
+
+ # 4) Set some string in the Search box
+ search_box = search_frame.findChild(QtWidgets.QLineEdit, "searchFilter")
+ search_box.setText(TEST_STRING)
+
+ # 5) Verify if the test string is set
+ result = helper.wait_for_condition(lambda: search_box.text() == TEST_STRING, 1.0)
+ Report.result(Tests.set_search_string, result)
+
+ # 6) Delete search string using right click and verify if it is cleared
+ QtTest.QTest.keyClick(search_box, QtCore.Qt.Key_A, QtCore.Qt.ControlModifier)
+ pyside_utils.trigger_context_menu_entry(search_box, "Delete")
+ result = helper.wait_for_condition(lambda: search_box.text() == "", 2.0)
+ Report.result(Tests.search_string_deleted, result)
+
+
+if __name__ == "__main__":
+ import ImportPathHelper as imports
+
+ imports.init()
+ from utils import Report
+
+ Report.start_test(NodePalette_SearchText_Deletion)
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/NodePalette_SelectNode.py b/AutomatedTesting/Gem/PythonTests/scripting/NodePalette_SelectNode.py
index 2ab76071a6..374dc4e1a0 100644
--- a/AutomatedTesting/Gem/PythonTests/scripting/NodePalette_SelectNode.py
+++ b/AutomatedTesting/Gem/PythonTests/scripting/NodePalette_SelectNode.py
@@ -11,7 +11,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92568940
Test Case Title: Categories and Nodes can be selected
-URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92568940
"""
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/OnEntityActivatedDeactivated_PrintMessage.py b/AutomatedTesting/Gem/PythonTests/scripting/OnEntityActivatedDeactivated_PrintMessage.py
index 51b63c4268..00893d6acb 100644
--- a/AutomatedTesting/Gem/PythonTests/scripting/OnEntityActivatedDeactivated_PrintMessage.py
+++ b/AutomatedTesting/Gem/PythonTests/scripting/OnEntityActivatedDeactivated_PrintMessage.py
@@ -10,7 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92569253 // T92569254
Test Case Title: On Entity Activated // On Entity Deactivated
-URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569253 // https://testrail.agscollab.com/index.php?/tests/view/92569254
"""
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/Opening_Closing_Pane.py b/AutomatedTesting/Gem/PythonTests/scripting/Opening_Closing_Pane.py
index 666f052240..48c40eb05e 100755
--- a/AutomatedTesting/Gem/PythonTests/scripting/Opening_Closing_Pane.py
+++ b/AutomatedTesting/Gem/PythonTests/scripting/Opening_Closing_Pane.py
@@ -10,8 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: C1702834 // C1702823
Test Case Title: Opening pane // Closing pane
-URLs of the test case: https://testrail.agscollab.com/index.php?/cases/view/1702834 and
- https://testrail.agscollab.com/index.php?/cases/view/1702823
"""
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/Pane_RetainOnSCRestart.py b/AutomatedTesting/Gem/PythonTests/scripting/Pane_RetainOnSCRestart.py
index fa5e9e6068..adf9b5f35a 100644
--- a/AutomatedTesting/Gem/PythonTests/scripting/Pane_RetainOnSCRestart.py
+++ b/AutomatedTesting/Gem/PythonTests/scripting/Pane_RetainOnSCRestart.py
@@ -10,8 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: C1702821 // C1702832
Test Case Title: Retain visibility, size and location upon Script Canvas restart
-URLs of the test case: https://testrail.agscollab.com/index.php?/cases/view/1702821 and
- https://testrail.agscollab.com/index.php?/cases/view/1702832
"""
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/Resizing_Pane.py b/AutomatedTesting/Gem/PythonTests/scripting/Resizing_Pane.py
index 180f577953..bbae3afefd 100755
--- a/AutomatedTesting/Gem/PythonTests/scripting/Resizing_Pane.py
+++ b/AutomatedTesting/Gem/PythonTests/scripting/Resizing_Pane.py
@@ -10,7 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: C1702829
Test Case Title: Resizing pane
-URLs of the test case: https://testrail.agscollab.com/index.php?/cases/view/1702829
"""
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_ChangingAssets.py b/AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_ChangingAssets.py
index 38d60ad871..bb4de4a6c9 100644
--- a/AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_ChangingAssets.py
+++ b/AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_ChangingAssets.py
@@ -11,7 +11,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92562986
Test Case Title: Changing the assigned Script Canvas Asset on an entity properly updates
level functionality
-URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92562986
"""
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_TwoComponents.py b/AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_TwoComponents.py
index 896bee96e5..6187ac81ba 100644
--- a/AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_TwoComponents.py
+++ b/AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_TwoComponents.py
@@ -10,7 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92563190
Test Case Title: A single Entity with two Script Canvas components works properly
-URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92563190
"""
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_TwoEntities.py b/AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_TwoEntities.py
index 401e6c0271..9453c31488 100644
--- a/AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_TwoEntities.py
+++ b/AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_TwoEntities.py
@@ -10,7 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92563191
Test Case Title: Two Entities can use the same Graph asset successfully at RunTime
-URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92563191
"""
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/ScriptEvents_ReturnSetType_Successfully.py b/AutomatedTesting/Gem/PythonTests/scripting/ScriptEvents_ReturnSetType_Successfully.py
new file mode 100644
index 0000000000..aa9abd110b
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/scripting/ScriptEvents_ReturnSetType_Successfully.py
@@ -0,0 +1,112 @@
+"""
+All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+its licensors.
+
+For complete copyright and license terms please see the LICENSE at the root of this
+distribution (the "License"). All use of this software is governed by the License,
+or, if provided, by the license below or the license accompanying this file. Do not
+remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+Test Case Title: Event can return a value of set type successfully
+"""
+
+
+# fmt: off
+class Tests():
+ level_created = ("Successfully created temporary level", "Failed to create temporary level")
+ entity_created = ("Successfully created test entity", "Failed to create test entity")
+ enter_game_mode = ("Successfully entered game mode", "Failed to enter game mode")
+ lines_found = ("Successfully found expected message", "Failed to find expected message")
+ exit_game_mode = ("Successfully exited game mode", "Failed to exit game mode")
+# fmt: on
+
+
+def ScriptEvents_ReturnSetType_Successfully():
+ """
+ Summary: A temporary level is created with an Entity having ScriptCanvas component.
+ ScriptEvent(T92569006_ScriptEvent.scriptevents) is created with one Method that has a return value.
+ ScriptCanvas(T92569006_ScriptCanvas.scriptcanvas) is attached to Entity. Graph has Send node that sends the Method
+ of the ScriptEvent and prints the returned result ( On Entity Activated -> Send node -> Print) and Receive node is
+ set to return custom value ( Receive node -> Print).
+ Verify that the entity containing T92569006_ScriptCanvas.scriptcanvas should print the custom value set in both
+ Send and Receive nodes.
+
+ Expected Behavior:
+ After entering game mode, the graph on the entity should print an expected message to the console
+
+ Test Steps:
+ 1) Create test level
+ 2) Create test entity
+ 3) Start Tracer
+ 4) Enter Game Mode
+ 5) Read for line
+ 6) Exit Game Mode
+
+ Note:
+ - This test file must be called from the Open 3D Engine Editor command terminal
+ - Any passed and failed tests are written to the Editor.log file.
+ Parsing the file or running a log_monitor are required to observe the test results.
+
+ :return: None
+ """
+ import os
+ from editor_entity_utils import EditorEntity as Entity
+ from utils import Report
+ from utils import TestHelper as helper
+ from utils import Tracer
+
+ import azlmbr.legacy.general as general
+ import azlmbr.asset as asset
+ import azlmbr.math as math
+ import azlmbr.bus as bus
+
+ LEVEL_NAME = "tmp_level"
+ WAIT_TIME = 3.0 # SECONDS
+ EXPECTED_LINES = ["T92569006_ScriptEvent_Sent", "T92569006_ScriptEvent_Received"]
+ SC_ASSET_PATH = os.path.join("ScriptCanvas", "T92569006_ScriptCanvas.scriptcanvas")
+
+ def create_editor_entity(name, sc_asset):
+ entity = Entity.create_editor_entity(name)
+ sc_comp = entity.add_component("Script Canvas")
+ asset_id = asset.AssetCatalogRequestBus(bus.Broadcast, "GetAssetIdByPath", sc_asset, math.Uuid(), False)
+ sc_comp.set_component_property_value("Script Canvas Asset|Script Canvas Asset", asset_id)
+ Report.critical_result(Tests.entity_created, entity.id.isValid())
+
+ def locate_expected_lines(line_list: list):
+ found_lines = [printInfo.message.strip() for printInfo in section_tracer.prints]
+
+ return all(line in found_lines for line in line_list)
+
+ # 1) Create temp level
+ general.idle_enable(True)
+ result = general.create_level_no_prompt(LEVEL_NAME, 128, 1, 512, True)
+ Report.critical_result(Tests.level_created, result == 0)
+ helper.wait_for_condition(lambda: general.get_current_level_name() == LEVEL_NAME, WAIT_TIME)
+ general.close_pane("Error Report")
+
+ # 2) Create test entity
+ create_editor_entity("TestEntity", SC_ASSET_PATH)
+
+ # 3) Start Tracer
+ with Tracer() as section_tracer:
+
+ # 4) Enter Game Mode
+ helper.enter_game_mode(Tests.enter_game_mode)
+
+ # 5) Read for line
+ lines_located = helper.wait_for_condition(lambda: locate_expected_lines(EXPECTED_LINES), WAIT_TIME)
+ Report.result(Tests.lines_found, lines_located)
+
+ # 6) Exit Game Mode
+ helper.exit_game_mode(Tests.exit_game_mode)
+
+
+if __name__ == "__main__":
+ import ImportPathHelper as imports
+
+ imports.init()
+
+ from utils import Report
+
+ Report.start_test(ScriptEvents_ReturnSetType_Successfully)
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/ScriptEvents_SendReceiveAcrossMultiple.py b/AutomatedTesting/Gem/PythonTests/scripting/ScriptEvents_SendReceiveAcrossMultiple.py
index d671229cdf..a2913d3468 100644
--- a/AutomatedTesting/Gem/PythonTests/scripting/ScriptEvents_SendReceiveAcrossMultiple.py
+++ b/AutomatedTesting/Gem/PythonTests/scripting/ScriptEvents_SendReceiveAcrossMultiple.py
@@ -10,7 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92567321
Test Case Title: Script Events: Can send and receive a script event across multiple entities successfully
-URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92567321
"""
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/ScriptEvents_SendReceiveSuccessfully.py b/AutomatedTesting/Gem/PythonTests/scripting/ScriptEvents_SendReceiveSuccessfully.py
index b5e26d14ae..388e2bb7c0 100644
--- a/AutomatedTesting/Gem/PythonTests/scripting/ScriptEvents_SendReceiveSuccessfully.py
+++ b/AutomatedTesting/Gem/PythonTests/scripting/ScriptEvents_SendReceiveSuccessfully.py
@@ -10,7 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92567320
Test Case Title: Script Events: Can send and receive a script event successfully
-URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92567320
"""
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/TestSuite_Active.py b/AutomatedTesting/Gem/PythonTests/scripting/TestSuite_Active.py
index d87f2986bf..dda75f0a0c 100755
--- a/AutomatedTesting/Gem/PythonTests/scripting/TestSuite_Active.py
+++ b/AutomatedTesting/Gem/PythonTests/scripting/TestSuite_Active.py
@@ -183,6 +183,27 @@ class TestAutomation(TestAutomationBase):
from . import ScriptEvents_SendReceiveSuccessfully as test_module
self._run_test(request, workspace, editor, test_module)
+ @pytest.mark.parametrize("level", ["tmp_level"])
+ def test_ScriptEvents_ReturnSetType_Successfully(self, request, workspace, editor, launcher_platform, project, level):
+ def teardown():
+ file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True)
+ request.addfinalizer(teardown)
+ file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True)
+ from . import ScriptEvents_ReturnSetType_Successfully as test_module
+ self._run_test(request, workspace, editor, test_module)
+
+ def test_NodeCategory_ExpandOnClick(self, request, workspace, editor, launcher_platform):
+ from . import NodeCategory_ExpandOnClick as test_module
+ self._run_test(request, workspace, editor, test_module)
+
+ def test_NodePalette_SearchText_Deletion(self, request, workspace, editor, launcher_platform):
+ from . import NodePalette_SearchText_Deletion as test_module
+ self._run_test(request, workspace, editor, test_module)
+
+ def test_VariableManager_UnpinVariableType_Works(self, request, workspace, editor, launcher_platform):
+ from . import VariableManager_UnpinVariableType_Works as test_module
+ self._run_test(request, workspace, editor, test_module)
+
# NOTE: We had to use hydra_test_utils.py, as TestAutomationBase run_test method
# fails because of pyside_utils import
@pytest.mark.SUITE_periodic
@@ -251,4 +272,4 @@ class TestScriptCanvasTests(object):
expected_lines,
auto_test_mode=False,
timeout=60,
- )
\ No newline at end of file
+ )
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/Toggle_ScriptCanvasTools.py b/AutomatedTesting/Gem/PythonTests/scripting/Toggle_ScriptCanvasTools.py
index 4024e28277..42cc42de0d 100644
--- a/AutomatedTesting/Gem/PythonTests/scripting/Toggle_ScriptCanvasTools.py
+++ b/AutomatedTesting/Gem/PythonTests/scripting/Toggle_ScriptCanvasTools.py
@@ -13,11 +13,6 @@ Test Case Title: Tools > Node Palette toggles the Node Palette
Tools > Node Inspector toggles the Node Inspector
Tools > Bookmarks toggles the Bookmarks
Tools > Variable Manager toggles the Variable Manager
-
-URLs of the test case: https://testrail.agscollab.com/index.php?/cases/view/92569165
- https://testrail.agscollab.com/index.php?/cases/view/92569167
- https://testrail.agscollab.com/index.php?/cases/view/92569168
- https://testrail.agscollab.com/index.php?/cases/view/92569170
"""
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/UnDockedPane_CloseSCWindow.py b/AutomatedTesting/Gem/PythonTests/scripting/UnDockedPane_CloseSCWindow.py
index 875f28ec95..da33a8ab80 100644
--- a/AutomatedTesting/Gem/PythonTests/scripting/UnDockedPane_CloseSCWindow.py
+++ b/AutomatedTesting/Gem/PythonTests/scripting/UnDockedPane_CloseSCWindow.py
@@ -10,8 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: C1702825 // C1702831
Test Case Title: Undocking // Closing script canvas with the pane floating
-URLs of the test case: https://testrail.agscollab.com/index.php?/cases/view/1702825 &
- https://testrail.agscollab.com/index.php?/cases/view/1702831
"""
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/VariableManager_CreateDeleteVars.py b/AutomatedTesting/Gem/PythonTests/scripting/VariableManager_CreateDeleteVars.py
index 6facc324d4..8b5c78fa87 100644
--- a/AutomatedTesting/Gem/PythonTests/scripting/VariableManager_CreateDeleteVars.py
+++ b/AutomatedTesting/Gem/PythonTests/scripting/VariableManager_CreateDeleteVars.py
@@ -10,10 +10,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92564789
Test Case Title: Each Variable type can be created
-URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92564789
Test case ID: T92568873
Test Case Title: Each Variable type can be deleted
-URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92568873
"""
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/VariableManager_UnpinVariableType_Works.py b/AutomatedTesting/Gem/PythonTests/scripting/VariableManager_UnpinVariableType_Works.py
new file mode 100644
index 0000000000..7076f60385
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/scripting/VariableManager_UnpinVariableType_Works.py
@@ -0,0 +1,121 @@
+"""
+All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+its licensors.
+For complete copyright and license terms please see the LICENSE at the root of this
+distribution (the "License"). All use of this software is governed by the License,
+or, if provided, by the license below or the license accompanying this file. Do not
+remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+"""
+
+
+# fmt: off
+class Tests():
+ variable_manager_opened = ("VariableManager is opened successfully", "Failed to open VariableManager")
+ variable_pinned = ("Variable is pinned", "Variable is not pinned, But it should be unpinned")
+ variable_unpinned = ("Variable is unpinned", "Variable is not unpinned, But it should be pinned")
+ variable_unpinned_after_reopen = ("Variable is unpinned after reopening create variable menu", "Variable is not unpinned after reopening create variable menu")
+# fmt: on
+
+
+def VariableManager_UnpinVariableType_Works():
+ """
+ Summary:
+ Unpin variable types in create variable menu.
+ Expected Behavior:
+ The variable unpinned in create variable menu remains unpinned after reopening create variable menu.
+ Test Steps:
+ 1) Open Script Canvas window (Tools > Script Canvas)
+ 2) Get the SC window object
+ 3) Open Variable Manager in Script Canvas window
+ 4) Create new graph
+ 5) Click on the Create Variable button in the Variable Manager
+ 6) Unpin Boolean by clicking the "Pin" icon on its left side
+ 7) Close and Reopen Create Variable menu and make sure Boolean is unpinned after reopening Create Variable menu
+ 8) Restore default layout and close SC window
+ Note:
+ - This test file must be called from the Open 3D Engine Editor command terminal
+ - Any passed and failed tests are written to the Editor.log file.
+ Parsing the file or running a log_monitor are required to observe the test results.
+ :return: None
+ """
+
+ from PySide2 import QtWidgets
+ import azlmbr.legacy.general as general
+
+ import pyside_utils
+ from utils import TestHelper as helper
+ from utils import Report
+ from PySide2.QtCore import Qt
+
+ GENERAL_WAIT = 1.0 # seconds
+
+ def find_pane(window, pane_name):
+ return window.findChild(QtWidgets.QDockWidget, pane_name)
+
+ def click_menu_option(window, option_text):
+ action = pyside_utils.find_child_by_pattern(window, {"text": option_text, "type": QtWidgets.QAction})
+ action.trigger()
+
+ # 1) Open Script Canvas window (Tools > Script Canvas)
+ general.idle_enable(True)
+ general.open_pane("Script Canvas")
+ helper.wait_for_condition(lambda: general.is_pane_visible("Script Canvas"), 6.0)
+
+ # 2) Get the SC window object
+ editor_window = pyside_utils.get_editor_main_window()
+ sc = editor_window.findChild(QtWidgets.QDockWidget, "Script Canvas")
+ sc_main = sc.findChild(QtWidgets.QMainWindow)
+
+ # 3) Open Variable Manager in Script Canvas window
+ pane = find_pane(sc, "VariableManager")
+ if not pane.isVisible():
+ click_menu_option(sc, "Variable Manager")
+ pane = find_pane(sc, "VariableManager")
+ Report.result(Tests.variable_manager_opened, pane.isVisible())
+
+ # 4) Create new graph
+ create_new_graph = pyside_utils.find_child_by_pattern(
+ sc_main, {"objectName": "action_New_Script", "type": QtWidgets.QAction}
+ )
+ create_new_graph.trigger()
+
+ # 5) Click on the Create Variable button in the Variable Manager
+ variable_manager = sc_main.findChild(QtWidgets.QDockWidget, "VariableManager")
+ button = variable_manager.findChild(QtWidgets.QPushButton, "addButton")
+ button.click()
+
+ # 6) Unpin Boolean by clicking the "Pin" icon on its left side
+ table_view = variable_manager.findChild(QtWidgets.QTableView, "variablePalette")
+ model_index = pyside_utils.find_child_by_pattern(table_view, "Boolean")
+ # Make sure Boolean is pinned
+ is_boolean = model_index.siblingAtColumn(0)
+ result = helper.wait_for_condition(lambda: is_boolean.data(Qt.DecorationRole) is not None, GENERAL_WAIT)
+ Report.result(Tests.variable_pinned, result)
+ # Unpin Boolean and make sure Boolean is unpinned.
+ pyside_utils.item_view_index_mouse_click(table_view, is_boolean)
+ result = helper.wait_for_condition(lambda: is_boolean.data(Qt.DecorationRole) is None, GENERAL_WAIT)
+ Report.result(Tests.variable_unpinned, result)
+
+ # 7) Close and Reopen Create Variable menu and make sure Boolean is unpinned after reopening Create Variable menu
+ button.click()
+ button.click()
+ model_index = pyside_utils.find_child_by_pattern(table_view, "Boolean")
+ result = helper.wait_for_condition(
+ lambda: model_index.siblingAtColumn(0).data(Qt.DecorationRole) is None, GENERAL_WAIT
+ )
+ Report.result(Tests.variable_unpinned_after_reopen, result)
+
+ # 8) Restore default layout and close SC window
+ click_menu_option(sc, "Restore Default Layout")
+ general.close_pane("Script Canvas")
+
+
+if __name__ == "__main__":
+ import ImportPathHelper as imports
+
+ imports.init()
+
+ from utils import Report
+
+ Report.start_test(VariableManager_UnpinVariableType_Works)
diff --git a/AutomatedTesting/ScriptCanvas/T92569006_ScriptCanvas.scriptcanvas b/AutomatedTesting/ScriptCanvas/T92569006_ScriptCanvas.scriptcanvas
new file mode 100644
index 0000000000..626ee29d96
--- /dev/null
+++ b/AutomatedTesting/ScriptCanvas/T92569006_ScriptCanvas.scriptcanvas
@@ -0,0 +1,1952 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/AutomatedTesting/TestAssets/T92569006.scriptevents b/AutomatedTesting/TestAssets/T92569006.scriptevents
new file mode 100644
index 0000000000..518b1b5733
--- /dev/null
+++ b/AutomatedTesting/TestAssets/T92569006.scriptevents
@@ -0,0 +1,126 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ae8a7a05f8..2ee08a8d16 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,13 +25,37 @@ include(cmake/LySet.cmake)
include(cmake/Version.cmake)
include(cmake/OutputDirectory.cmake)
+# Set the engine_path and engine_json
+set(o3de_engine_path ${CMAKE_CURRENT_LIST_DIR})
+set(o3de_engine_json ${o3de_engine_path}/engine.json)
+
if(NOT PROJECT_NAME)
project(O3DE
LANGUAGES C CXX
VERSION ${LY_VERSION_STRING}
)
+
+ # o3de manifest
+ include(cmake/o3de_manifest.cmake)
+endif()
+
+################################################################################
+# Resolve this engines name and restricted path
+################################################################################
+o3de_engine_name(${o3de_engine_json} o3de_engine_name)
+o3de_restricted_path(${o3de_engine_json} o3de_engine_restricted_path)
+message(STATUS "O3DE Engine Name: ${o3de_engine_name}")
+message(STATUS "O3DE Engine Path: ${o3de_engine_path}")
+if(o3de_engine_restricted_path)
+ message(STATUS "O3DE Engine Restricted Path: ${o3de_engine_restricted_path}")
endif()
+# add the engines cmake folder to the CMAKE_MODULE_PATH
+list(APPEND CMAKE_MODULE_PATH "${o3de_engine_path}/cmake")
+
+################################################################################
+# Initialize
+################################################################################
include(cmake/GeneralSettings.cmake)
include(cmake/FileUtil.cmake)
include(cmake/PAL.cmake)
@@ -60,20 +84,19 @@ include(cmake/Projects.cmake)
if(NOT INSTALLED_ENGINE)
# Add the rest of the targets
add_subdirectory(Code)
- add_subdirectory(Gems)
else()
ly_find_o3de_packages()
endif()
+# Add external subdirectories listed in the manifest
+list(APPEND LY_EXTERNAL_SUBDIRS ${o3de_engine_external_subdirectories})
+
set(enabled_platforms
${PAL_PLATFORM_NAME}
${LY_PAL_TOOLS_ENABLED})
-foreach(restricted_platform ${PAL_RESTRICTED_PLATFORMS})
- if(restricted_platform IN_LIST enabled_platforms)
- add_subdirectory(restricted/${restricted_platform})
- endif()
-endforeach()
+# Add any engine restricted platforms as external subdirs
+o3de_add_engine_restricted_platform_external_subdirs()
if(NOT INSTALLED_ENGINE)
add_subdirectory(scripts)
diff --git a/Code/CryEngine/CryCommon/AnimTime.h b/Code/CryEngine/CryCommon/AnimTime.h
deleted file mode 100644
index 8bd0b9d442..0000000000
--- a/Code/CryEngine/CryCommon/AnimTime.h
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-#ifndef __animtime_h__
-#define __animtime_h__
-
-#include
-#include
-#include
-
-struct SAnimTime
-{
- static const uint numTicksPerSecond = 6000;
-
- // List of possible frame rates (dividers of 6000). Most commonly used ones first.
- enum EFrameRate
- {
- // Common
- eFrameRate_30fps, eFrameRate_60fps, eFrameRate_120fps,
-
- // Possible
- eFrameRate_10fps, eFrameRate_12fps, eFrameRate_15fps, eFrameRate_24fps,
- eFrameRate_25fps, eFrameRate_40fps, eFrameRate_48fps, eFrameRate_50fps,
- eFrameRate_75fps, eFrameRate_80fps, eFrameRate_100fps, eFrameRate_125fps,
- eFrameRate_150fps, eFrameRate_200fps, eFrameRate_240fps, eFrameRate_250fps,
- eFrameRate_300fps, eFrameRate_375fps, eFrameRate_400fps, eFrameRate_500fps,
- eFrameRate_600fps, eFrameRate_750fps, eFrameRate_1000fps, eFrameRate_1200fps,
- eFrameRate_1500fps, eFrameRate_2000fps, eFrameRate_3000fps, eFrameRate_6000fps,
-
- eFrameRate_Num
- };
-
- SAnimTime()
- : m_ticks(0) {}
- explicit SAnimTime(int32 ticks)
- : m_ticks(ticks) {}
- explicit SAnimTime(float time)
- : m_ticks(aznumeric_caster(std::lround(static_cast(time) * numTicksPerSecond))) {}
-
- static uint GetFrameRateValue(EFrameRate frameRate)
- {
- const uint frameRateValues[eFrameRate_Num] =
- {
- // Common
- 30, 60, 120,
-
- // Possible
- 10, 12, 15, 24, 25, 40, 48, 50, 75, 80, 100, 125,
- 150, 200, 240, 250, 300, 375, 400, 500, 600, 750,
- 1000, 1200, 1500, 2000, 3000, 6000
- };
-
- return frameRateValues[frameRate];
- }
-
- static const char* GetFrameRateName(EFrameRate frameRate)
- {
- const char* frameRateNames[eFrameRate_Num] =
- {
- // Common
- "30 fps", "60 fps", "120 fps",
-
- // Possible
- "10 fps", "12 fps", "15 fps", "24 fps",
- "25 fps", "40 fps", "48 fps", "50 fps",
- "75 fps", "80 fps", "100 fps", "125 fps",
- "150 fps", "200 fps", "240 fps", "250 fps",
- "300 fps", "375 fps", "400 fps", "500 fps",
- "600 fps", "750 fps", "1000 fps", "1200 fps",
- "1500 fps", "2000 fps", "3000 fps", "6000 fps"
- };
-
- return frameRateNames[frameRate];
- }
-
- float ToFloat() const { return static_cast(m_ticks) / numTicksPerSecond; }
-
- void Serialize(Serialization::IArchive& ar)
- {
- ar(m_ticks, "ticks", "Ticks");
- }
-
- // Helper to serialize from ticks or old float time
- void Serialize(XmlNodeRef keyNode, bool bLoading, const char* pName, const char* pLegacyName)
- {
- if (bLoading)
- {
- int32 ticks;
- if (!keyNode->getAttr(pName, ticks))
- {
- // Backwards compatibility
- float time = 0.0f;
- keyNode->getAttr(pLegacyName, time);
- *this = SAnimTime(time);
- }
- else
- {
- m_ticks = ticks;
- }
- }
- else if (m_ticks > 0)
- {
- keyNode->setAttr(pName, m_ticks);
- }
- }
-
- int32 GetTicks() const { return m_ticks; }
-
- static SAnimTime Min() { SAnimTime minTime; minTime.m_ticks = std::numeric_limits::lowest(); return minTime; }
- static SAnimTime Max() { SAnimTime maxTime; maxTime.m_ticks = (std::numeric_limits::max)(); return maxTime; }
-
- SAnimTime operator-() const { return SAnimTime(-m_ticks); }
- SAnimTime operator-(SAnimTime r) const { SAnimTime temp = *this; temp.m_ticks -= r.m_ticks; return temp; }
- SAnimTime operator+(SAnimTime r) const { SAnimTime temp = *this; temp.m_ticks += r.m_ticks; return temp; }
- SAnimTime operator*(SAnimTime r) const { SAnimTime temp = *this; temp.m_ticks *= r.m_ticks; return temp; }
- SAnimTime operator/(SAnimTime r) const { SAnimTime temp; temp.m_ticks = static_cast((static_cast(m_ticks) * numTicksPerSecond) / r.m_ticks); return temp; }
- SAnimTime operator%(SAnimTime r) const { SAnimTime temp = *this; temp.m_ticks %= r.m_ticks; return temp; }
- SAnimTime operator*(float r) const { SAnimTime temp; temp.m_ticks = aznumeric_caster(std::lround(static_cast(m_ticks) * r)); return temp; }
- SAnimTime operator/(float r) const { SAnimTime temp; temp.m_ticks = aznumeric_caster(std::lround(static_cast(m_ticks) / r)); return temp; }
- SAnimTime& operator+=(SAnimTime r) { *this = *this + r; return *this; }
- SAnimTime& operator-=(SAnimTime r) { *this = *this - r; return *this; }
- SAnimTime& operator*=(SAnimTime r) { *this = *this * r; return *this; }
- SAnimTime& operator/=(SAnimTime r) { *this = *this / r; return *this; }
- SAnimTime& operator%=(SAnimTime r) { *this = *this % r; return *this; }
- SAnimTime& operator*=(float r) { *this = *this * r; return *this; }
- SAnimTime& operator/=(float r) { *this = *this / r; return *this; }
-
- bool operator<(SAnimTime r) const { return m_ticks < r.m_ticks; }
- bool operator<=(SAnimTime r) const { return m_ticks <= r.m_ticks; }
- bool operator>(SAnimTime r) const { return m_ticks > r.m_ticks; }
- bool operator>=(SAnimTime r) const { return m_ticks >= r.m_ticks; }
- bool operator==(SAnimTime r) const { return m_ticks == r.m_ticks; }
- bool operator!=(SAnimTime r) const { return m_ticks != r.m_ticks; }
-
- // Snap to nearest multiple of given frame rate
- SAnimTime SnapToNearest(const EFrameRate frameRate)
- {
- const int sign = sgn(m_ticks);
- const int32 absTicks = abs(m_ticks);
-
- const int framesMod = numTicksPerSecond / GetFrameRateValue(frameRate);
- const int32 remainder = absTicks % framesMod;
- const bool bNextMultiple = remainder >= (framesMod / 2);
- return SAnimTime(sign * ((absTicks - remainder) + (bNextMultiple ? framesMod : 0)));
- }
-
-private:
- int32 m_ticks;
-
- friend bool Serialize(Serialization::IArchive& ar, SAnimTime& animTime, const char* name, const char* label);
-};
-
-inline bool Serialize(Serialization::IArchive& ar, SAnimTime& animTime, const char* name, const char* label)
-{
- return ar(animTime.m_ticks, name, label);
-}
-
-inline SAnimTime abs(SAnimTime time)
-{
- return (time >= SAnimTime(0)) ? time : -time;
-}
-
-#endif
diff --git a/Code/CryEngine/CryCommon/Bezier.h b/Code/CryEngine/CryCommon/Bezier.h
deleted file mode 100644
index fa1cf60d49..0000000000
--- a/Code/CryEngine/CryCommon/Bezier.h
+++ /dev/null
@@ -1,321 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-#ifndef __BEZIER_H__
-#define __BEZIER_H__
-
-#include
-#include
-#include
-
-struct SBezierControlPoint
-{
- SBezierControlPoint()
- : m_value(0.0f)
- , m_inTangent(ZERO)
- , m_outTangent(ZERO)
- , m_inTangentType(eTangentType_Auto)
- , m_outTangentType(eTangentType_Auto)
- , m_bBreakTangents(false)
- {
- }
-
- enum ETangentType
- {
- eTangentType_Custom,
- eTangentType_Auto,
- eTangentType_Zero,
- eTangentType_Step,
- eTangentType_Linear,
- };
-
- void Serialize(Serialization::IArchive& ar)
- {
- ar(m_value, "value", "Value");
-
- if (ar.IsOutput())
- {
- bool breakTangents = m_bBreakTangents;
- ar(breakTangents, "breakTangents", "Break Tangents");
- }
- else
- {
- bool breakTangents = false;
- ar(breakTangents, "breakTangents", "Break Tangents");
- m_bBreakTangents = breakTangents;
- }
-
- if (ar.IsOutput())
- {
- ETangentType inTangentType = m_inTangentType;
- ar(inTangentType, "inTangentType", "Incoming tangent type");
- }
- else
- {
- ETangentType inTangentType = eTangentType_Auto;
- ar(inTangentType, "inTangentType", "Incoming tangent type");
- m_inTangentType = inTangentType;
- }
-
- ar(m_inTangent, "inTangent", (m_inTangentType == eTangentType_Custom) ? "Incoming Tangent" : NULL);
-
- if (ar.IsOutput())
- {
- ETangentType outTangentType = m_outTangentType;
- ar(outTangentType, "outTangentType", "Outgoing tangent type");
- }
- else
- {
- ETangentType outTangentType = eTangentType_Auto;
- ar(outTangentType, "outTangentType", "Outgoing tangent type");
- m_outTangentType = outTangentType;
- }
-
- ar(m_outTangent, "outTangent", (m_outTangentType == eTangentType_Custom) ? "Outgoing Tangent" : NULL);
- }
-
- float m_value;
-
- // For 1D Bezier only the Y component is used
- Vec2 m_inTangent;
- Vec2 m_outTangent;
-
- ETangentType m_inTangentType : 4;
- ETangentType m_outTangentType : 4;
- bool m_bBreakTangents : 1;
-};
-
-struct SBezierKey
-{
- SBezierKey()
- : m_time(0) {}
-
- void Serialize(Serialization::IArchive& ar)
- {
- ar(m_time, "time", "Time");
- ar(m_controlPoint, "controlPoint", "Control Point");
- }
-
- SAnimTime m_time;
- SBezierControlPoint m_controlPoint;
-};
-
-namespace Bezier
-{
- inline float Evaluate(float t, float p0, float p1, float p2, float p3)
- {
- const float a = 1 - t;
- const float aSq = a * a;
- const float tSq = t * t;
- return (aSq * a * p0) + (3.0f * aSq * t * p1) + (3.0f * a * tSq * p2) + (tSq * t * p3);
- }
-
- inline float EvaluateDeriv(float t, float p0, float p1, float p2, float p3)
- {
- const float a = 1 - t;
- const float ta = t * a;
- const float aSq = a * a;
- const float tSq = t * t;
- return 3.0f * ((-p2 * tSq) + (p3 * tSq) - (p0 * aSq) + (p1 * aSq) + 2.0f * ((-p1 * ta) + (p2 * ta)));
- }
-
- inline float EvaluateX(const float t, const float duration, const SBezierControlPoint& start, const SBezierControlPoint& end)
- {
- const float p0 = 0.0f;
- const float p1 = p0 + start.m_outTangent.x;
- const float p3 = duration;
- const float p2 = p3 + end.m_inTangent.x;
- return Evaluate(t, p0, p1, p2, p3);
- }
-
- inline float EvaluateY(const float t, const SBezierControlPoint& start, const SBezierControlPoint& end)
- {
- const float p0 = start.m_value;
- const float p1 = p0 + start.m_outTangent.y;
- const float p3 = end.m_value;
- const float p2 = p3 + end.m_inTangent.y;
- return Evaluate(t, p0, p1, p2, p3);
- }
-
- // Duration = (time at end key) - (time at start key)
- inline float EvaluateDerivX(const float t, const float duration, const SBezierControlPoint& start, const SBezierControlPoint& end)
- {
- const float p0 = 0.0f;
- const float p1 = p0 + start.m_outTangent.x;
- const float p3 = duration;
- const float p2 = p3 + end.m_inTangent.x;
- return EvaluateDeriv(t, p0, p1, p2, p3);
- }
-
- inline float EvaluateDerivY(const float t, const SBezierControlPoint& start, const SBezierControlPoint& end)
- {
- const float p0 = start.m_value;
- const float p1 = p0 + start.m_outTangent.y;
- const float p3 = end.m_value;
- const float p2 = p3 + end.m_inTangent.y;
- return EvaluateDeriv(t, p0, p1, p2, p3);
- }
-
- // Find interpolation factor where 2D bezier curve has the given x value. Works only for curves where x is monotonically increasing.
- // The passed x must be in range [0, duration]. Uses the Newton-Raphson root finding method. Usually takes 2 or 3 iterations.
- //
- // Note: This is for "1D" 2D bezier curves as used in TrackView. The curves are restricted by the curve editor to be monotonically increasing.
- //
- inline float InterpolationFactorFromX(const float x, const float duration, const SBezierControlPoint& start, const SBezierControlPoint& end)
- {
- float t = (x / duration);
-
- const float epsilon = 0.00001f;
- const uint maxSteps = 10;
-
- for (uint i = 0; i < maxSteps; ++i)
- {
- const float currentX = EvaluateX(t, duration, start, end) - x;
- if (fabs(currentX) <= epsilon)
- {
- break;
- }
-
- const float currentXDeriv = EvaluateDerivX(t, duration, start, end);
- t -= currentX / currentXDeriv;
- }
-
- return t;
- }
-
- inline SBezierControlPoint CalculateInTangent(
- float time, const SBezierControlPoint& point,
- float leftTime, const SBezierControlPoint* pLeftPoint,
- float rightTime, const SBezierControlPoint* pRightPoint)
- {
- SBezierControlPoint newPoint = point;
-
- // In tangent X can never be positive
- newPoint.m_inTangent.x = std::min(point.m_inTangent.x, 0.0f);
-
- if (pLeftPoint)
- {
- switch (point.m_inTangentType)
- {
- case SBezierControlPoint::eTangentType_Custom:
- {
- // Need to clamp tangent if it is reaching over last point
- const float deltaTime = time - leftTime;
- if (deltaTime < -newPoint.m_inTangent.x)
- {
- if (newPoint.m_inTangent.x == 0)
- {
- newPoint.m_inTangent = Vec2(ZERO);
- }
- else
- {
- float scaleFactor = deltaTime / -newPoint.m_inTangent.x;
- newPoint.m_inTangent.x = -deltaTime;
- newPoint.m_inTangent.y *= scaleFactor;
- }
- }
- }
- break;
- case SBezierControlPoint::eTangentType_Zero:
- // Fall through. Zero for y is same as Auto, x is set to 0.0f
- case SBezierControlPoint::eTangentType_Auto:
- {
- const SBezierControlPoint& rightPoint = pRightPoint ? *pRightPoint : point;
- const float deltaTime = (pRightPoint ? rightTime : time) - leftTime;
- if (deltaTime > 0.0f)
- {
- const float ratio = (time - leftTime) / deltaTime;
- const float deltaValue = rightPoint.m_value - pLeftPoint->m_value;
- const bool bIsZeroTangent = (point.m_inTangentType == SBezierControlPoint::eTangentType_Zero);
- newPoint.m_inTangent = Vec2(-(deltaTime * ratio) / 3.0f, bIsZeroTangent ? 0.0f : -(deltaValue * ratio) / 3.0f);
- }
- else
- {
- newPoint.m_inTangent = Vec2(ZERO);
- }
- }
- break;
- case SBezierControlPoint::eTangentType_Linear:
- newPoint.m_inTangent = Vec2((leftTime - time) / 3.0f,
- (pLeftPoint->m_value - point.m_value) / 3.0f);
- break;
- }
- }
-
- return newPoint;
- }
-
- inline SBezierControlPoint CalculateOutTangent(
- float time, const SBezierControlPoint& point,
- float leftTime, const SBezierControlPoint* pLeftPoint,
- float rightTime, const SBezierControlPoint* pRightPoint)
- {
- SBezierControlPoint newPoint = point;
-
- // Out tangent X can never be negative
- newPoint.m_outTangent.x = std::max(point.m_outTangent.x, 0.0f);
-
- if (pRightPoint)
- {
- switch (point.m_outTangentType)
- {
- case SBezierControlPoint::eTangentType_Custom:
- {
- // Need to clamp tangent if it is reaching over next point
- const float deltaTime = rightTime - time;
- if (deltaTime < newPoint.m_outTangent.x)
- {
- if (newPoint.m_outTangent.x == 0)
- {
- newPoint.m_outTangent = Vec2(ZERO);
- }
- else
- {
- float scaleFactor = deltaTime / newPoint.m_outTangent.x;
- newPoint.m_outTangent.x = deltaTime;
- newPoint.m_outTangent.y *= scaleFactor;
- }
- }
- }
- break;
- case SBezierControlPoint::eTangentType_Zero:
- // Fall through. Zero for y is same as Auto, x is set to 0.0f
- case SBezierControlPoint::eTangentType_Auto:
- {
- const SBezierControlPoint& leftPoint = pLeftPoint ? *pLeftPoint : point;
- const float deltaTime = rightTime - (pLeftPoint ? leftTime : time);
- if (deltaTime > 0.0f)
- {
- const float ratio = (rightTime - time) / deltaTime;
- const float deltaValue = pRightPoint->m_value - leftPoint.m_value;
- const bool bIsZeroTangent = (point.m_outTangentType == SBezierControlPoint::eTangentType_Zero);
- newPoint.m_outTangent = Vec2((deltaTime * ratio) / 3.0f, bIsZeroTangent ? 0.0f : (deltaValue * ratio) / 3.0f);
- }
- else
- {
- newPoint.m_outTangent = Vec2(ZERO);
- }
- }
- break;
- case SBezierControlPoint::eTangentType_Linear:
- newPoint.m_outTangent = Vec2((rightTime - time) / 3.0f,
- (pRightPoint->m_value - point.m_value) / 3.0f);
- break;
- }
- }
-
- return newPoint;
- }
-}
-
-#endif
diff --git a/Code/CryEngine/CryCommon/CREBaseCloud.h b/Code/CryEngine/CryCommon/CREBaseCloud.h
deleted file mode 100644
index b7a95d88d4..0000000000
--- a/Code/CryEngine/CryCommon/CREBaseCloud.h
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-#ifndef __CREBASECLOUD_H__
-#define __CREBASECLOUD_H__
-
-//================================================================================
-
-class SCloudParticle
-{
-public:
- inline SCloudParticle();
- inline SCloudParticle(const Vec3& vPos, float fRadius, const ColorF& baseColor, float fTransparency = 0);
- inline SCloudParticle(const Vec3& vPos, float fRadiusX, float fRadiusY, float fRotMin, float fRotMax, Vec2 vUV[]);
- inline ~SCloudParticle();
-
- float GetRadiusX() const { return m_fSize[0]; }
- float GetRadiusY() const { return m_fSize[1]; }
- float GetTransparency() const { return m_fTransparency; }
- const Vec3& GetPosition() const { return m_vPosition; }
- const ColorF& GetBaseColor() const { return m_vBaseColor; }
- uint32 GetNumLitColors() const { return m_vLitColors.size(); }
- inline const ColorF GetLitColor(unsigned int index) const;
- float GetSquareSortDistance() const { return m_fSquareSortDistance; }
-
- //! Sets the radius of the particle.
- void SetRadiusX(float rad) { m_fSize[0] = rad; }
- void SetRadiusY(float rad) { m_fSize[1] = rad; }
- void SetTransparency(float trans) { m_fTransparency = trans; }
- void SetPosition(const Vec3& pos) { m_vPosition = pos; }
- void SetBaseColor(const ColorF& col) { m_vBaseColor = col; }
- void AddLitColor(const ColorF& col) { m_vLitColors.push_back(col); }
- void ClearLitColors() { m_vLitColors.clear(); }
- void SetSquareSortDistance(float fSquareDistance) { m_fSquareSortDistance = fSquareDistance; }
-
- bool operator<(const SCloudParticle& p) const
- {
- return (m_fSquareSortDistance < p.m_fSquareSortDistance);
- }
-
- bool operator>(const SCloudParticle& p) const
- {
- return (m_fSquareSortDistance > p.m_fSquareSortDistance);
- }
-
-protected:
- float m_fTransparency;
- Vec3 m_vPosition;
- float m_fSize[2];
- float m_fRotMin;
- float m_fRotMax;
- ColorF m_vBaseColor;
- TArray m_vLitColors;
- Vec3 m_vEye;
-
- // for sorting particles during shading
- float m_fSquareSortDistance;
-public:
- Vec2 m_vUV[2];
-};
-
-inline SCloudParticle::SCloudParticle()
-{
- m_fSize[0] = 0;
- m_fTransparency = 0;
- m_vPosition = Vec3(0, 0, 0);
- m_vBaseColor = Col_Black;
- m_vEye = Vec3(0, 0, 0);
- m_fSquareSortDistance = 0;
-
- m_vLitColors.clear();
-}
-
-inline SCloudParticle::SCloudParticle(const Vec3& pos, float fRadius, const ColorF& baseColor, float fTransparency)
-{
- m_fSize[0] = fRadius;
- m_fSize[1] = fRadius;
- m_fTransparency = fTransparency;
- m_vPosition = pos;
- m_vBaseColor = baseColor;
- m_vUV[0] = Vec2(0, 0);
- m_vUV[1] = Vec2(1, 1);
-
- m_fRotMin = 0;
- m_fRotMax = 0;
- m_vEye = Vec3(0, 0, 0);
- m_fSquareSortDistance = 0;
-
- m_vLitColors.clear();
-}
-
-inline SCloudParticle::SCloudParticle(const Vec3& vPos, float fRadiusX, float fRadiusY, float fRotMin, float fRotMax, Vec2 vUV[2])
-{
- m_fSize[0] = fRadiusX;
- m_fSize[1] = fRadiusY;
- m_vPosition = vPos;
- m_vBaseColor = Col_White;
- m_vUV[0] = vUV[0];
- m_vUV[1] = vUV[1];
- m_fRotMin = fRotMin;
- m_fRotMax = fRotMax;
-
- m_fTransparency = 1.0f;
- m_vEye = Vec3(0, 0, 0);
- m_fSquareSortDistance = 0;
-
- m_vLitColors.clear();
-}
-
-inline SCloudParticle::~SCloudParticle()
-{
- m_vLitColors.clear();
-}
-
-inline const ColorF SCloudParticle::GetLitColor(unsigned int index) const
-{
- if (index <= m_vLitColors.size())
- {
- return m_vLitColors[index];
- }
- else
- {
- return Col_Black;
- }
-}
-
-//===========================================================================
-class CREBaseCloud
- : public CRendElementBase
-{
- friend class CRECloud;
-
-public:
- CREBaseCloud()
- : CRendElementBase()
- {
- mfSetType(eDATA_Cloud);
- mfUpdateFlags(FCEF_TRANSFORM);
- }
- virtual void SetParticles(SCloudParticle* pParticles, int nNumParticles) = 0;
-
- virtual void GetMemoryUsage(ICrySizer* pSizer) const
- {
- pSizer->AddObject(this, sizeof(*this));
- }
-};
-
-#endif // __CREBASECLOUD_H__
diff --git a/Code/CryEngine/CryCommon/CREFogVolume.h b/Code/CryEngine/CryCommon/CREFogVolume.h
deleted file mode 100644
index 83a024d15e..0000000000
--- a/Code/CryEngine/CryCommon/CREFogVolume.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-#ifndef _CREFOGVOLUME_
-#define _CREFOGVOLUME_
-
-#pragma once
-
-#include "VertexFormats.h"
-
-
-struct IFogVolumeRenderNode;
-
-
-class CREFogVolume
- : public CRendElementBase
-{
-public:
- CREFogVolume();
-
- virtual ~CREFogVolume();
- virtual void mfPrepare(bool bCheckOverflow);
- virtual bool mfDraw(CShader* ef, SShaderPass* sfm);
-
- virtual void GetMemoryUsage(ICrySizer* pSizer) const
- {
- pSizer->AddObject(this, sizeof(*this));
- }
-
- Vec3 m_center;
- uint32 m_viewerInsideVolume : 1;
- uint32 m_affectsThisAreaOnly : 1;
- uint32 m_stencilRef : 8;
- uint32 m_volumeType : 1;
- uint32 m_reserved : 21;
- AABB m_localAABB;
- Matrix34 m_matWSInv;
- float m_globalDensity;
- float m_densityOffset;
- float m_nearCutoff;
- Vec2 m_softEdgesLerp;
- ColorF m_fogColor; // color already combined with fHDRDynamic
- Vec3 m_heightFallOffDirScaled;
- Vec3 m_heightFallOffBasePoint;
- Vec3 m_eyePosInWS;
- Vec3 m_eyePosInOS;
- Vec3 m_rampParams;
- Vec3 m_windOffset;
- float m_noiseScale;
- Vec3 m_noiseFreq;
- float m_noiseOffset;
- float m_noiseElapsedTime;
- Vec3 m_scale;
-};
-
-
-#endif // #ifndef _CREFOGVOLUME_
diff --git a/Code/CryEngine/CryCommon/CREGameEffect.h b/Code/CryEngine/CryCommon/CREGameEffect.h
deleted file mode 100644
index 17e68813ed..0000000000
--- a/Code/CryEngine/CryCommon/CREGameEffect.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-#ifndef _CREGameEffect_
-#define _CREGameEffect_
-
-#pragma once
-
-//==================================================================================================
-// Name: IREGameEffect
-// Desc: Interface for game effect render elements, designed to be instantiated in game code, and
-// called from the CREGameEffect within the engine. This then allows render elements
-// to be created in game code as well as in the engine.
-// Author: James Chilvers
-//==================================================================================================
-struct IREGameEffect
-{
- virtual ~IREGameEffect(){}
-
- virtual void mfPrepare(bool bCheckOverflow) = 0;
- virtual bool mfDraw(CShader* ef, SShaderPass* sfm, CRenderObject* renderObj) = 0;
-};//------------------------------------------------------------------------------------------------
-
-//==================================================================================================
-// Name: CREGameEffect
-// Desc: Render element that uses the IREGameEffect interface for its functionality
-// Author: James Chilvers
-//==================================================================================================
-class CREGameEffect
- : public CRendElementBase
-{
-public:
-
- CREGameEffect();
- ~CREGameEffect();
-
- // CRendElementBase interface
- void mfPrepare(bool bCheckOverflow);
- bool mfDraw(CShader* ef, SShaderPass* sfm);
-
- // CREGameEffect interface
- inline void SetPrivateImplementation(IREGameEffect* pImpl) { m_pImpl = pImpl; }
- inline IREGameEffect* GetPrivateImplementation() const { return m_pImpl; }
-
- virtual void GetMemoryUsage(ICrySizer* pSizer) const
- {
- pSizer->AddObject(this, sizeof(*this));
- }
-private:
-
- IREGameEffect* m_pImpl; // Implementation of of render element
-};//------------------------------------------------------------------------------------------------
-
-#endif // #ifndef _CREGameEffect_
diff --git a/Code/CryEngine/CryCommon/CREGeomCache.h b/Code/CryEngine/CryCommon/CREGeomCache.h
deleted file mode 100644
index 6911b8486e..0000000000
--- a/Code/CryEngine/CryCommon/CREGeomCache.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-// Description : Backend part of geometry cache rendering
-
-#ifndef CRYINCLUDE_CRYCOMMON_CREGEOMCACHE_H
-#define CRYINCLUDE_CRYCOMMON_CREGEOMCACHE_H
-#pragma once
-
-#if defined(USE_GEOM_CACHES)
-
-#include
-#include
-
-class CREGeomCache
- : public CRendElementBase
-{
-public:
- struct SMeshInstance
- {
- AABB m_aabb;
- Matrix34 m_matrix;
- Matrix34 m_prevMatrix;
- };
-
- struct SMeshRenderData
- {
- DynArray m_instances;
- _smart_ptr m_pRenderMesh;
- };
-
- struct UpdateList
- {
- CryCriticalSection m_mutex;
- AZStd::vector> m_geoms;
- };
-
-public:
- CREGeomCache();
- ~CREGeomCache();
-
- bool Update(const int flags, const bool bTesselation);
- static void UpdateModified();
-
- // CRendElementBase interface
- virtual bool mfUpdate(int Flags, bool bTessellation);
- virtual void mfPrepare(bool bCheckOverflow);
- virtual bool mfDraw(CShader* ef, SShaderPass* sfm);
-
- // CREGeomCache interface
- virtual void InitializeRenderElement(const uint numMeshes, _smart_ptr* pMeshes, uint16 materialId);
- virtual void SetupMotionBlur(CRenderObject* pRenderObject, const SRenderingPassInfo& passInfo);
-
- virtual volatile int* SetAsyncUpdateState(int& threadId);
- virtual DynArray* GetMeshFillDataPtr();
- virtual DynArray* GetRenderDataPtr();
- virtual void DisplayFilledBuffer(const int threadId);
-
-
- AZ::Vertex::Format GetVertexFormat() const override;
- bool GetGeometryInfo(SGeometryInfo &streams) override;
-
-private:
- uint16 m_materialId;
- volatile bool m_bUpdateFrame[2];
- volatile int m_transformUpdateState[2];
-
- // We use a double buffered m_meshFillData array for input from the main thread. When data
- // was successfully sent from the main thread it gets copied to m_meshRenderData
- // This simplifies the cases where frame data is missing, e.g. meshFillData is not updated for a frame
- // Note that meshFillData really needs to be double buffered because the copy occurs in render thread
- // so the next main thread could already be touching the data again
- //
- // Note: m_meshRenderData is directly accessed for ray intersections via GetRenderDataPtr.
- // This is safe, because it's only used in editor.
- DynArray m_meshFillData[2];
- DynArray m_meshRenderData;
-
- static StaticInstance sm_updateList[2]; // double buffered update lists
-
- AZ::Vertex::Format m_geomCacheVertexFormat;
-};
-
-#endif
-#endif // CRYINCLUDE_CRYCOMMON_CREGEOMCACHE_H
diff --git a/Code/CryEngine/CryCommon/CREImposter.h b/Code/CryEngine/CryCommon/CREImposter.h
deleted file mode 100644
index 1150212b7d..0000000000
--- a/Code/CryEngine/CryCommon/CREImposter.h
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-#pragma once
-
-#include
-#include "Cry_Camera.h"
-
-//================================================================================
-
-struct SDynTexture2;
-struct SDynTexture;
-class IDynTexture;
-class CameraViewParameters;
-
-struct IImposterRenderElement
-{
- virtual void GetMemoryUsage(ICrySizer* pSizer) const = 0;
- virtual void mfPrepare(bool bCheckOverflow) = 0;
- virtual bool mfDraw(CShader* ef, SShaderPass* sl) = 0;
- virtual const SMinMaxBox& mfGetWorldSpaceBounds() = 0;
-
- virtual bool IsSplit() = 0;
- virtual bool IsScreenImposter() = 0;
-
- virtual float GetRadiusX() = 0;
- virtual float GetRadiusY() = 0;
- virtual Vec3* GetQuadCorners() = 0;
- virtual Vec3 GetNearPoint() = 0;
- virtual Vec3 GetFarPoint() = 0;
- virtual float GetErrorToleranceCosAngle() = 0;
- virtual uint32 GetState() = 0;
- virtual int GetAlphaRef() = 0;
- virtual ColorF GetColorHelper() = 0;
- virtual Vec3 GetLastSunDirection() = 0;
- virtual uint8 GetLastBestEdge() = 0;
- virtual float GetNear() = 0;
- virtual float GetFar() = 0;
- virtual float GetTransparency() = 0;
- virtual Vec3 GetPosition();
- virtual int GetLogResolutionX() = 0;
- virtual int GetLogResolutionY() = 0;
- virtual CameraViewParameters& GetLastViewParameters() = 0;
- virtual IDynTexture* GetTexture() = 0;
- virtual IDynTexture* GetScreenTexture() = 0;
- virtual IDynTexture* GetFrontTexture() = 0;
- virtual IDynTexture* GetDepthTexture() = 0;
- virtual const SMinMaxBox& GetWorldSpaceBounds() = 0;
-
- virtual void SetBBox(const Vec3& min, const Vec3& max) = 0;
- virtual void SetScreenImposterState(bool state) = 0;
- virtual void SetState(uint32 state) = 0;
- virtual void SetAlphaRef(uint32 ref) = 0;
- virtual void SetPosition(Vec3 pos) = 0;
- virtual void SetFrameResetValue(int frameResetValue) = 0;
- virtual void SetTexture(IDynTexture* texture) = 0;
- virtual void SetScreenTexture(IDynTexture* texture) = 0;
- virtual void SetFrontTexture(IDynTexture* texture) = 0;
- virtual void SetDepthTexture(IDynTexture* texture) = 0;
-};
-
-class CREImposter
- : public CRendElementBase
-{
- friend class CRECloud;
- static IDynTexture* m_pScreenTexture;
-
- CameraViewParameters m_LastViewParameters;
- bool m_bScreenImposter;
- bool m_bSplit;
- float m_fRadiusX;
- float m_fRadiusY;
- Vec3 m_vQuadCorners[4]; // in world space, relative to m_vPos, in clockwise order, can be rotated
- Vec3 m_vNearPoint;
- Vec3 m_vFarPoint;
- int m_nLogResolutionX;
- int m_nLogResolutionY;
- IDynTexture* m_pTexture;
- IDynTexture* m_pFrontTexture;
- IDynTexture* m_pTextureDepth;
- float m_fErrorToleranceCosAngle; // cosine of m_fErrorToleranceAngle used to check if IsImposterValid
- SMinMaxBox m_WorldSpaceBV;
- uint32 m_State;
- int m_AlphaRef;
- float m_fCurTransparency;
- ColorF m_ColorHelper;
- Vec3 m_vPos;
- Vec3 m_vLastSunDir;
- uint8 m_nLastBestEdge; // 0..11 this edge is favored to not jitter between different edges
- float m_fNear;
- float m_fFar;
-
- bool IsImposterValid(const CameraViewParameters& viewParameters, float fRadiusX, float fRadiusY, float fCamRadiusX, float fCamRadiusY,
- const int iRequiredLogResX, const int iRequiredLogResY, const uint32 dwBestEdge);
-
- bool Display(bool bDisplayFrontOfSplit);
-
-public:
- int m_nFrameReset;
- int m_FrameUpdate;
- float m_fTimeUpdate;
-
- static int m_MemUpdated;
- static int m_MemPostponed;
- static int m_PrevMemUpdated;
- static int m_PrevMemPostponed;
-
- CREImposter()
- : CRendElementBase()
- , m_pTexture(NULL)
- , m_pFrontTexture(NULL)
- , m_pTextureDepth(NULL)
- , m_bSplit(false)
- , m_fRadiusX(0)
- , m_fRadiusY(0)
- , m_fErrorToleranceCosAngle(cos(DEG2RAD(0.25f)))
- , m_bScreenImposter(false)
- , m_State(GS_DEPTHWRITE)
- , m_AlphaRef(-1)
- , m_fCurTransparency(1.0f)
- , m_FrameUpdate(0)
- , m_nFrameReset(0)
- , m_fTimeUpdate(0)
- , m_vLastSunDir(0, 0, 0)
- , m_nLogResolutionX(0)
- , m_nLogResolutionY(0)
- , m_nLastBestEdge(0)
- {
- mfSetType(eDATA_Imposter);
- mfUpdateFlags(FCEF_TRANSFORM);
- m_ColorHelper = Col_White;
- }
- virtual ~CREImposter()
- {
- ReleaseResources();
- }
-
- bool UpdateImposter();
- void ReleaseResources();
-
- bool PrepareForUpdate();
-
- virtual void GetMemoryUsage(ICrySizer* pSizer) const
- {
- pSizer->AddObject(this, sizeof(*this));
- }
- virtual void mfPrepare(bool bCheckOverflow);
- virtual bool mfDraw(CShader* ef, SShaderPass* sl);
- const SMinMaxBox& mfGetWorldSpaceBounds() { return m_WorldSpaceBV; }
-
- virtual bool IsSplit() { return m_bSplit; }
- virtual bool IsScreenImposter() { return m_bScreenImposter; }
-
- virtual float GetRadiusX() { return m_fRadiusX; }
- virtual float GetRadiusY() { return m_fRadiusY; }
- virtual Vec3* GetQuadCorners() { return &m_vQuadCorners[0]; }
- virtual Vec3 GetNearPoint() { return m_vNearPoint; }
- virtual Vec3 GetFarPoint() { return m_vFarPoint; }
- virtual float GetErrorToleranceCosAngle() { return m_fErrorToleranceCosAngle; }
- virtual uint32 GetState() { return m_State; }
- virtual int GetAlphaRef() { return m_AlphaRef; }
- virtual ColorF GetColorHelper() { return m_ColorHelper; }
- virtual Vec3 GetLastSunDirection() { return m_vLastSunDir; }
- virtual uint8 GetLastBestEdge() { return m_nLastBestEdge; }
- virtual float GetNear() { return m_fNear; }
- virtual float GetFar() { return m_fFar; }
- virtual float GetTransparency() { return m_fCurTransparency; }
- virtual Vec3 GetPosition();
- virtual int GetLogResolutionX() { return m_nLogResolutionX; }
- virtual int GetLogResolutionY() { return m_nLogResolutionY; }
- virtual CameraViewParameters& GetLastViewParameters() { return m_LastViewParameters; }
- virtual IDynTexture** GetTexture() { return &m_pTexture; }
- virtual IDynTexture** GetScreenTexture() { return &m_pScreenTexture; }
- virtual IDynTexture** GetFrontTexture() { return &m_pFrontTexture; }
- virtual IDynTexture** GetDepthTexture() { return &m_pTextureDepth; }
- virtual const SMinMaxBox& GetWorldSpaceBounds() { return m_WorldSpaceBV; }
- virtual int GetFrameReset() { return m_nFrameReset; }
- virtual void SetBBox(const Vec3& min, const Vec3& max) { m_WorldSpaceBV.SetMin(min); m_WorldSpaceBV.SetMax(max); }
- virtual void SetScreenImposterState(bool state) { m_bScreenImposter = state; }
- virtual void SetState(uint32 state) { m_State = state; }
- virtual void SetAlphaRef(uint32 ref) { m_AlphaRef = ref; }
- virtual void SetPosition(Vec3 pos) { m_vPos = pos; }
- virtual void SetFrameResetValue(int frameResetValue) { m_nFrameReset = frameResetValue; }
-};
diff --git a/Code/CryEngine/CryCommon/CREMesh.h b/Code/CryEngine/CryCommon/CREMesh.h
deleted file mode 100644
index 40df816808..0000000000
--- a/Code/CryEngine/CryCommon/CREMesh.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-#ifndef __CREMESH_H__
-#define __CREMESH_H__
-
-class CREMesh
- : public CRendElementBase
-{
-public:
-
- struct CRenderChunk* m_pChunk;
- class CRenderMesh* m_pRenderMesh;
-
- // Copy of Chunk to avoid indirections
- int32 m_nFirstIndexId;
- int32 m_nNumIndices;
-
- uint32 m_nFirstVertId;
- uint32 m_nNumVerts;
-
-protected:
- CREMesh()
- {
- mfSetType(eDATA_Mesh);
- mfUpdateFlags(FCEF_TRANSFORM);
-
- m_pChunk = NULL;
- m_pRenderMesh = NULL;
- m_nFirstIndexId = -1;
- m_nNumIndices = -1;
- m_nFirstVertId = 0;
- m_nNumVerts = 0;
- }
-
- virtual ~CREMesh()
- {
- }
-
- // Ideally should be declared and left unimplemented to prevent slicing at compile time
- // but this would prevent auto code gen in renderer later on.
- // To track potential slicing, uncomment the following (and their equivalent in CREMeshImpl)
- //CREMesh(CREMesh&);
- //CREMesh& operator=(CREMesh& rhs);
-};
-
-#endif // __CREMESH_H__
diff --git a/Code/CryEngine/CryCommon/CREOcclusionQuery.h b/Code/CryEngine/CryCommon/CREOcclusionQuery.h
deleted file mode 100644
index 9350a74104..0000000000
--- a/Code/CryEngine/CryCommon/CREOcclusionQuery.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-#ifndef __CREOCCLUSIONQUERY_H__
-#define __CREOCCLUSIONQUERY_H__
-
-#define SUPP_HMAP_OCCL
-#define SUPP_HWOBJ_OCCL
-
-//=============================================================
-
-class CRenderMesh;
-
-class CREOcclusionQuery
- : public CRendElementBase
-{
- friend class CRender3D;
- bool m_bSucceeded;
-public:
-
- int m_nVisSamples;
- int m_nCheckFrame;
- int m_nDrawFrame;
- Vec3 m_vBoxMin;
- Vec3 m_vBoxMax;
-
- UINT_PTR m_nOcclusionID; // this will carry a pointer LPDIRECT3DQUERY9, so it needs to be 64-bit on Windows 64
-
- CRenderMesh* m_pRMBox;
- static uint32 m_nQueriesPerFrameCounter;
- static uint32 m_nReadResultNowCounter;
- static uint32 m_nReadResultTryCounter;
-
- CREOcclusionQuery()
- {
- m_nOcclusionID = 0;
-
- m_nVisSamples = 800 * 600;
- m_nCheckFrame = 0;
- m_nDrawFrame = 0;
- m_vBoxMin = Vec3(0, 0, 0);
- m_vBoxMax = Vec3(0, 0, 0);
- m_pRMBox = NULL;
-
- mfSetType(eDATA_OcclusionQuery);
- mfUpdateFlags(FCEF_TRANSFORM);
- }
-
- bool RT_ReadResult_Try(uint32 nDefaultNumSamples);
-
- ILINE bool HasSucceeded() const { return m_bSucceeded; }
-
- virtual ~CREOcclusionQuery();
-
- virtual void mfPrepare(bool bCheckOverflow);
- virtual bool mfDraw(CShader* ef, SShaderPass* sfm);
- virtual void mfReset();
- virtual bool mfReadResult_Try(uint32 nDefaultNumSamples = 1);
- virtual bool mfReadResult_Now();
-
- virtual void GetMemoryUsage(ICrySizer* pSizer) const
- {
- pSizer->AddObject(this, sizeof(*this));
- }
-};
-
-struct OcclusionTestClient
-{
- OcclusionTestClient()
- : nLastOccludedMainFrameID(0)
- , nLastVisibleMainFrameID(0)
- {
-#ifdef SUPP_HMAP_OCCL
- vLastVisPoint.Set(0, 0, 0);
- nTerrainOccLastFrame = 0;
-#endif
-#ifdef SUPP_HWOBJ_OCCL
- bOccluded = true;
- pREOcclusionQuery = 0;
-#endif
- //nInstantTestRequested=0;
- }
-#ifdef SUPP_HWOBJ_OCCL
- ~OcclusionTestClient()
- {
- if (pREOcclusionQuery)
- {
- pREOcclusionQuery->Release(false);
- }
- }
-#endif
- uint32 nLastVisibleMainFrameID, nLastOccludedMainFrameID;
- uint32 nLastShadowCastMainFrameID, nLastNoShadowCastMainFrameID;
-#ifdef SUPP_HMAP_OCCL
- Vec3 vLastVisPoint;
- int nTerrainOccLastFrame;
-#endif
-#ifdef SUPP_HWOBJ_OCCL
- CREOcclusionQuery* pREOcclusionQuery;
- uint8 bOccluded;
-#endif
- //uint8 nInstantTestRequested;
-};
-
-
-#endif // CRYINCLUDE_CRYCOMMON_CREOCCLUSIONQUERY_H
diff --git a/Code/CryEngine/CryCommon/CREPostProcess.h b/Code/CryEngine/CryCommon/CREPostProcess.h
deleted file mode 100644
index 4803ae2166..0000000000
--- a/Code/CryEngine/CryCommon/CREPostProcess.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-#ifndef CRYINCLUDE_CRYCOMMON_CREPOSTPROCESS_H
-#define CRYINCLUDE_CRYCOMMON_CREPOSTPROCESS_H
-#pragma once
-
-
-class CREPostProcess
- : public CRendElementBase
-{
- friend class CD3D9Renderer;
-
-public:
-
- CREPostProcess();
- virtual ~CREPostProcess();
-
- virtual void mfPrepare(bool bCheckOverflow);
- virtual bool mfDraw(CShader* ef, SShaderPass* sfm);
-
- // Use for setting numeric values, vec4 (colors, position, vectors, wtv), strings
- virtual int mfSetParameter(const char* pszParam, float fValue, bool bForceValue = false) const;
- virtual int mfSetParameterVec4(const char* pszParam, const Vec4& pValue, bool bForceValue = false) const;
- virtual int mfSetParameterString(const char* pszParam, const char* pszArg) const;
-
- virtual void mfGetParameter(const char* pszParam, float& fValue) const;
- virtual void mfGetParameterVec4(const char* pszParam, Vec4& pValue) const;
- virtual void mfGetParameterString(const char* pszParam, const char*& pszArg) const;
-
- virtual int32 mfGetPostEffectID(const char* pPostEffectName) const;
-
- // Reset all post processing effects
- virtual void Reset(bool bOnSpecChange = false);
- virtual void mfReset()
- {
- Reset();
- }
-
- virtual void GetMemoryUsage(ICrySizer* pSizer) const
- {
- pSizer->AddObject(this, sizeof(*this));
- }
-};
-
-#endif // CRYINCLUDE_CRYCOMMON_CREPOSTPROCESS_H
diff --git a/Code/CryEngine/CryCommon/CREPrismObject.h b/Code/CryEngine/CryCommon/CREPrismObject.h
deleted file mode 100644
index 4ec290f1b9..0000000000
--- a/Code/CryEngine/CryCommon/CREPrismObject.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-#ifndef _CREPRISMOBJECT_
-#define _CREPRISMOBJECT_
-
-#pragma once
-
-#if !defined(EXCLUDE_DOCUMENTATION_PURPOSE)
-
-class CREPrismObject
- : public CRendElementBase
-{
-public:
- CREPrismObject();
-
- virtual ~CREPrismObject() {}
- virtual void mfPrepare(bool bCheckOverflow);
- virtual bool mfDraw(CShader* ef, SShaderPass* sfm);
-
- virtual void GetMemoryUsage(ICrySizer* pSizer) const
- {
- pSizer->AddObject(this, sizeof(*this));
- }
-
- Vec3 m_center;
-};
-
-#endif // EXCLUDE_DOCUMENTATION_PURPOSE
-
-#endif // _CREPRISMOBJECT_
diff --git a/Code/CryEngine/CryCommon/CRESky.h b/Code/CryEngine/CryCommon/CRESky.h
deleted file mode 100644
index 3dfc7d184f..0000000000
--- a/Code/CryEngine/CryCommon/CRESky.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-#ifndef __CRESKY_H__
-#define __CRESKY_H__
-
-//=============================================================
-
-#include "VertexFormats.h"
-#include
-
-struct SSkyLightRenderParams;
-
-class CRESky
- : public CRendElementBase
-{
- friend class CRender3D;
-
-public:
-
- float m_fTerrainWaterLevel;
- float m_fSkyBoxStretching;
- float m_fAlpha;
- int m_nSphereListId;
-
-public:
- CRESky();
- virtual ~CRESky();
- virtual void mfPrepare(bool bCheckOverflow);
- virtual bool mfDraw(CShader* ef, SShaderPass* sfm);
-
- virtual void GetMemoryUsage(ICrySizer* pSizer) const
- {
- pSizer->AddObject(this, sizeof(*this));
- }
-
- AZ::Vertex::Format GetVertexFormat() const override;
- bool GetGeometryInfo(SGeometryInfo& streams) override;
-
-private:
- AZ::Vertex::Format m_skyVertexFormat;
-};
-
-class CREHDRSky
- : public CRendElementBase
-{
-public:
- CREHDRSky();
- virtual ~CREHDRSky();
- virtual void mfPrepare(bool bCheckOverflow);
- virtual bool mfDraw(CShader* ef, SShaderPass* sfm);
-
- virtual void GetMemoryUsage(ICrySizer* pSizer) const
- {
- pSizer->AddObject(this, sizeof(*this));
- }
-
- void GenerateSkyDomeTextures(int32 width, int32 height);
-
- virtual AZ::Vertex::Format GetVertexFormat() const override;
- virtual bool GetGeometryInfo(SGeometryInfo& streams) override;
-
-public:
- const SSkyLightRenderParams* m_pRenderParams;
- int m_moonTexId;
- class CTexture* m_pSkyDomeTextureMie;
- class CTexture* m_pSkyDomeTextureRayleigh;
-
- static void SetCommonMoonParams(CShader* ef, bool bUseMoon = false);
-
-private:
- void Init();
-
-private:
- int m_skyDomeTextureLastTimeStamp;
- int m_frameReset;
- class CStars* m_pStars;
- AZ::Vertex::Format m_hdrSkyVertexFormat;
-};
-
-
-#endif // __CRESKY_H__
diff --git a/Code/CryEngine/CryCommon/CREVolumeObject.h b/Code/CryEngine/CryCommon/CREVolumeObject.h
deleted file mode 100644
index 2137053a8e..0000000000
--- a/Code/CryEngine/CryCommon/CREVolumeObject.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-#ifndef _CREVOLUMEOBJECT_
-#define _CREVOLUMEOBJECT_
-
-#pragma once
-
-#include "VertexFormats.h"
-
-
-struct IVolumeObjectRenderNode;
-
-struct IVolumeTexture
-{
-public:
- virtual ~IVolumeTexture() {}
- virtual void Release() = 0;
- virtual bool Create(unsigned int width, unsigned int height, unsigned int depth, unsigned char* pData) = 0;
- virtual bool Update(unsigned int width, unsigned int height, unsigned int depth, const unsigned char* pData) = 0;
- virtual int GetTexID() const = 0;
- virtual uint32 GetWidth() const = 0;
- virtual uint32 GetHeight() const = 0;
- virtual uint32 GetDepth() const = 0;
- virtual ITexture* GetTexture() const = 0;
-};
-
-class CREVolumeObject
- : public CRendElementBase
-{
-public:
- CREVolumeObject();
-
- virtual ~CREVolumeObject();
- virtual void mfPrepare(bool bCheckOverflow);
- virtual bool mfDraw(CShader* ef, SShaderPass* sfm);
-
- virtual IVolumeTexture* CreateVolumeTexture() const;
-
- virtual void GetMemoryUsage(ICrySizer* pSizer) const
- {
- pSizer->AddObject(this, sizeof(*this));
- }
-
- Vec3 m_center;
- Matrix34 m_matInv;
- Vec3 m_eyePosInWS;
- Vec3 m_eyePosInOS;
- Plane_tpl m_volumeTraceStartPlane;
- AABB m_renderBoundsOS;
- bool m_viewerInsideVolume;
- bool m_nearPlaneIntersectsVolume;
- float m_alpha;
- float m_scale;
-
- IVolumeTexture* m_pDensVol;
- IVolumeTexture* m_pShadVol;
- _smart_ptr m_pHullMesh;
-};
-
-#endif // #ifndef _CREVOLUMEOBJECT_
diff --git a/Code/CryEngine/CryCommon/CREWaterOcean.h b/Code/CryEngine/CryCommon/CREWaterOcean.h
deleted file mode 100644
index e8ca310d41..0000000000
--- a/Code/CryEngine/CryCommon/CREWaterOcean.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-#ifndef _CREWATEROCEAN_
-#define _CREWATEROCEAN_
-
-class CWater;
-
-class CREWaterOcean
- : public CRendElementBase
-{
-public:
- CREWaterOcean();
- virtual ~CREWaterOcean();
-
- virtual void mfPrepare(bool bCheckOverflow);
- virtual bool mfDraw(CShader* ef, SShaderPass* sfm);
- virtual void mfGetPlane(Plane_tpl& pl);
-
- virtual void Create(uint32 nVerticesCount, SVF_P3F_C4B_T2F* pVertices, uint32 nIndicesCount, const void* pIndices, uint32 nIndexSizeof);
- void ReleaseOcean();
-
- virtual Vec3 GetPositionAt(float x, float y) const;
- virtual Vec4* GetDisplaceGrid() const;
-
- virtual void GetMemoryUsage(ICrySizer* pSizer) const
- {
- pSizer->AddObject(this, sizeof(*this));
- }
-private:
-
- uint32 m_nVerticesCount;
- uint32 m_nIndicesCount;
- uint32 m_nIndexSizeof;
-
- void* m_pVertDecl;
- void* m_pVertices;
- void* m_pIndices;
-
-private:
-
- void UpdateFFT();
- void FrameUpdate();
-};
-
-
-#endif
diff --git a/Code/CryEngine/CryCommon/CREWaterVolume.h b/Code/CryEngine/CryCommon/CREWaterVolume.h
deleted file mode 100644
index 89102e3097..0000000000
--- a/Code/CryEngine/CryCommon/CREWaterVolume.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-#ifndef _CREWATERVOLUME_
-#define _CREWATERVOLUME_
-
-#pragma once
-
-
-#include "VertexFormats.h"
-
-class CREWaterVolume
- : public CRendElementBase
-{
-public:
- CREWaterVolume();
-
- virtual ~CREWaterVolume();
- virtual void mfPrepare(bool bCheckOverflow);
- virtual bool mfDraw(CShader* ef, SShaderPass* sfm);
- virtual void mfGetPlane(Plane_tpl& pl);
- virtual void mfCenter(Vec3& vCenter, CRenderObject* pObj);
-
- virtual void GetMemoryUsage(ICrySizer* pSizer) const
- {
- pSizer->AddObject(this, sizeof(*this));
- }
-
-public:
- struct SParams
- {
- SParams()
- : m_pVertices(0)
- , m_pIndices(0)
- , m_numVertices(0)
- , m_numIndices(0)
- , m_center(0, 0, 0)
- , m_WSBBox(Vec3(-1, -1, -1), Vec3(1, 1, 1))
- , m_fogPlane(Vec3(0, 0, 1), 0)
- , m_fogDensity(0.1f)
- , m_fogColor(0.2f, 0.5f, 0.7f)
- , m_fogColorAffectedBySun(true)
- , m_fogShadowing(0.5f)
- , m_caustics(true)
- , m_causticIntensity(1.0f)
- , m_causticTiling(1.0f)
- , m_causticHeight(0.9f)
- , m_viewerInsideVolume(false)
- , m_viewerCloseToWaterPlane(false)
- , m_viewerCloseToWaterVolume(false)
- {
- }
-
- const SVF_P3F_C4B_T2F* m_pVertices;
- const uint16* m_pIndices;
-
- size_t m_numVertices;
- size_t m_numIndices;
-
- Vec3 m_center;
- AABB m_WSBBox;
-
- Plane_tpl m_fogPlane;
- float m_fogDensity;
- Vec3 m_fogColor;
- bool m_fogColorAffectedBySun;
- float m_fogShadowing;
-
- bool m_caustics;
- float m_causticIntensity;
- float m_causticTiling;
- float m_causticHeight;
-
- bool m_viewerInsideVolume;
- bool m_viewerCloseToWaterPlane;
- bool m_viewerCloseToWaterVolume;
- };
-
- struct SOceanParams
- {
- SOceanParams()
- : m_fogColor(0.2f, 0.5f, 0.7f)
- , m_fogColorShallow(0.2f, 0.5f, 0.7f)
- , m_fogDensity(0.2f)
- {
- }
-
- Vec3 m_fogColor;
- Vec3 m_fogColorShallow;
- float m_fogDensity;
- };
-
-public:
- const SParams* m_pParams;
- const SOceanParams* m_pOceanParams;
- bool m_drawWaterSurface;
- bool m_drawFastPath;
-};
-
-
-#endif // #ifndef _CREWATERVOLUME_
diff --git a/Code/CryEngine/CryCommon/CryAssert_Mac.h b/Code/CryEngine/CryCommon/CryAssert_Mac.h
index 8cf49e1a5d..9502605fea 100644
--- a/Code/CryEngine/CryCommon/CryAssert_Mac.h
+++ b/Code/CryEngine/CryCommon/CryAssert_Mac.h
@@ -45,43 +45,6 @@ void CryAssertTrace(const char* szFormat, ...)
}
}
}
-/*
-bool CryAssert(const char* szCondition, const char* szFile,unsigned int line, bool *pIgnore)
-{
- if (!gEnv) return false;
-
- gEnv->pSystem->OnAssert(szCondition, gs_szMessage, szFile, line);
-
- if (!gEnv->bNoAssertDialog && !gEnv->bIgnoreAllAsserts)
- {
- EDialogAction action = MacOSXHandleAssert(szCondition, szFile, line, gs_szMessage, gEnv->pRenderer != NULL);
-
- switch (action) {
- case eDAStop:
- raise(SIGABRT);
- exit(-1);
- case eDABreak:
- return true;
- case eDAIgnoreAll:
- gEnv->bIgnoreAllAsserts = true;
- break;
- case eDAIgnore:
- *pIgnore = true;
- break;
- case eDAReportAsBug:
- if ( gEnv && gEnv->pSystem)
- {
- gEnv->pSystem->ReportBug("Assert: %s - %s", szCondition,gs_szMessage);
- }
-
- case eDAContinue:
- default:
- break;
- }
- }
-
- return false;
-}*/
bool CryAssert(const char* szCondition, const char* szFile, unsigned int line, bool* pIgnore)
{
diff --git a/Code/CryEngine/CryCommon/CryExtension/CryCreateClassInstance.h b/Code/CryEngine/CryCommon/CryExtension/CryCreateClassInstance.h
deleted file mode 100644
index 1d1a4805d4..0000000000
--- a/Code/CryEngine/CryCommon/CryExtension/CryCreateClassInstance.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-// Description : Part of CryEngine's extension framework.
-
-
-#ifndef CRYINCLUDE_CRYEXTENSION_CRYCREATECLASSINSTANCE_H
-#define CRYINCLUDE_CRYEXTENSION_CRYCREATECLASSINSTANCE_H
-#pragma once
-
-
-#include "ICryUnknown.h"
-#include "ICryFactory.h"
-#include "ICryFactoryRegistry.h"
-#include // <> required for Interfuscator
-
-
-template
-bool CryCreateClassInstance(const CryClassID& cid, AZStd::shared_ptr& p)
-{
- p = AZStd::shared_ptr();
- ICryFactoryRegistry* pFactoryReg = gEnv->pSystem->GetCryFactoryRegistry();
- if (pFactoryReg)
- {
- ICryFactory* pFactory = pFactoryReg->GetFactory(cid);
- if (pFactory && pFactory->ClassSupports(cryiidof()))
- {
- ICryUnknownPtr pUnk = pFactory->CreateClassInstance();
- AZStd::shared_ptr pT = cryinterface_cast(pUnk);
- if (pT)
- {
- p = pT;
- }
- }
- }
- return p.get() != NULL;
-}
-
-
-template
-bool CryCreateClassInstance(const char* cname, AZStd::shared_ptr& p)
-{
- p = AZStd::shared_ptr();
- ICryFactoryRegistry* pFactoryReg = gEnv->pSystem->GetCryFactoryRegistry();
- if (pFactoryReg)
- {
- ICryFactory* pFactory = pFactoryReg->GetFactory(cname);
- if (pFactory != NULL && pFactory->ClassSupports(cryiidof()))
- {
- ICryUnknownPtr pUnk = pFactory->CreateClassInstance();
- AZStd::shared_ptr pT = cryinterface_cast(pUnk);
- if (pT)
- {
- p = pT;
- }
- }
- }
- return p.get() != NULL;
-}
-
-
-template
-bool CryCreateClassInstanceForInterface(const CryInterfaceID& iid, AZStd::shared_ptr& p)
-{
- p = AZStd::shared_ptr();
- ICryFactoryRegistry* pFactoryReg = gEnv->pSystem->GetCryFactoryRegistry();
- if (pFactoryReg)
- {
- size_t numFactories = 1;
- ICryFactory* pFactory = 0;
- pFactoryReg->IterateFactories(iid, &pFactory, numFactories);
- if (numFactories == 1 && pFactory)
- {
- ICryUnknownPtr pUnk = pFactory->CreateClassInstance();
- AZStd::shared_ptr pT = cryinterface_cast(pUnk);
- if (pT)
- {
- p = pT;
- }
- }
- }
- return p.get() != NULL;
-}
-
-
-#endif // CRYINCLUDE_CRYEXTENSION_CRYCREATECLASSINSTANCE_H
diff --git a/Code/CryEngine/CryCommon/CryExtension/CryGUID.h b/Code/CryEngine/CryCommon/CryExtension/CryGUID.h
deleted file mode 100644
index a779e91bd2..0000000000
--- a/Code/CryEngine/CryCommon/CryExtension/CryGUID.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-// Description : Part of CryEngine's extension framework.
-
-
-#ifndef CRYINCLUDE_CRYEXTENSION_CRYGUID_H
-#define CRYINCLUDE_CRYEXTENSION_CRYGUID_H
-#pragma once
-
-#include "Serialization/IArchive.h"
-#include "Random.h"
-
-#include
-
-struct CryGUID
-{
- uint64 hipart;
- uint64 lopart;
-
- // !!! Do NOT turn CryGUID into a non-aggregate !!!
- // It will prevent inlining and type list unrolling opportunities within
- // cryinterface_cast() and cryiidof(). As such prevent constructors,
- // non-public members, base classes and virtual functions!
-
- //CryGUID() : hipart(0), lopart(0) {}
- //CryGUID(uint64 h, uint64 l) : hipart(h), lopart(l) {}
-
- static CryGUID Construct(const uint64& hipart, const uint64& lopart)
- {
- CryGUID guid = {hipart, lopart};
- return guid;
- }
-
- static CryGUID Create()
- {
- uint64 lopart = 0;
- uint64 hipart = 0;
- while (lopart == 0 || hipart == 0)
- {
- const uint32 a = cry_random_uint32();
- const uint32 b = cry_random_uint32();
- const uint32 c = cry_random_uint32();
- const uint32 d = cry_random_uint32();
- lopart = (uint64)a | ((uint64)b << 32);
- hipart = (uint64)c | ((uint64)d << 32);
- }
-
- return Construct(lopart, hipart);
- }
-
- static CryGUID Null()
- {
- return Construct(0, 0);
- }
-
- bool operator ==(const CryGUID& rhs) const {return hipart == rhs.hipart && lopart == rhs.lopart; }
- bool operator !=(const CryGUID& rhs) const {return hipart != rhs.hipart || lopart != rhs.lopart; }
- bool operator <(const CryGUID& rhs) const {return hipart == rhs.hipart ? lopart < rhs.lopart : hipart < rhs.hipart; }
-
- void Serialize(Serialization::IArchive& ar)
- {
- if (ar.IsInput())
- {
- uint32 dwords[4];
- ar(dwords, "guid");
- lopart = (((uint64)dwords[1]) << 32) | (uint64)dwords[0];
- hipart = (((uint64)dwords[3]) << 32) | (uint64)dwords[2];
- }
- else
- {
- uint32 guid[4] = {
- (uint32)(lopart & 0xFFFFFFFF), (uint32)((lopart >> 32) & 0xFFFFFFFF),
- (uint32)(hipart & 0xFFFFFFFF), (uint32)((hipart >> 32) & 0xFFFFFFFF)
- };
- ar(guid, "guid");
- }
- }
-};
-
-// This is only used by the editor where we use C++ 11.
-namespace std
-{
- template<>
- struct hash
- {
- public:
- size_t operator()(const CryGUID& guid) const
- {
- std::hash hasher;
- return hasher(guid.lopart) ^ hasher(guid.hipart);
- }
- };
-}
-
-namespace AZStd
-{
- template<>
- struct hash
- {
- public:
- size_t operator()(const CryGUID& guid) const
- {
- std::hash hasher;
- return hasher(guid);
- }
- };
-}
-
-#define MAKE_CRYGUID(high, low) CryGUID::Construct((uint64) high##LL, (uint64) low##LL)
-
-
-#endif // CRYINCLUDE_CRYEXTENSION_CRYGUID_H
diff --git a/Code/CryEngine/CryCommon/CryExtension/CryTypeID.h b/Code/CryEngine/CryCommon/CryExtension/CryTypeID.h
deleted file mode 100644
index 16ae05b448..0000000000
--- a/Code/CryEngine/CryCommon/CryExtension/CryTypeID.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-// Description : Part of CryEngine's extension framework.
-
-
-#ifndef CRYINCLUDE_CRYEXTENSION_CRYTYPEID_H
-#define CRYINCLUDE_CRYEXTENSION_CRYTYPEID_H
-#pragma once
-
-
-#include "CryGUID.h"
-
-
-typedef CryGUID CryInterfaceID;
-typedef CryGUID CryClassID;
-
-
-#endif // CRYINCLUDE_CRYEXTENSION_CRYTYPEID_H
diff --git a/Code/CryEngine/CryCommon/CryExtension/ICryFactory.h b/Code/CryEngine/CryCommon/CryExtension/ICryFactory.h
deleted file mode 100644
index a1a7344198..0000000000
--- a/Code/CryEngine/CryCommon/CryExtension/ICryFactory.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-// Description : Part of CryEngine's extension framework.
-
-
-#ifndef CRYINCLUDE_CRYEXTENSION_ICRYFACTORY_H
-#define CRYINCLUDE_CRYEXTENSION_ICRYFACTORY_H
-#pragma once
-
-
-#include "CryTypeID.h"
-#include
-
-struct ICryUnknown;
-DECLARE_SMART_POINTERS(ICryUnknown);
-
-struct ICryFactory
-{
- virtual const char* GetName() const = 0;
- virtual const CryClassID& GetClassID() const = 0;
- virtual bool ClassSupports(const CryInterfaceID& iid) const = 0;
- virtual void ClassSupports(const CryInterfaceID*& pIIDs, size_t& numIIDs) const = 0;
- virtual ICryUnknownPtr CreateClassInstance() const = 0;
-
-protected:
- // prevent explicit destruction from client side (delete, shared_ptr, etc)
- virtual ~ICryFactory() {}
-};
-
-#endif // CRYINCLUDE_CRYEXTENSION_ICRYFACTORY_H
diff --git a/Code/CryEngine/CryCommon/CryExtension/ICryFactoryRegistry.h b/Code/CryEngine/CryCommon/CryExtension/ICryFactoryRegistry.h
deleted file mode 100644
index f97c0780a1..0000000000
--- a/Code/CryEngine/CryCommon/CryExtension/ICryFactoryRegistry.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-// Description : Part of CryEngine's extension framework.
-
-
-#ifndef CRYINCLUDE_CRYEXTENSION_ICRYFACTORYREGISTRY_H
-#define CRYINCLUDE_CRYEXTENSION_ICRYFACTORYREGISTRY_H
-#pragma once
-
-
-#include "CryTypeID.h"
-
-
-struct ICryFactory;
-
-
-struct ICryFactoryRegistry
-{
- virtual ICryFactory* GetFactory(const char* cname) const = 0;
- virtual ICryFactory* GetFactory(const CryClassID& cid) const = 0;
- /**
- * Iterates all factories implementing the interface specified by \p iid.
- * \param[in] iid ID of the interface to iterate. Often procured using cryiidof<...>().
- * \param[out] pFactories A pointer of the array of factories to fill in. May be nullptr (see below).
- * \param[in] Size (in elements) of the pFactories array [out] Number of elements actually written to pFactories or, when pFactories is null, the number of elements that would be written if sufficient storage was available.
- *
- * Example:
- * \code{.cpp}
- * size_t factoryCount = 0;
- * // Assigns the number of found factories to factoryCount
- * factoryRegistry->IterateFactories(cryiidof(), 0, factoryCount);
- * // Allocate an array of the proper length on the stack
- * ICryFactory** factories = static_cast(alloca(sizeof(ICryFactory*) * factoryCount);
- * // Fill in factories with factoryCount results.
- * factoryRegistry->IterateFactories(cryiidof(), factories, factoryCount);
- * \endcode
- */
- virtual void IterateFactories(const CryInterfaceID& iid, ICryFactory** pFactories, size_t& numFactories) const = 0;
-
-protected:
- // prevent explicit destruction from client side (delete, shared_ptr, etc)
- virtual ~ICryFactoryRegistry() {}
-};
-
-#endif // CRYINCLUDE_CRYEXTENSION_ICRYFACTORYREGISTRY_H
diff --git a/Code/CryEngine/CryCommon/CryExtension/ICryUnknown.h b/Code/CryEngine/CryCommon/CryExtension/ICryUnknown.h
deleted file mode 100644
index 0de018305b..0000000000
--- a/Code/CryEngine/CryCommon/CryExtension/ICryUnknown.h
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-// Description : Part of CryEngine's extension framework.
-
-
-#ifndef CRYINCLUDE_CRYEXTENSION_ICRYUNKNOWN_H
-#define CRYINCLUDE_CRYEXTENSION_ICRYUNKNOWN_H
-#pragma once
-
-
-#include "CryTypeID.h"
-#include
-
-
-struct ICryFactory;
-struct ICryUnknown;
-
-namespace InterfaceCastSemantics
-{
- template
- const CryInterfaceID& cryiidof()
- {
- return T::IID();
- }
-
-#define _BEFRIEND_CRYIIDOF() \
- template \
- friend const CryInterfaceID&InterfaceCastSemantics::cryiidof();
-
-
- template
- Dst* cryinterface_cast(Src* p)
- {
- return static_cast(p ? p->QueryInterface(cryiidof()) : 0);
- }
-
- template
- Dst* cryinterface_cast(const Src* p)
- {
- return static_cast(p ? p->QueryInterface(cryiidof()) : 0);
- }
-
- namespace Internal
- {
- template
- struct cryinterface_cast_shared_ptr_helper;
-
- template
- struct cryinterface_cast_shared_ptr_helper
- {
- static AZStd::shared_ptr Op(const AZStd::shared_ptr& p)
- {
- Dst* dp = cryinterface_cast(p.get());
- return dp ? AZStd::shared_ptr(p, dp) : AZStd::shared_ptr();
- }
- };
-
- template
- struct cryinterface_cast_shared_ptr_helper
- {
- static AZStd::shared_ptr Op(const AZStd::shared_ptr& p)
- {
- ICryUnknown* dp = cryinterface_cast(p.get());
- return dp ? AZStd::shared_ptr(*((const AZStd::shared_ptr*) & p), dp) : AZStd::shared_ptr();
- }
- };
-
- template
- struct cryinterface_cast_shared_ptr_helper
- {
- static AZStd::shared_ptr Op(const AZStd::shared_ptr& p)
- {
- const ICryUnknown* dp = cryinterface_cast(p.get());
- return dp ? AZStd::shared_ptr(*((const AZStd::shared_ptr*) & p), dp) : AZStd::shared_ptr();
- }
- };
- } // namespace Internal
-
- template
- AZStd::shared_ptr cryinterface_cast(const AZStd::shared_ptr& p)
- {
- return Internal::cryinterface_cast_shared_ptr_helper::Op(p);
- }
-
-#define _BEFRIEND_CRYINTERFACE_CAST() \
- template \
- friend Dst * InterfaceCastSemantics::cryinterface_cast(Src*); \
- template \
- friend Dst * InterfaceCastSemantics::cryinterface_cast(const Src*); \
- template \
- friend AZStd::shared_ptr InterfaceCastSemantics::cryinterface_cast(const AZStd::shared_ptr&);
-} // namespace InterfaceCastSemantics
-
-using InterfaceCastSemantics::cryiidof;
-using InterfaceCastSemantics::cryinterface_cast;
-
-
-template
-bool CryIsSameClassInstance(S* p0, T* p1)
-{
- return static_cast(p0) == static_cast(p1) || cryinterface_cast(p0) == cryinterface_cast(p1);
-}
-
-template
-bool CryIsSameClassInstance(const AZStd::shared_ptr& p0, T* p1)
-{
- return CryIsSameClassInstance(p0.get(), p1);
-}
-
-template
-bool CryIsSameClassInstance(S* p0, const AZStd::shared_ptr& p1)
-{
- return CryIsSameClassInstance(p0, p1.get());
-}
-
-template
-bool CryIsSameClassInstance(const AZStd::shared_ptr& p0, const AZStd::shared_ptr& p1)
-{
- return CryIsSameClassInstance(p0.get(), p1.get());
-}
-
-
-namespace CompositeQuerySemantics
-{
- template
- AZStd::shared_ptr crycomposite_query(Src* p, const char* name, bool* pExposed = 0)
- {
- void* pComposite = p ? p->QueryComposite(name) : 0;
- pExposed ? *pExposed = pComposite != 0 : 0;
- return pComposite ? *static_cast*>(pComposite) : AZStd::shared_ptr();
- }
-
- template
- AZStd::shared_ptr crycomposite_query(const Src* p, const char* name, bool* pExposed = 0)
- {
- void* pComposite = p ? p->QueryComposite(name) : 0;
- pExposed ? *pExposed = pComposite != 0 : 0;
- return pComposite ? *static_cast*>(pComposite) : AZStd::shared_ptr();
- }
-
- template
- AZStd::shared_ptr crycomposite_query(const AZStd::shared_ptr& p, const char* name, bool* pExposed = 0)
- {
- return crycomposite_query(p.get(), name, pExposed);
- }
-
- template
- AZStd::shared_ptr crycomposite_query(const AZStd::shared_ptr& p, const char* name, bool* pExposed = 0)
- {
- return crycomposite_query(p.get(), name, pExposed);
- }
-
-#define _BEFRIEND_CRYCOMPOSITE_QUERY() \
- template \
- friend AZStd::shared_ptr CompositeQuerySemantics::crycomposite_query(Src*, const char*, bool*); \
- template \
- friend AZStd::shared_ptr CompositeQuerySemantics::crycomposite_query(const Src*, const char*, bool*); \
- template \
- friend AZStd::shared_ptr CompositeQuerySemantics::crycomposite_query(const AZStd::shared_ptr&, const char*, bool*); \
- template \
- friend AZStd::shared_ptr CompositeQuerySemantics::crycomposite_query(const AZStd::shared_ptr&, const char*, bool*);
-} // namespace CompositeQuerySemantics
-
-using CompositeQuerySemantics::crycomposite_query;
-
-
-#define _BEFRIEND_MAKE_SHARED() \
- template \
- friend class AZStd::Internal::sp_ms_deleter; \
- template \
- friend AZStd::shared_ptr AZStd::make_shared(); \
- template \
- friend AZStd::shared_ptr AZStd::allocate_shared(A const& a);
-
-// prevent explicit destruction from client side
-#define _PROTECTED_DTOR(iname) \
-protected: \
- virtual ~iname() {}
-
-
-// Befriending cryinterface_cast() and crycomposite_query() via CRYINTERFACE_DECLARE is actually only needed for ICryUnknown
-// since QueryInterface() and QueryComposite() are usually not redeclared in derived interfaces but it doesn't hurt either
-#define CRYINTERFACE_DECLARE(iname, iidHigh, iidLow) \
- _BEFRIEND_CRYIIDOF() \
- _BEFRIEND_CRYINTERFACE_CAST() \
- _BEFRIEND_CRYCOMPOSITE_QUERY() \
- _BEFRIEND_MAKE_SHARED() \
- _PROTECTED_DTOR(iname) \
- \
-private: \
- static const CryInterfaceID& IID() \
- { \
- static const CryInterfaceID iid = {(uint64) iidHigh##LL, (uint64) iidLow##LL}; \
- return iid; \
- } \
-public:
-
-
-struct ICryUnknown
-{
- CRYINTERFACE_DECLARE(ICryUnknown, 0x1000000010001000, 0x1000100000000000)
-
- virtual ICryFactory * GetFactory() const = 0;
-
-protected:
- virtual void* QueryInterface(const CryInterfaceID& iid) const = 0;
- virtual void* QueryComposite(const char* name) const = 0;
-};
-
-DECLARE_SMART_POINTERS(ICryUnknown);
-
-
-#endif // CRYINCLUDE_CRYEXTENSION_ICRYUNKNOWN_H
diff --git a/Code/CryEngine/CryCommon/CryExtension/Impl/ClassWeaver.h b/Code/CryEngine/CryCommon/CryExtension/Impl/ClassWeaver.h
deleted file mode 100644
index c3b5bb340c..0000000000
--- a/Code/CryEngine/CryCommon/CryExtension/Impl/ClassWeaver.h
+++ /dev/null
@@ -1,461 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-// Description : Part of CryEngine's extension framework.
-
-
-#ifndef CRYINCLUDE_CRYEXTENSION_IMPL_CLASSWEAVER_H
-#define CRYINCLUDE_CRYEXTENSION_IMPL_CLASSWEAVER_H
-#pragma once
-
-#include "TypeList.h"
-#include "Conversion.h"
-#include "RegFactoryNode.h"
-#include "../ICryUnknown.h"
-#include "../ICryFactory.h"
-#include
-
-namespace CW
-{
- namespace Internal
- {
- template
- struct InterfaceCast;
-
- template
- struct InterfaceCast
- {
- template
- static void* Op(T* p)
- {
- return (Dst*) p;
- }
- };
-
- template <>
- struct InterfaceCast
- {
- template
- static void* Op(T* p)
- {
- return const_cast(static_cast(static_cast(p)));
- }
- };
- }
-
- template
- struct InterfaceCast;
-
- template <>
- struct InterfaceCast
- {
- template
- static void* Op(T*, const CryInterfaceID&)
- {
- return 0;
- }
- };
-
- template
- struct InterfaceCast >
- {
- template
- static void* Op(T* p, const CryInterfaceID& iid)
- {
- if (cryiidof() == iid)
- {
- return Internal::InterfaceCast::Op(p);
- }
- return InterfaceCast::Op(p, iid);
- }
- };
-
- template
- struct FillIIDs;
-
- template <>
- struct FillIIDs
- {
- static void Op(CryInterfaceID*)
- {
- }
- };
-
- template
- struct FillIIDs >
- {
- static void Op(CryInterfaceID* p)
- {
- *p++ = cryiidof();
- FillIIDs::Op(p);
- }
- };
-
- namespace Internal
- {
- template
- struct PickList;
-
- template
- struct PickList
- {
- typedef TL::BuildTypelist<>::Result Result;
- };
-
- template
- struct PickList
- {
- typedef typename S::FullCompositeList Result;
- };
- }
-
- template
- struct ProbeFullCompositeList
- {
- private:
- typedef char y[1];
- typedef char n[2];
-
- template
- static y& test(typename S::FullCompositeList*);
-
- template
- static n& test(...);
-
- public:
- enum
- {
- listFound = sizeof(test(0)) == sizeof(y)
- };
-
- typedef typename Internal::PickList::Result ListType;
- };
-
- namespace Internal
- {
- template
- struct CompositeQuery;
-
- template <>
- struct CompositeQuery
- {
- template
- static void* Op(const T&, const char*)
- {
- return 0;
- }
- };
-
- template
- struct CompositeQuery >
- {
- template
- static void* Op(const T& ref, const char* name)
- {
- void* p = ref.Head::CompositeQueryImpl(name);
- return p ? p : CompositeQuery::Op(ref, name);
- }
- };
- }
-
- struct CompositeQuery
- {
- template
- static void* Op(const T& ref, const char* name)
- {
- return Internal::CompositeQuery::ListType>::Op(ref, name);
- }
- };
-
- inline bool NameMatch(const char* name, const char* compositeName)
- {
- if (!name || !compositeName)
- {
- return false;
- }
- size_t i = 0;
- for (; name[i] && name[i] == compositeName[i]; ++i)
- {
- }
- return name[i] == compositeName[i];
- }
-
- template
- void* CheckCompositeMatch(const char* name, const AZStd::shared_ptr& composite, const char* compositeName)
- {
- typedef TC::SuperSubClass Rel;
- COMPILE_TIME_ASSERT(Rel::exists);
- return NameMatch(name, compositeName) ? const_cast(static_cast(&composite)) : 0;
- }
-} // namespace CW
-
-
-#define CRYINTERFACE_BEGIN() \
-private: \
- typedef TL::BuildTypelist < ICryUnknown
-
-#define CRYINTERFACE_ADD(iname) , iname
-
-#define CRYINTERFACE_END() > ::Result _UserDefinedPartialInterfaceList; \
-protected: \
- typedef TL::NoDuplicates<_UserDefinedPartialInterfaceList>::Result FullInterfaceList;
-
-#define _CRY_TPL_APPEND0(base) TL::Append::Result
-#define _CRY_TPL_APPEND(base, intermediate) TL::Append::Result
-
-#define CRYINTERFACE_ENDWITHBASE(base) > ::Result _UserDefinedPartialInterfaceList; \
-protected: \
- typedef TL::NoDuplicates<_CRY_TPL_APPEND0(base)>::Result FullInterfaceList;
-
-#define CRYINTERFACE_ENDWITHBASE2(base0, base1) > ::Result _UserDefinedPartialInterfaceList; \
-protected: \
- typedef TL::NoDuplicates<_CRY_TPL_APPEND(base0, _CRY_TPL_APPEND0(base1))>::Result FullInterfaceList;
-
-#define CRYINTERFACE_ENDWITHBASE3(base0, base1, base2) > ::Result _UserDefinedPartialInterfaceList; \
-protected: \
- typedef TL::NoDuplicates<_CRY_TPL_APPEND(base0, _CRY_TPL_APPEND(base1, _CRY_TPL_APPEND0(base2)))>::Result FullInterfaceList;
-
-#define CRYINTERFACE_SIMPLE(iname) \
- CRYINTERFACE_BEGIN() \
- CRYINTERFACE_ADD(iname) \
- CRYINTERFACE_END()
-
-#define CRYCOMPOSITE_BEGIN() \
-private: \
- void* CompositeQueryImpl(const char* name) const \
- { \
- (void)(name); \
- void* res = 0; (void)(res); \
-
-#define CRYCOMPOSITE_ADD(member, membername) \
- COMPILE_TIME_ASSERT((sizeof(membername) / sizeof(membername[0])) > 1); \
- if ((res = CW::CheckCompositeMatch(name, member, membername)) != 0) { \
- return res; }
-
-#define _CRYCOMPOSITE_END(implclassname) \
- return 0; \
- }; \
-protected: \
- typedef TL::BuildTypelist::Result _PartialCompositeList; \
- \
- template \
- friend struct CW::Internal::PickList;
-
-#define CRYCOMPOSITE_END(implclassname) \
- _CRYCOMPOSITE_END(implclassname) \
-protected: \
- typedef _PartialCompositeList FullCompositeList;
-
-#define _CRYCOMPOSITE_APPEND0(base) TL::Append<_PartialCompositeList, CW::ProbeFullCompositeList::ListType>::Result
-#define _CRYCOMPOSITE_APPEND(base, intermediate) TL::Append::ListType>::Result
-
-#define CRYCOMPOSITE_ENDWITHBASE(implclassname, base) \
- _CRYCOMPOSITE_END(implclassname) \
-protected: \
- typedef _CRYCOMPOSITE_APPEND0 (base) FullCompositeList;
-
-#define CRYCOMPOSITE_ENDWITHBASE2(implclassname, base0, base1) \
- _CRYCOMPOSITE_END(implclassname) \
-protected: \
- typedef TL::NoDuplicates<_CRYCOMPOSITE_APPEND(base1, _CRYCOMPOSITE_APPEND0(base0))>::Result FullCompositeList;
-
-#define CRYCOMPOSITE_ENDWITHBASE3(implclassname, base0, base1, base2) \
- _CRYCOMPOSITE_END(implclassname) \
-protected: \
- typedef TL::NoDuplicates<_CRYCOMPOSITE_APPEND(base2, _CRYCOMPOSITE_APPEND(base1, _CRYCOMPOSITE_APPEND0(base0)))>::Result FullCompositeList;
-
-template
-class CFactory
- : public ICryFactory
-{
-public:
- virtual const char* GetName() const
- {
- return T::GetCName();
- }
-
- virtual const CryClassID& GetClassID() const
- {
- return T::GetCID();
- }
-
- virtual bool ClassSupports(const CryInterfaceID& iid) const
- {
- for (size_t i = 0; i < m_numIIDs; ++i)
- {
- if (iid == m_pIIDs[i])
- {
- return true;
- }
- }
- return false;
- }
-
- virtual void ClassSupports(const CryInterfaceID*& pIIDs, size_t& numIIDs) const
- {
- pIIDs = m_pIIDs;
- numIIDs = m_numIIDs;
- }
-public:
- virtual ICryUnknownPtr CreateClassInstance() const
- {
- AZStd::shared_ptr p = AZStd::make_shared();
- return cryinterface_cast (p);
- }
-
- CFactory()
- : m_numIIDs(0)
- , m_pIIDs(0)
- , m_regFactory()
- {
- static CryInterfaceID supportedIIDs[TL::Length < typename T::FullInterfaceList > ::value];
- CW::FillIIDs::Op(supportedIIDs);
- m_pIIDs = &supportedIIDs[0];
- m_numIIDs = TL::Length::value;
- new(&m_regFactory)SRegFactoryNode(this);
- }
-
-protected:
- CFactory(const CFactory&);
- CFactory& operator =(const CFactory&);
-
-
- size_t m_numIIDs;
- CryInterfaceID* m_pIIDs;
- SRegFactoryNode m_regFactory;
-};
-
-template
-class CSingletonFactory
- : public CFactory
-{
-public:
- CSingletonFactory()
- : CFactory()
- , m_csCreateClassInstance()
- {
- }
-
- virtual ICryUnknownPtr CreateClassInstance() const
- {
- CryAutoLock lock(m_csCreateClassInstance);
- // override the allocator. These function static instances are being destroyed after the AZ alloctor has been deleted.
- // On win, TerminateProcess() prevents these destructors from being called, but that is not the case on OSX.
- static typename AZStd::aligned_storage,SingletonAllocator>), AZStd::alignment_of::value>::type m_storage;
- static ICryUnknownPtr p = AZStd::allocate_shared(SingletonAllocator(AZStd::addressof(m_storage)));
- return p;
- }
-
- mutable CryCriticalSection m_csCreateClassInstance;
-
- struct SingletonAllocator
- {
- SingletonAllocator(void* ptr) :
- m_data(ptr)
- {}
- void* allocate(size_t /*byteSize*/, size_t /*alignment*/, int /*flags*/ = 0)
- {
- return m_data;
- }
- void deallocate(void* /*ptr*/, size_t /*byteSize*/, size_t /*alignment*/)
- {
- // nothing to see here
- }
- void* m_data;
- };
-};
-
-#define _CRYFACTORY_DECLARE(implclassname) \
-private: \
- friend class CFactory; \
- static CFactory s_factory;
-
-#define _CRYFACTORY_DECLARE_SINGLETON(implclassname) \
-private: \
- friend class CFactory; \
- friend void* Get##implclassname##Factory(); \
- static CSingletonFactory s_factory;
-
-#define _IMPLEMENT_ICRYUNKNOWN() \
-public: \
- virtual ICryFactory* GetFactory() const \
- { \
- return &s_factory; \
- } \
- \
-protected: \
- virtual void* QueryInterface(const CryInterfaceID&iid) const \
- { \
- return CW::InterfaceCast::Op(this, iid); \
- } \
- \
- template \
- friend struct CW::Internal::CompositeQuery; \
- \
- virtual void* QueryComposite(const char* name) const \
- { \
- return CW::CompositeQuery::Op(*this, name); \
- }
-
-#define _ENFORCE_CRYFACTORY_USAGE(implclassname, cname, cidHigh, cidLow) \
-public: \
- static const char* GetCName() \
- { \
- return cname; \
- } \
- static const CryClassID& GetCID() \
- { \
- static const CryClassID cid = {(uint64) cidHigh##LL, (uint64) cidLow##LL}; \
- return cid; \
- } \
- static AZStd::shared_ptr CreateClassInstance() \
- { \
- ICryUnknownPtr p = s_factory.CreateClassInstance(); \
- return AZStd::shared_ptr(*static_cast*>(static_cast(&p))); \
- } \
- \
-protected: \
- implclassname(); \
- virtual ~implclassname();
-
-#define _BEFRIEND_OPS() \
- _BEFRIEND_CRYINTERFACE_CAST() \
- _BEFRIEND_CRYCOMPOSITE_QUERY() \
- _BEFRIEND_MAKE_SHARED()
-
-#define CRYGENERATE_CLASS(implclassname, cname, cidHigh, cidLow) \
- _CRYFACTORY_DECLARE(implclassname) \
- _BEFRIEND_OPS() \
- _IMPLEMENT_ICRYUNKNOWN() \
- _ENFORCE_CRYFACTORY_USAGE(implclassname, cname, cidHigh, cidLow)
-
-#define CRYGENERATE_SINGLETONCLASS(implclassname, cname, cidHigh, cidLow) \
- _CRYFACTORY_DECLARE_SINGLETON(implclassname) \
- _BEFRIEND_OPS() \
- _IMPLEMENT_ICRYUNKNOWN() \
- _ENFORCE_CRYFACTORY_USAGE(implclassname, cname, cidHigh, cidLow)
-
-
-#define CRYREGISTER_CLASS(implclassname) \
- CFactory implclassname::s_factory;
-
-#define DECLARE_CRYREGISTER_SINGLETON_CLASS(implclassname) \
- void* Get##implclassname##Factory();
-
-#define CRYREGISTER_SINGLETON_CLASS(implclassname) \
- CSingletonFactory implclassname::s_factory; \
- void* Get##implclassname##Factory() { \
- return &implclassname::s_factory; \
- }
-
-#endif // CRYINCLUDE_CRYEXTENSION_IMPL_CLASSWEAVER_H
diff --git a/Code/CryEngine/CryCommon/CryExtension/Impl/Conversion.h b/Code/CryEngine/CryCommon/CryExtension/Impl/Conversion.h
deleted file mode 100644
index bd729f259e..0000000000
--- a/Code/CryEngine/CryCommon/CryExtension/Impl/Conversion.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-// Description : Part of CryEngine's extension framework.
-
-
-#ifndef CRYINCLUDE_CRYEXTENSION_IMPL_CONVERSION_H
-#define CRYINCLUDE_CRYEXTENSION_IMPL_CONVERSION_H
-#pragma once
-
-
-namespace TC
-{
- //template
- //struct Conversion
- //{
- //private:
- // typedef char y[1];
- // typedef char n[2];
- // static y& Test(U);
- // static n& Test(...);
- // static T MakeT();
-
- //public:
- // enum
- // {
- // exists = sizeof(Test(MakeT())) == sizeof(y),
- // sameType = false
- // };
- //};
-
- //template
- //struct Conversion
- //{
- //public:
- // enum
- // {
- // exists = true,
- // sameType = true
- // };
- //};
-
- //template
- //struct CheckInheritance
- //{
- // enum
- // {
- // exists = Conversion::exists && !Conversion::sameType
- // };
- //};
-
- //template
- //struct CheckStrictInheritance
- //{
- // enum
- // {
- // exists = CheckInheritance::exists && !Conversion::sameType
- // };
- //};
-
-
- template
- struct SuperSubClass
- {
- private:
- typedef char y[1];
- typedef char n[2];
-
- template
- static y& check(const volatile Derived&, T);
- static n& check(const volatile Base&, int);
-
- struct C
- {
- operator const volatile Base&() const;
- operator const volatile Derived&();
- };
-
- static C getC();
-
- public:
- enum
- {
- exists = sizeof(check(getC(), 0)) == sizeof(y),
- sameType = false
- };
- };
-
- template
- struct SuperSubClass
- {
- enum
- {
- exists = true
- };
- };
-} // namespace TC
-
-#endif // CRYINCLUDE_CRYEXTENSION_IMPL_CONVERSION_H
diff --git a/Code/CryEngine/CryCommon/CryExtension/Impl/CryGUIDHelper.h b/Code/CryEngine/CryCommon/CryExtension/Impl/CryGUIDHelper.h
deleted file mode 100644
index 53ee4352fc..0000000000
--- a/Code/CryEngine/CryCommon/CryExtension/Impl/CryGUIDHelper.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-// Description : Part of CryEngine's extension framework.
-
-
-#ifndef CRYINCLUDE_CRYEXTENSION_IMPL_CRYGUIDHELPER_H
-#define CRYINCLUDE_CRYEXTENSION_IMPL_CRYGUIDHELPER_H
-#pragma once
-
-
-#include "../CryGUID.h"
-#include "../../CryString.h"
-
-
-namespace CryGUIDHelper
-{
- string Print(const CryGUID& val)
- {
- char buf[39]; // sizeof("{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}")
-
- static const char hex[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
- char* p = buf;
- *p++ = '{';
- for (int i = 15; i >= 8; --i)
- {
- *p++ = hex[(unsigned char) ((val.hipart >> (i << 2)) & 0xF)];
- }
- *p++ = '-';
- for (int i = 7; i >= 4; --i)
- {
- *p++ = hex[(unsigned char) ((val.hipart >> (i << 2)) & 0xF)];
- }
- *p++ = '-';
- for (int i = 3; i >= 0; --i)
- {
- *p++ = hex[(unsigned char) ((val.hipart >> (i << 2)) & 0xF)];
- }
- *p++ = '-';
- for (int i = 15; i >= 12; --i)
- {
- *p++ = hex[(unsigned char) ((val.lopart >> (i << 2)) & 0xF)];
- }
- *p++ = '-';
- for (int i = 11; i >= 0; --i)
- {
- *p++ = hex[(unsigned char) ((val.lopart >> (i << 2)) & 0xF)];
- }
- *p++ = '}';
- *p++ = '\0';
-
- return string(buf);
- }
-}
-
-
-#endif // CRYINCLUDE_CRYEXTENSION_IMPL_CRYGUIDHELPER_H
diff --git a/Code/CryEngine/CryCommon/CryExtension/Impl/ICryFactoryRegistryImpl.h b/Code/CryEngine/CryCommon/CryExtension/Impl/ICryFactoryRegistryImpl.h
deleted file mode 100644
index 051c33fc33..0000000000
--- a/Code/CryEngine/CryCommon/CryExtension/Impl/ICryFactoryRegistryImpl.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-// Description : Part of CryEngine's extension framework.
-
-
-#ifndef CRYINCLUDE_CRYEXTENSION_IMPL_ICRYFACTORYREGISTRYIMPL_H
-#define CRYINCLUDE_CRYEXTENSION_IMPL_ICRYFACTORYREGISTRYIMPL_H
-#pragma once
-
-
-#include "../ICryFactoryRegistry.h"
-
-
-struct SRegFactoryNode;
-
-
-struct ICryFactoryRegistryCallback
-{
- virtual void OnNotifyFactoryRegistered(ICryFactory* pFactory) = 0;
- virtual void OnNotifyFactoryUnregistered(ICryFactory* pFactory) = 0;
-
-protected:
- virtual ~ICryFactoryRegistryCallback() {}
-};
-
-
-struct ICryFactoryRegistryImpl
- : public ICryFactoryRegistry
-{
- virtual ICryFactory* GetFactory(const char* cname) const = 0;
- virtual ICryFactory* GetFactory(const CryClassID& cid) const = 0;
- virtual void IterateFactories(const CryInterfaceID& iid, ICryFactory** pFactories, size_t& numFactories) const = 0;
-
- virtual void RegisterCallback(ICryFactoryRegistryCallback* pCallback) = 0;
- virtual void UnregisterCallback(ICryFactoryRegistryCallback* pCallback) = 0;
-
- virtual void RegisterFactories(const SRegFactoryNode* pFactories) = 0;
- virtual void UnregisterFactories(const SRegFactoryNode* pFactories) = 0;
-
- virtual void UnregisterFactory(ICryFactory* const pFactory) = 0;
-
-protected:
- // prevent explicit destruction from client side (delete, shared_ptr, etc)
- virtual ~ICryFactoryRegistryImpl() {}
-};
-
-#endif // CRYINCLUDE_CRYEXTENSION_IMPL_ICRYFACTORYREGISTRYIMPL_H
diff --git a/Code/CryEngine/CryCommon/CryExtension/Impl/RegFactoryNode.h b/Code/CryEngine/CryCommon/CryExtension/Impl/RegFactoryNode.h
deleted file mode 100644
index 8209ae9728..0000000000
--- a/Code/CryEngine/CryCommon/CryExtension/Impl/RegFactoryNode.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-// Description : Part of CryEngine's extension framework.
-
-
-#ifndef CRYINCLUDE_CRYEXTENSION_IMPL_REGFACTORYNODE_H
-#define CRYINCLUDE_CRYEXTENSION_IMPL_REGFACTORYNODE_H
-#pragma once
-
-struct ICryFactory;
-struct SRegFactoryNode;
-
-extern SRegFactoryNode* g_pHeadToRegFactories;
-
-struct SRegFactoryNode
-{
- SRegFactoryNode()
- {
- }
-
- SRegFactoryNode(ICryFactory* pFactory)
- : m_pFactory(pFactory)
- , m_pNext(g_pHeadToRegFactories)
- {
- g_pHeadToRegFactories = this;
- }
-
- static void* operator new(size_t, void* p)
- {
- return p;
- }
-
- static void operator delete(void*, void*)
- {
- }
-
- ICryFactory* m_pFactory;
- SRegFactoryNode* m_pNext;
-};
-
-#endif // CRYINCLUDE_CRYEXTENSION_IMPL_REGFACTORYNODE_H
diff --git a/Code/CryEngine/CryCommon/CryExtension/Impl/TypeList.h b/Code/CryEngine/CryCommon/CryExtension/Impl/TypeList.h
deleted file mode 100644
index 231283fc19..0000000000
--- a/Code/CryEngine/CryCommon/CryExtension/Impl/TypeList.h
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-// Description : Part of CryEngine's extension framework.
-
-
-#ifndef CRYINCLUDE_CRYEXTENSION_TYPELIST_H
-#define CRYINCLUDE_CRYEXTENSION_TYPELIST_H
-#pragma once
-
-
-namespace TL
-{
- // typelist terminator
- class NullType
- {
- };
-
-
- // structure for typelist generation
- template
- struct Typelist
- {
- typedef T Head;
- typedef U Tail;
- };
-
-
- // helper structure to automatically build typelists containing n types
- template
- <
- typename T0 = NullType, typename T1 = NullType, typename T2 = NullType, typename T3 = NullType, typename T4 = NullType,
- typename T5 = NullType, typename T6 = NullType, typename T7 = NullType, typename T8 = NullType, typename T9 = NullType,
- typename T10 = NullType, typename T11 = NullType, typename T12 = NullType, typename T13 = NullType, typename T14 = NullType,
- typename T15 = NullType, typename T16 = NullType, typename T17 = NullType, typename T18 = NullType, typename T19 = NullType
- >
- struct BuildTypelist
- {
- private:
- typedef typename BuildTypelist::Result TailResult;
-
- public:
- typedef Typelist Result;
- };
-
- template <>
- struct BuildTypelist<>
- {
- typedef NullType Result;
- };
-
- // typelist operation : Length
- template
- struct Length;
-
- template <>
- struct Length
- {
- enum
- {
- value = 0
- };
- };
-
- template
- struct Length >
- {
- enum
- {
- value = 1 + Length::value
- };
- };
-
-
- // typelist operation : TypeAt
- template
- struct TypeAt;
-
- template
- struct TypeAt, 0>
- {
- typedef Head Result;
- };
-
- template
- struct TypeAt, index>
- {
- typedef typename TypeAt::Result Result;
- };
-
-
- // typelist operation : IndexOf
- template
- struct IndexOf;
-
- template
- struct IndexOf
- {
- enum
- {
- value = -1
- };
- };
-
- template
- struct IndexOf, T>
- {
- enum
- {
- value = 0
- };
- };
-
- template
- struct IndexOf, T>
- {
- private:
- enum
- {
- temp = IndexOf::value
- };
- public:
- enum
- {
- value = temp == -1 ? -1 : 1 + temp
- };
- };
-
-
- // typelist operation : Append
- template