diff --git a/Assets/Editor/Prefabs/Default_Level.prefab b/Assets/Editor/Prefabs/Default_Level.prefab
new file mode 100644
index 0000000000..fb82c5ab03
--- /dev/null
+++ b/Assets/Editor/Prefabs/Default_Level.prefab
@@ -0,0 +1,666 @@
+{
+ "Source": "Default_Level.prefab",
+ "ContainerEntity": {
+ "Id": "Entity_[1146574390643]",
+ "Name": "Level",
+ "Components": {
+ "Component_[10641544592923449938]": {
+ "$type": "EditorInspectorComponent",
+ "Id": 10641544592923449938
+ },
+ "Component_[12039882709170782873]": {
+ "$type": "EditorOnlyEntityComponent",
+ "Id": 12039882709170782873
+ },
+ "Component_[12265484671603697631]": {
+ "$type": "EditorPendingCompositionComponent",
+ "Id": 12265484671603697631
+ },
+ "Component_[14126657869720434043]": {
+ "$type": "EditorEntitySortComponent",
+ "Id": 14126657869720434043
+ },
+ "Component_[15230859088967841193]": {
+ "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
+ "Id": 15230859088967841193,
+ "Parent Entity": "",
+ "Cached World Transform Parent": ""
+ },
+ "Component_[16239496886950819870]": {
+ "$type": "EditorDisabledCompositionComponent",
+ "Id": 16239496886950819870
+ },
+ "Component_[5688118765544765547]": {
+ "$type": "EditorEntityIconComponent",
+ "Id": 5688118765544765547
+ },
+ "Component_[6545738857812235305]": {
+ "$type": "SelectionComponent",
+ "Id": 6545738857812235305
+ },
+ "Component_[7247035804068349658]": {
+ "$type": "EditorPrefabComponent",
+ "Id": 7247035804068349658
+ },
+ "Component_[9307224322037797205]": {
+ "$type": "EditorLockComponent",
+ "Id": 9307224322037797205
+ },
+ "Component_[9562516168917670048]": {
+ "$type": "EditorVisibilityComponent",
+ "Id": 9562516168917670048
+ }
+ },
+ "IsDependencyReady": true
+ },
+ "Entities": {
+ "Entity_[1155164325235]": {
+ "Id": "Entity_[1155164325235]",
+ "Name": "Sun",
+ "Components": {
+ "Component_[10440557478882592717]": {
+ "$type": "SelectionComponent",
+ "Id": 10440557478882592717
+ },
+ "Component_[13620450453324765907]": {
+ "$type": "EditorLockComponent",
+ "Id": 13620450453324765907
+ },
+ "Component_[2134313378593666258]": {
+ "$type": "EditorInspectorComponent",
+ "Id": 2134313378593666258
+ },
+ "Component_[234010807770404186]": {
+ "$type": "EditorVisibilityComponent",
+ "Id": 234010807770404186
+ },
+ "Component_[2970359110423865725]": {
+ "$type": "EditorEntityIconComponent",
+ "Id": 2970359110423865725
+ },
+ "Component_[3722854130373041803]": {
+ "$type": "EditorOnlyEntityComponent",
+ "Id": 3722854130373041803
+ },
+ "Component_[5992533738676323195]": {
+ "$type": "EditorDisabledCompositionComponent",
+ "Id": 5992533738676323195
+ },
+ "Component_[7378860763541895402]": {
+ "$type": "AZ::Render::EditorDirectionalLightComponent",
+ "Id": 7378860763541895402,
+ "Controller": {
+ "Configuration": {
+ "Intensity": 1.0,
+ "CameraEntityId": "",
+ "ShadowFilterMethod": 1,
+ "ShadowmapSize": "Size1024",
+ "Pcf Method": 1
+ }
+ }
+ },
+ "Component_[7892834440890947578]": {
+ "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
+ "Id": 7892834440890947578,
+ "Parent Entity": "Entity_[1176639161715]",
+ "Transform Data": {
+ "Translate": [
+ 0.0,
+ 0.0,
+ 13.487043380737305
+ ],
+ "Rotate": [
+ -76.13099670410156,
+ -0.847000002861023,
+ -15.8100004196167
+ ]
+ },
+ "Cached World Transform": {
+ "Translation": [
+ 0.0,
+ 0.0,
+ 9.442070960998536
+ ],
+ "Rotation": [
+ -0.6098860502243042,
+ -0.09055805951356888,
+ -0.10376212745904924,
+ 0.7804304361343384
+ ]
+ },
+ "Cached World Transform Parent": "Entity_[1176639161715]"
+ },
+ "Component_[8599729549570828259]": {
+ "$type": "EditorEntitySortComponent",
+ "Id": 8599729549570828259
+ },
+ "Component_[952797371922080273]": {
+ "$type": "EditorPendingCompositionComponent",
+ "Id": 952797371922080273
+ }
+ },
+ "IsDependencyReady": true
+ },
+ "Entity_[1159459292531]": {
+ "Id": "Entity_[1159459292531]",
+ "Name": "Ground",
+ "Components": {
+ "Component_[11701138785793981042]": {
+ "$type": "SelectionComponent",
+ "Id": 11701138785793981042
+ },
+ "Component_[12260880513256986252]": {
+ "$type": "EditorEntityIconComponent",
+ "Id": 12260880513256986252
+ },
+ "Component_[13711420870643673468]": {
+ "$type": "EditorDisabledCompositionComponent",
+ "Id": 13711420870643673468
+ },
+ "Component_[138002849734991713]": {
+ "$type": "EditorOnlyEntityComponent",
+ "Id": 138002849734991713
+ },
+ "Component_[16578565737331764849]": {
+ "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
+ "Id": 16578565737331764849,
+ "Parent Entity": "Entity_[1176639161715]",
+ "Cached World Transform": {
+ "Translation": [
+ 0.0,
+ 0.0,
+ 0.0
+ ]
+ },
+ "Cached World Transform Parent": "Entity_[1176639161715]"
+ },
+ "Component_[16919232076966545697]": {
+ "$type": "EditorInspectorComponent",
+ "Id": 16919232076966545697
+ },
+ "Component_[5182430712893438093]": {
+ "$type": "EditorMaterialComponent",
+ "Id": 5182430712893438093,
+ "materialSlots": [
+ {
+ "id": {
+ "materialAssetId": {
+ "guid": "{935F694A-8639-515B-8133-81CDC7948E5B}",
+ "subId": 803645540
+ }
+ }
+ }
+ ],
+ "materialSlotsByLod": [
+ [
+ {
+ "id": {
+ "lodIndex": 0,
+ "materialAssetId": {
+ "guid": "{935F694A-8639-515B-8133-81CDC7948E5B}",
+ "subId": 803645540
+ }
+ }
+ }
+ ]
+ ]
+ },
+ "Component_[5675108321710651991]": {
+ "$type": "AZ::Render::EditorMeshComponent",
+ "Id": 5675108321710651991,
+ "Controller": {
+ "Configuration": {
+ "ModelAsset": {
+ "assetId": {
+ "guid": "{935F694A-8639-515B-8133-81CDC7948E5B}",
+ "subId": 277333723
+ },
+ "assetHint": "objects/groudplane/groundplane_521x521m.azmodel"
+ }
+ }
+ }
+ },
+ "Component_[5681893399601237518]": {
+ "$type": "EditorEntitySortComponent",
+ "Id": 5681893399601237518
+ },
+ "Component_[592692962543397545]": {
+ "$type": "EditorPendingCompositionComponent",
+ "Id": 592692962543397545
+ },
+ "Component_[7090012899106946164]": {
+ "$type": "EditorLockComponent",
+ "Id": 7090012899106946164
+ },
+ "Component_[9410832619875640998]": {
+ "$type": "EditorVisibilityComponent",
+ "Id": 9410832619875640998
+ }
+ },
+ "IsDependencyReady": true
+ },
+ "Entity_[1163754259827]": {
+ "Id": "Entity_[1163754259827]",
+ "Name": "Camera",
+ "Components": {
+ "Component_[11895140916889160460]": {
+ "$type": "EditorEntityIconComponent",
+ "Id": 11895140916889160460
+ },
+ "Component_[16880285896855930892]": {
+ "$type": "{CA11DA46-29FF-4083-B5F6-E02C3A8C3A3D} EditorCameraComponent",
+ "Id": 16880285896855930892,
+ "Controller": {
+ "Configuration": {
+ "Field of View": 55.0,
+ "EditorEntityId": 8929576024571800510
+ }
+ }
+ },
+ "Component_[17187464423780271193]": {
+ "$type": "EditorLockComponent",
+ "Id": 17187464423780271193
+ },
+ "Component_[17495696818315413311]": {
+ "$type": "EditorEntitySortComponent",
+ "Id": 17495696818315413311
+ },
+ "Component_[18086214374043522055]": {
+ "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
+ "Id": 18086214374043522055,
+ "Parent Entity": "Entity_[1176639161715]",
+ "Transform Data": {
+ "Translate": [
+ -2.300000190734864,
+ -3.9368600845336916,
+ 1.0
+ ],
+ "Rotate": [
+ -2.050307512283325,
+ 1.9552897214889529,
+ -43.62335586547852
+ ]
+ },
+ "Cached World Transform": {
+ "Translation": [
+ -11.904647827148438,
+ 13.392678260803223,
+ -3.0449724197387697
+ ],
+ "Rotation": [
+ -0.02294669672846794,
+ 0.00919158011674881,
+ -0.37172695994377139,
+ 0.9280129671096802
+ ]
+ },
+ "Cached World Transform Parent": "Entity_[1176639161715]"
+ },
+ "Component_[18387556550380114975]": {
+ "$type": "SelectionComponent",
+ "Id": 18387556550380114975
+ },
+ "Component_[2654521436129313160]": {
+ "$type": "EditorVisibilityComponent",
+ "Id": 2654521436129313160
+ },
+ "Component_[5265045084611556958]": {
+ "$type": "EditorDisabledCompositionComponent",
+ "Id": 5265045084611556958
+ },
+ "Component_[7169798125182238623]": {
+ "$type": "EditorPendingCompositionComponent",
+ "Id": 7169798125182238623
+ },
+ "Component_[8866210352157164042]": {
+ "$type": "EditorInspectorComponent",
+ "Id": 8866210352157164042
+ },
+ "Component_[9129253381063760879]": {
+ "$type": "EditorOnlyEntityComponent",
+ "Id": 9129253381063760879
+ }
+ },
+ "IsDependencyReady": true
+ },
+ "Entity_[1168049227123]": {
+ "Id": "Entity_[1168049227123]",
+ "Name": "Grid",
+ "Components": {
+ "Component_[11443347433215807130]": {
+ "$type": "EditorEntityIconComponent",
+ "Id": 11443347433215807130
+ },
+ "Component_[11779275529534764488]": {
+ "$type": "SelectionComponent",
+ "Id": 11779275529534764488
+ },
+ "Component_[14249419413039427459]": {
+ "$type": "EditorInspectorComponent",
+ "Id": 14249419413039427459
+ },
+ "Component_[15448581635946161318]": {
+ "$type": "AZ::Render::EditorGridComponent",
+ "Id": 15448581635946161318,
+ "Controller": {
+ "Configuration": {
+ "primarySpacing": 4.0,
+ "primaryColor": [
+ 0.501960813999176,
+ 0.501960813999176,
+ 0.501960813999176
+ ],
+ "secondarySpacing": 0.5,
+ "secondaryColor": [
+ 0.250980406999588,
+ 0.250980406999588,
+ 0.250980406999588
+ ]
+ }
+ }
+ },
+ "Component_[1843303322527297409]": {
+ "$type": "EditorDisabledCompositionComponent",
+ "Id": 1843303322527297409
+ },
+ "Component_[380249072065273654]": {
+ "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
+ "Id": 380249072065273654,
+ "Parent Entity": "Entity_[1176639161715]",
+ "Cached World Transform": {
+ "Translation": [
+ 0.0,
+ 0.0,
+ 0.0
+ ]
+ },
+ "Cached World Transform Parent": "Entity_[1176639161715]"
+ },
+ "Component_[7476660583684339787]": {
+ "$type": "EditorPendingCompositionComponent",
+ "Id": 7476660583684339787
+ },
+ "Component_[7557626501215118375]": {
+ "$type": "EditorEntitySortComponent",
+ "Id": 7557626501215118375
+ },
+ "Component_[7984048488947365511]": {
+ "$type": "EditorVisibilityComponent",
+ "Id": 7984048488947365511
+ },
+ "Component_[8118181039276487398]": {
+ "$type": "EditorOnlyEntityComponent",
+ "Id": 8118181039276487398
+ },
+ "Component_[9189909764215270515]": {
+ "$type": "EditorLockComponent",
+ "Id": 9189909764215270515
+ }
+ },
+ "IsDependencyReady": true
+ },
+ "Entity_[1172344194419]": {
+ "Id": "Entity_[1172344194419]",
+ "Name": "Shader Ball",
+ "Components": {
+ "Component_[10789351944715265527]": {
+ "$type": "EditorOnlyEntityComponent",
+ "Id": 10789351944715265527
+ },
+ "Component_[12037033284781049225]": {
+ "$type": "EditorEntitySortComponent",
+ "Id": 12037033284781049225
+ },
+ "Component_[13759153306105970079]": {
+ "$type": "EditorPendingCompositionComponent",
+ "Id": 13759153306105970079
+ },
+ "Component_[14135560884830586279]": {
+ "$type": "EditorInspectorComponent",
+ "Id": 14135560884830586279
+ },
+ "Component_[16247165675903986673]": {
+ "$type": "EditorVisibilityComponent",
+ "Id": 16247165675903986673
+ },
+ "Component_[18082433625958885247]": {
+ "$type": "EditorDisabledCompositionComponent",
+ "Id": 18082433625958885247
+ },
+ "Component_[6472623349872972660]": {
+ "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
+ "Id": 6472623349872972660,
+ "Parent Entity": "Entity_[1176639161715]",
+ "Transform Data": {
+ "Rotate": [
+ 0.0,
+ 0.10000000149011612,
+ 180.0
+ ]
+ },
+ "Cached World Transform": {
+ "Translation": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "Rotation": [
+ 0.0008726645028218627,
+ 0.0,
+ 0.9999996423721314,
+ 0.0
+ ]
+ },
+ "Cached World Transform Parent": "Entity_[1176639161715]"
+ },
+ "Component_[6495255223970673916]": {
+ "$type": "AZ::Render::EditorMeshComponent",
+ "Id": 6495255223970673916,
+ "Controller": {
+ "Configuration": {
+ "ModelAsset": {
+ "assetId": {
+ "guid": "{FD340C30-755C-5911-92A3-19A3F7A77931}",
+ "subId": 281415304
+ },
+ "assetHint": "objects/shaderball/shaderball_default_1m.azmodel"
+ }
+ }
+ }
+ },
+ "Component_[8056625192494070973]": {
+ "$type": "SelectionComponent",
+ "Id": 8056625192494070973
+ },
+ "Component_[8550141614185782969]": {
+ "$type": "EditorEntityIconComponent",
+ "Id": 8550141614185782969
+ },
+ "Component_[9439770997198325425]": {
+ "$type": "EditorLockComponent",
+ "Id": 9439770997198325425
+ }
+ },
+ "IsDependencyReady": true
+ },
+ "Entity_[1176639161715]": {
+ "Id": "Entity_[1176639161715]",
+ "Name": "Atom Default Environment",
+ "Components": {
+ "Component_[10757302973393310045]": {
+ "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
+ "Id": 10757302973393310045,
+ "Parent Entity": "Entity_[1146574390643]",
+ "Cached World Transform": {
+ "Translation": [
+ 0.0,
+ 0.0,
+ 0.0
+ ]
+ },
+ "Cached World Transform Parent": "Entity_[1146574390643]"
+ },
+ "Component_[14505817420424255464]": {
+ "$type": "EditorInspectorComponent",
+ "Id": 14505817420424255464,
+ "ComponentOrderEntryArray": [
+ {
+ "ComponentId": 10757302973393310045
+ }
+ ]
+ },
+ "Component_[14988041764659020032]": {
+ "$type": "EditorLockComponent",
+ "Id": 14988041764659020032
+ },
+ "Component_[15808690248755038124]": {
+ "$type": "SelectionComponent",
+ "Id": 15808690248755038124
+ },
+ "Component_[15900837685796817138]": {
+ "$type": "EditorVisibilityComponent",
+ "Id": 15900837685796817138
+ },
+ "Component_[3298767348226484884]": {
+ "$type": "EditorOnlyEntityComponent",
+ "Id": 3298767348226484884
+ },
+ "Component_[4076975109609220594]": {
+ "$type": "EditorPendingCompositionComponent",
+ "Id": 4076975109609220594
+ },
+ "Component_[5679760548946028854]": {
+ "$type": "EditorDisabledCompositionComponent",
+ "Id": 5679760548946028854
+ },
+ "Component_[5855590796136709437]": {
+ "$type": "EditorEntitySortComponent",
+ "Id": 5855590796136709437,
+ "ChildEntityOrderEntryArray": [
+ {
+ "EntityId": "Entity_[1155164325235]"
+ },
+ {
+ "EntityId": "Entity_[1180934129011]",
+ "SortIndex": 1
+ },
+ {
+ "EntityId": "Entity_[1172344194419]",
+ "SortIndex": 2
+ },
+ {
+ "EntityId": "Entity_[1168049227123]",
+ "SortIndex": 3
+ },
+ {
+ "EntityId": "Entity_[1163754259827]",
+ "SortIndex": 4
+ },
+ {
+ "EntityId": "Entity_[1159459292531]",
+ "SortIndex": 5
+ }
+ ]
+ },
+ "Component_[9277695270015777859]": {
+ "$type": "EditorEntityIconComponent",
+ "Id": 9277695270015777859
+ }
+ },
+ "IsDependencyReady": true
+ },
+ "Entity_[1180934129011]": {
+ "Id": "Entity_[1180934129011]",
+ "Name": "Global Sky",
+ "Components": {
+ "Component_[11231930600558681245]": {
+ "$type": "AZ::Render::EditorHDRiSkyboxComponent",
+ "Id": 11231930600558681245,
+ "Controller": {
+ "Configuration": {
+ "CubemapAsset": {
+ "assetId": {
+ "guid": "{215E47FD-D181-5832-B1AB-91673ABF6399}",
+ "subId": 1000
+ },
+ "assetHint": "lightingpresets/highcontrast/goegap_4k_skyboxcm.exr.streamingimage"
+ }
+ }
+ }
+ },
+ "Component_[11980494120202836095]": {
+ "$type": "SelectionComponent",
+ "Id": 11980494120202836095
+ },
+ "Component_[1428633914413949476]": {
+ "$type": "EditorLockComponent",
+ "Id": 1428633914413949476
+ },
+ "Component_[14936200426671614999]": {
+ "$type": "AZ::Render::EditorImageBasedLightComponent",
+ "Id": 14936200426671614999,
+ "Controller": {
+ "Configuration": {
+ "diffuseImageAsset": {
+ "assetId": {
+ "guid": "{3FD09945-D0F2-55C8-B9AF-B2FD421FE3BE}",
+ "subId": 3000
+ },
+ "assetHint": "lightingpresets/highcontrast/goegap_4k_iblglobalcm_ibldiffuse.exr.streamingimage"
+ },
+ "specularImageAsset": {
+ "assetId": {
+ "guid": "{3FD09945-D0F2-55C8-B9AF-B2FD421FE3BE}",
+ "subId": 2000
+ },
+ "assetHint": "lightingpresets/highcontrast/goegap_4k_iblglobalcm_iblspecular.exr.streamingimage"
+ }
+ }
+ }
+ },
+ "Component_[14994774102579326069]": {
+ "$type": "EditorDisabledCompositionComponent",
+ "Id": 14994774102579326069
+ },
+ "Component_[15417479889044493340]": {
+ "$type": "EditorPendingCompositionComponent",
+ "Id": 15417479889044493340
+ },
+ "Component_[15826613364991382688]": {
+ "$type": "EditorEntitySortComponent",
+ "Id": 15826613364991382688
+ },
+ "Component_[1665003113283562343]": {
+ "$type": "EditorOnlyEntityComponent",
+ "Id": 1665003113283562343
+ },
+ "Component_[3704934735944502280]": {
+ "$type": "EditorEntityIconComponent",
+ "Id": 3704934735944502280
+ },
+ "Component_[5698542331457326479]": {
+ "$type": "EditorVisibilityComponent",
+ "Id": 5698542331457326479
+ },
+ "Component_[6644513399057217122]": {
+ "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
+ "Id": 6644513399057217122,
+ "Parent Entity": "Entity_[1176639161715]",
+ "Cached World Transform": {
+ "Translation": [
+ 0.0,
+ 0.0,
+ 0.0
+ ]
+ },
+ "Cached World Transform Parent": "Entity_[1176639161715]"
+ },
+ "Component_[931091830724002070]": {
+ "$type": "EditorInspectorComponent",
+ "Id": 931091830724002070
+ }
+ },
+ "IsDependencyReady": true
+ }
+ }
+}
\ No newline at end of file
diff --git a/AutomatedTesting/Assets/Objects/Foliage/Textures/grass_atlas_diff.tif.exportsettings b/AutomatedTesting/Assets/Objects/Foliage/Textures/grass_atlas_diff.tif.exportsettings
index 5c4c862583..b65133fbb0 100644
--- a/AutomatedTesting/Assets/Objects/Foliage/Textures/grass_atlas_diff.tif.exportsettings
+++ b/AutomatedTesting/Assets/Objects/Foliage/Textures/grass_atlas_diff.tif.exportsettings
@@ -1 +1 @@
-/autooptimizefile=0 /preset=AlbedoWithGenericAlpha /reduce="es3:2,ios:2,osx_gl:0,pc:0,provo:0"
\ No newline at end of file
+/autooptimizefile=0 /preset=AlbedoWithGenericAlpha /reduce="android:2,ios:2,mac:0,pc:0,provo:0"
\ No newline at end of file
diff --git a/AutomatedTesting/Assets/Objects/Foliage/Textures/grass_atlas_sss.tif.exportsettings b/AutomatedTesting/Assets/Objects/Foliage/Textures/grass_atlas_sss.tif.exportsettings
index 441a11bc68..e8da408b36 100644
--- a/AutomatedTesting/Assets/Objects/Foliage/Textures/grass_atlas_sss.tif.exportsettings
+++ b/AutomatedTesting/Assets/Objects/Foliage/Textures/grass_atlas_sss.tif.exportsettings
@@ -1 +1 @@
-/autooptimizefile=0 /preset=Albedo /reduce="es3:3,ios:3,osx_gl:0,pc:0,provo:0"
\ No newline at end of file
+/autooptimizefile=0 /preset=Albedo /reduce="android:3,ios:3,mac:0,pc:0,provo:0"
\ No newline at end of file
diff --git a/AutomatedTesting/Gem/Code/tool_dependencies.cmake b/AutomatedTesting/Gem/Code/tool_dependencies.cmake
index e2e57d4012..1d70c02b1c 100644
--- a/AutomatedTesting/Gem/Code/tool_dependencies.cmake
+++ b/AutomatedTesting/Gem/Code/tool_dependencies.cmake
@@ -12,7 +12,7 @@
# Extracted from Editor.xml
set(GEM_DEPENDENCIES
Gem::Maestro.Editor
- Gem::TextureAtlas
+ Gem::TextureAtlas.Editor
Gem::LmbrCentral.Editor
Gem::LyShine.Editor
Gem::HttpRequestor
diff --git a/AutomatedTesting/Gem/PythonTests/AWS/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/AWS/CMakeLists.txt
index b406ea77de..f463210cb0 100644
--- a/AutomatedTesting/Gem/PythonTests/AWS/CMakeLists.txt
+++ b/AutomatedTesting/Gem/PythonTests/AWS/CMakeLists.txt
@@ -16,16 +16,16 @@
if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
# Enable after installing NodeJS and CDK on jenkins Windows AMI.
- #ly_add_pytest(
- # NAME AutomatedTesting::AWSTests
- # TEST_SUITE periodic
- # TEST_SERIAL
- # PATH ${CMAKE_CURRENT_LIST_DIR}/AWS/${PAL_PLATFORM_NAME}/
- # RUNTIME_DEPENDENCIES
- # Legacy::Editor
- # AZ::AssetProcessor
- # AutomatedTesting.Assets
- # COMPONENT
- # AWS
- #)
+ ly_add_pytest(
+ NAME AutomatedTesting::AWSTests
+ TEST_SUITE periodic
+ TEST_SERIAL
+ PATH ${CMAKE_CURRENT_LIST_DIR}/${PAL_PLATFORM_NAME}/
+ RUNTIME_DEPENDENCIES
+ Legacy::Editor
+ AZ::AssetProcessor
+ AutomatedTesting.Assets
+ COMPONENT
+ AWS
+ )
endif()
diff --git a/AutomatedTesting/Gem/PythonTests/AWS/Windows/__init__.py b/AutomatedTesting/Gem/PythonTests/AWS/Windows/__init__.py
new file mode 100644
index 0000000000..8caef52682
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/AWS/Windows/__init__.py
@@ -0,0 +1,11 @@
+"""
+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.
+"""
+
diff --git a/AutomatedTesting/Gem/PythonTests/AWS/Windows/cdk/__init__.py b/AutomatedTesting/Gem/PythonTests/AWS/Windows/cdk/__init__.py
new file mode 100644
index 0000000000..8caef52682
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/AWS/Windows/cdk/__init__.py
@@ -0,0 +1,11 @@
+"""
+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.
+"""
+
diff --git a/AutomatedTesting/Gem/PythonTests/AWS/Windows/client_auth/__init__.py b/AutomatedTesting/Gem/PythonTests/AWS/Windows/client_auth/__init__.py
new file mode 100644
index 0000000000..8caef52682
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/AWS/Windows/client_auth/__init__.py
@@ -0,0 +1,11 @@
+"""
+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.
+"""
+
diff --git a/AutomatedTesting/Gem/PythonTests/AWS/Windows/client_auth/test_anonymous_credentials.py b/AutomatedTesting/Gem/PythonTests/AWS/Windows/client_auth/test_anonymous_credentials.py
index 5997701870..7b9c549f6c 100644
--- a/AutomatedTesting/Gem/PythonTests/AWS/Windows/client_auth/test_anonymous_credentials.py
+++ b/AutomatedTesting/Gem/PythonTests/AWS/Windows/client_auth/test_anonymous_credentials.py
@@ -68,6 +68,7 @@ class TestAWSClientAuthAnonymousCredentials(object):
log_monitor = ly_test_tools.log.log_monitor.LogMonitor(launcher=launcher, log_file_path=file_to_monitor)
launcher.args = ['+LoadLevel', level]
+ launcher.args.extend(['-rhi=null'])
with launcher.start(launch_ap=False):
result = log_monitor.monitor_log_for_lines(
diff --git a/AutomatedTesting/Gem/PythonTests/AWS/Windows/client_auth/test_password_signin.py b/AutomatedTesting/Gem/PythonTests/AWS/Windows/client_auth/test_password_signin.py
index da4898b8a9..89b859dd0f 100644
--- a/AutomatedTesting/Gem/PythonTests/AWS/Windows/client_auth/test_password_signin.py
+++ b/AutomatedTesting/Gem/PythonTests/AWS/Windows/client_auth/test_password_signin.py
@@ -67,6 +67,7 @@ class TestAWSClientAuthPasswordSignIn(object):
log_monitor = ly_test_tools.log.log_monitor.LogMonitor(launcher=launcher, log_file_path=file_to_monitor)
launcher.args = ['+LoadLevel', 'AWS/ClientAuthPasswordSignUp']
+ launcher.args.extend(['-rhi=null'])
with launcher.start(launch_ap=False):
result = log_monitor.monitor_log_for_lines(
@@ -87,6 +88,7 @@ class TestAWSClientAuthPasswordSignIn(object):
)
launcher.args = ['+LoadLevel', 'AWS/ClientAuthPasswordSignIn']
+ launcher.args.extend(['-rhi=null'])
with launcher.start(launch_ap=False):
result = log_monitor.monitor_log_for_lines(
diff --git a/AutomatedTesting/Gem/PythonTests/AWS/Windows/resource_mappings/resource_mappings.py b/AutomatedTesting/Gem/PythonTests/AWS/Windows/resource_mappings/resource_mappings.py
index b3fa3011ce..dc462e0556 100644
--- a/AutomatedTesting/Gem/PythonTests/AWS/Windows/resource_mappings/resource_mappings.py
+++ b/AutomatedTesting/Gem/PythonTests/AWS/Windows/resource_mappings/resource_mappings.py
@@ -10,8 +10,12 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
"""
import os
+from os.path import abspath
import pytest
import json
+import logging
+
+logger = logging.getLogger(__name__)
AWS_RESOURCE_MAPPINGS_KEY = 'AWSResourceMappings'
AWS_RESOURCE_MAPPINGS_ACCOUNT_ID_KEY = 'AccountId'
@@ -57,9 +61,9 @@ class ResourceMappings:
stacks = response.get('Stacks', [])
assert len(stacks) == 1, f'{stack_name} is invalid.'
- self.__write_resource_mappings(stacks[0].get('Outputs', []))
+ self._write_resource_mappings(stacks[0].get('Outputs', []))
- def __write_resource_mappings(self, outputs, append_feature_name = True) -> None:
+ def _write_resource_mappings(self, outputs, append_feature_name = True) -> None:
with open(self._resource_mapping_file_path) as file_content:
resource_mappings = json.load(file_content)
@@ -129,8 +133,10 @@ def resource_mappings(
:return: ResourceMappings class object.
"""
- path = f'{workspace.paths.engine_root()}\\{project}\\Config\\{resource_mappings_filename}'
- resource_mappings_obj = ResourceMappings(path, aws_utils.assume_session().region_name, feature_name,
+ path = f'{workspace.paths.engine_root()}/{project}/Config/{resource_mappings_filename}'
+ logger.info(f'Resource mapping path : {path}')
+ logger.info(f'Resource mapping resolved path : {abspath(path)}')
+ resource_mappings_obj = ResourceMappings(abspath(path), aws_utils.assume_session().region_name, feature_name,
aws_utils.assume_account_id(), workspace,
aws_utils.client('cloudformation'))
diff --git a/AutomatedTesting/Gem/PythonTests/AWS/common/__init__.py b/AutomatedTesting/Gem/PythonTests/AWS/common/__init__.py
new file mode 100644
index 0000000000..8caef52682
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/AWS/common/__init__.py
@@ -0,0 +1,11 @@
+"""
+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.
+"""
+
diff --git a/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/AssetBuilder_test.py b/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/AssetBuilder_test.py
index 818dc23079..ecf08cfcbd 100644
--- a/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/AssetBuilder_test.py
+++ b/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/AssetBuilder_test.py
@@ -31,13 +31,13 @@ class TestPythonAssetProcessing(object):
unexpected_lines = []
expected_lines = [
'Mock asset exists',
- 'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_positive_1.azmodel) found',
- 'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_negative_1.azmodel) found',
- 'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_positive_1.azmodel) found',
- 'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_negative_1.azmodel) found',
- 'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_positive_1.azmodel) found',
- 'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_negative_1.azmodel) found',
- 'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_center_1.azmodel) found'
+ 'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_positive.azmodel) found',
+ 'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_negative.azmodel) found',
+ 'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_positive.azmodel) found',
+ 'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_negative.azmodel) found',
+ 'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_positive.azmodel) found',
+ 'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_negative.azmodel) found',
+ 'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_center.azmodel) found'
]
timeout = 180
halt_on_unexpected = False
diff --git a/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/AssetBuilder_test_case.py b/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/AssetBuilder_test_case.py
index cd9adfdbcf..a7907778b2 100644
--- a/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/AssetBuilder_test_case.py
+++ b/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/AssetBuilder_test_case.py
@@ -38,16 +38,16 @@ def test_azmodel_product(generatedModelAssetPath, expectedSubId):
assetId = azlmbr.asset.AssetCatalogRequestBus(azlmbr.bus.Broadcast, 'GetAssetIdByPath', generatedModelAssetPath, azModelAssetType, False)
assetIdString = assetId.to_string()
if (assetIdString.endswith(':' + expectedSubId) is False):
- raise_and_stop(f'Asset has unexpected asset ID ({assetIdString}) for ({generatedModelAssetPath})!')
+ raise_and_stop(f'Asset at path {generatedModelAssetPath} has unexpected asset ID ({assetIdString}) for ({generatedModelAssetPath}), expected {expectedSubId}!')
else:
print(f'Expected subId for asset ({generatedModelAssetPath}) found')
-test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_positive_1.azmodel', '10315ae0')
-test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_negative_1.azmodel', '10661093')
-test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_positive_1.azmodel', '10af8810')
-test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_negative_1.azmodel', '10f8c263')
-test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_positive_1.azmodel', '100ac47f')
-test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_negative_1.azmodel', '105d8e0c')
-test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_center_1.azmodel', '1002d464')
+test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_positive.azmodel', '1024be55')
+test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_negative.azmodel', '1052c94e')
+test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_positive.azmodel', '10130556')
+test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_negative.azmodel', '1065724d')
+test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_positive.azmodel', '10d16e68')
+test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_negative.azmodel', '10a71973')
+test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_center.azmodel', '10412075')
azlmbr.editor.EditorToolsApplicationRequestBus(azlmbr.bus.Broadcast, 'ExitNoPrompt')
diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/ap_all_platforms_setup_fixture.py b/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/ap_all_platforms_setup_fixture.py
index e729ee9882..9a5b93ca80 100755
--- a/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/ap_all_platforms_setup_fixture.py
+++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/ap_all_platforms_setup_fixture.py
@@ -34,10 +34,10 @@ def ap_all_platforms_setup_fixture(request, workspace, ap_setup_fixture) -> Dict
# Specific platform cache locations
resources["pc_cache_location"] = os.path.join(cache_dir, "pc")
- resources["es3_cache_location"] = os.path.join(cache_dir, "es3")
+ resources["android_cache_location"] = os.path.join(cache_dir, "android")
resources["ios_cache_location"] = os.path.join(cache_dir, "ios")
- resources["osx_gl_cache_location"] = os.path.join(cache_dir, "osx_gl")
+ resources["mac_cache_location"] = os.path.join(cache_dir, "mac")
resources["provo_cache_location"] = os.path.join(cache_dir, "provo")
- resources["all_platforms"] = ["pc", "es3", "ios", "osx_gl", "provo"]
+ resources["all_platforms"] = ["pc", "android", "ios", "mac", "provo"]
return resources
diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/bundler_batch_setup_fixture.py b/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/bundler_batch_setup_fixture.py
index 580816e7b5..7a85cb1813 100755
--- a/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/bundler_batch_setup_fixture.py
+++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/bundler_batch_setup_fixture.py
@@ -54,7 +54,7 @@ def bundler_batch_setup_fixture(request, workspace, asset_processor, timeout) ->
platforms = [platform.strip() for platform in platforms.split(",")]
else:
# No commandline argument provided, default to mac and pc
- platforms = ["pc", "osx_gl"]
+ platforms = ["pc", "mac"]
class BundlerBatchFixture:
"""
@@ -241,11 +241,11 @@ def bundler_batch_setup_fixture(request, workspace, asset_processor, timeout) ->
def get_platform_flag(self, platform_name: str) -> int:
if (platform_name == "pc"):
return 1
- elif (platform_name == "es3"):
+ elif (platform_name == "android"):
return 2
elif (platform_name == "ios"):
return 4
- elif (platform_name == "osx_gl"):
+ elif (platform_name == "mac"):
return 8
elif (platform_name == "server"):
return 128
diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_bundler_batch_tests.py b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_bundler_batch_tests.py
index d236e87aa2..8738e8acdf 100755
--- a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_bundler_batch_tests.py
+++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_bundler_batch_tests.py
@@ -460,9 +460,9 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
"""
helper = bundler_batch_helper
# fmt:off
- assert "pc" in helper["platforms"] and "osx_gl" in helper["platforms"], \
+ assert "pc" in helper["platforms"] and "mac" in helper["platforms"], \
"This test requires both PC and MAC platforms to be enabled. " \
- "Please rerun with commandline option: '--bundle_platforms=pc,osx_gl'"
+ "Please rerun with commandline option: '--bundle_platforms=pc,mac'"
# fmt:on
seed_list = os.path.join(workspace.paths.engine_root(), "Engine", "SeedAssetList.seed") # Engine seed list
@@ -502,7 +502,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
for bundle_file in bundle_files.values():
assert os.path.isfile(bundle_file)
- # This asset is created on osx_gl platform but not on windows
+ # This asset is created on mac platform but not on windows
file_to_check = b"engineassets/shading/defaultprobe_cm.dds.5" # [use byte str because file is in binary]
# Extract the delta catalog file from pc archive. {file_to_check} SHOULD NOT be present for PC
@@ -512,11 +512,11 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
f"{file_to_check} was found in DeltaCatalog.xml in pc bundle file {bundle_files['pc']}"
# fmt:on
- # Extract the delta catalog file from osx_gl archive. {file_to_check} SHOULD be present for MAC
- file_contents = helper.extract_file_content(bundle_files["osx_gl"], "DeltaCatalog.xml")
+ # Extract the delta catalog file from mac archive. {file_to_check} SHOULD be present for MAC
+ file_contents = helper.extract_file_content(bundle_files["mac"], "DeltaCatalog.xml")
# fmt:off
assert file_to_check in file_contents, \
- f"{file_to_check} was not found in DeltaCatalog.xml in darwin bundle file {bundle_files['osx_gl']}"
+ f"{file_to_check} was not found in DeltaCatalog.xml in darwin bundle file {bundle_files['mac']}"
# fmt:on
# Gather checksums for first set of bundles
@@ -613,7 +613,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
helper.call_seeds(
seedListFile=helper["seed_list_file"],
addSeed=test_asset,
- platform="pc,osx_gl",
+ platform="pc,mac",
)
# Validate both mac and pc are activated for seed
@@ -626,7 +626,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
helper.call_seeds(
seedListFile=helper["seed_list_file"],
removePlatformFromSeeds="",
- platform="osx_gl",
+ platform="mac",
)
# Validate only pc platform for seed. Save file contents to variable
all_lines = check_seed_platform(helper["seed_list_file"], test_asset, helper["platform_values"]["pc"])
@@ -646,7 +646,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
helper.call_seeds(
seedListFile=helper["seed_list_file"],
addPlatformToSeeds="",
- platform="osx_gl",
+ platform="mac",
)
# Validate Mac platform was added back on. Save file contents
# fmt:off
@@ -670,7 +670,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
helper.call_seeds(
seedListFile=helper["seed_list_file"],
removeSeed=test_asset,
- platform="pc,osx_gl",
+ platform="pc,mac",
)
# Validate seed was removed from file
@@ -697,9 +697,9 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
env = ap_setup_fixture
# fmt:off
- assert "pc" in helper["platforms"] and "osx_gl" in helper["platforms"], \
+ assert "pc" in helper["platforms"] and "mac" in helper["platforms"], \
"This test requires both PC and MAC platforms to be enabled. " \
- "Please rerun with commandline option: '--bundle_platforms=pc,osx_gl'"
+ "Please rerun with commandline option: '--bundle_platforms=pc,mac'"
# fmt:on
# Test assets arranged in common lists: six (0-5) .txt files and .dat files
@@ -717,16 +717,16 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
file_platforms = {
"txtfile_0.txt": "pc",
"txtfile_1.txt": "pc",
- "txtfile_2.txt": "pc,osx_gl",
- "txtfile_3.txt": "pc,osx_gl",
- "txtfile_4.txt": "osx_gl",
- "txtfile_5.txt": "osx_gl",
+ "txtfile_2.txt": "pc,mac",
+ "txtfile_3.txt": "pc,mac",
+ "txtfile_4.txt": "mac",
+ "txtfile_5.txt": "mac",
"datfile_0.dat": "pc",
"datfile_1.dat": "pc",
- "datfile_2.dat": "pc,osx_gl",
- "datfile_3.dat": "pc,osx_gl",
- "datfile_4.dat": "osx_gl",
- "datfile_5.dat": "osx_gl",
+ "datfile_2.dat": "pc,mac",
+ "datfile_3.dat": "pc,mac",
+ "datfile_4.dat": "mac",
+ "datfile_5.dat": "mac",
}
# Comparison rules files and their associated 'comparisonType' flags
@@ -741,7 +741,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
# Get our test assets ready and processed
utils.prepare_test_assets(env["tests_dir"], "C16877178", env["project_test_assets_dir"])
- asset_processor.batch_process(timeout=timeout, fastscan=False, platforms="pc,osx_gl")
+ asset_processor.batch_process(timeout=timeout, fastscan=False, platforms="pc,mac")
# *** Some helper functions *** #
@@ -759,7 +759,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
helper.call_assetLists(
assetListFile=os.path.join(helper["test_dir"], asset_list_file_name),
seedListFile=os.path.join(helper["test_dir"], seed_file_name),
- platform="pc,osx_gl",
+ platform="pc,mac",
)
def get_platform_assets(asset_name_list: List[str]) -> Dict[str, List[str]]:
@@ -769,7 +769,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
for asset_name in asset_name_list:
if "pc" in file_platforms[asset_name]:
win_assets.append(asset_name)
- if "osx_gl" in file_platforms[asset_name]:
+ if "mac" in file_platforms[asset_name]:
mac_assets.append(asset_name)
return {"win": win_assets, "mac": mac_assets}
@@ -798,7 +798,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
# Get platform result file names
win_asset_list_file = helper.platform_file_name(request_file, platforms["pc"])
- mac_asset_list_file = helper.platform_file_name(request_file, platforms["osx_gl"])
+ mac_asset_list_file = helper.platform_file_name(request_file, platforms["mac"])
# Get expected platforms for each asset in asset_names
platform_files = get_platform_assets(asset_names)
@@ -879,14 +879,14 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
# fmt:on
# End verify_asset_list_contents()
- def run_compare_command_and_verify(platform_arg: str, expect_pc_output: bool, expect_osx_gl_output: bool) -> None:
+ def run_compare_command_and_verify(platform_arg: str, expect_pc_output: bool, expect_mac_output: bool) -> None:
# Expected asset list to equal result of comparison
expected_pc_asset_list = None
- expected_osx_gl_asset_list = None
+ expected_mac_asset_list = None
# Last output file. Use this for comparison to 'expected'
output_pc_asset_list = None
- output_osx_gl_asset_list = None
+ output_mac_asset_list = None
# Add the platform to the file name to match what the Bundler will create
last_output_arg = output_arg.split(",")[-1]
@@ -895,10 +895,10 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
expected_pc_asset_list = os.path.join(helper["test_dir"], helper.platform_file_name(expected_asset_list, platform))
output_pc_asset_list = helper.platform_file_name(last_output_arg, platform)
- if expect_osx_gl_output:
- platform = platforms["osx_gl"]
- expected_osx_gl_asset_list = os.path.join(helper["test_dir"], helper.platform_file_name(expected_asset_list, platform))
- output_osx_gl_asset_list = helper.platform_file_name(last_output_arg, platform)
+ if expect_mac_output:
+ platform = platforms["mac"]
+ expected_mac_asset_list = os.path.join(helper["test_dir"], helper.platform_file_name(expected_asset_list, platform))
+ output_mac_asset_list = helper.platform_file_name(last_output_arg, platform)
# Build execution command
cmd = generate_compare_command(platform_arg)
@@ -911,15 +911,15 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
verify_asset_list_contents(expected_pc_asset_list, output_pc_asset_list)
fs.delete([output_pc_asset_list], True, True)
- if expect_osx_gl_output:
- verify_asset_list_contents(expected_osx_gl_asset_list, output_osx_gl_asset_list)
- fs.delete([output_osx_gl_asset_list], True, True)
+ if expect_mac_output:
+ verify_asset_list_contents(expected_mac_asset_list, output_mac_asset_list)
+ fs.delete([output_mac_asset_list], True, True)
# End run_compare_command_and_verify()
# Generate command, run and validate for each platform
run_compare_command_and_verify("pc", True, False)
- run_compare_command_and_verify("osx_gl", False, True)
- run_compare_command_and_verify("pc,osx_gl", True, True)
+ run_compare_command_and_verify("mac", False, True)
+ run_compare_command_and_verify("pc,mac", True, True)
#run_compare_command_and_verify(None, True, True)
# End compare_and_check()
diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_processor_batch_tests.py b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_processor_batch_tests.py
index 50b3af1438..0d830b39e2 100755
--- a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_processor_batch_tests.py
+++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_processor_batch_tests.py
@@ -102,7 +102,7 @@ class TestsAssetProcessorBatch_AllPlatforms(object):
def test_RunAPBatch_TwoPlatforms_ExitCodeZero(self, asset_processor):
asset_processor.create_temp_asset_root()
asset_processor.enable_asset_processor_platform("pc")
- asset_processor.enable_asset_processor_platform("osx_gl")
+ asset_processor.enable_asset_processor_platform("mac")
result, _ = asset_processor.batch_process()
assert result, "AP Batch failed"
diff --git a/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_MainSuite.py b/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_MainSuite.py
index b64a592c1d..fccd750573 100644
--- a/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_MainSuite.py
+++ b/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_MainSuite.py
@@ -26,19 +26,23 @@ TEST_DIRECTORY = os.path.join(os.path.dirname(__file__), "atom_hydra_scripts")
@pytest.mark.parametrize("launcher_platform", ['windows_editor'])
@pytest.mark.parametrize("level", ["auto_test"])
class TestAtomEditorComponentsMain(object):
+ """Holds tests for Atom components."""
- @pytest.mark.test_case_id(
- "C32078130", # Display Mapper
- "C32078129", # Light
- "C32078131", # Radius Weight Modifier
- "C32078127", # PostFX Layer
- "C32078125", # Physical Sky
- "C32078115", # Global Skylight (IBL)
- "C32078121", # Exposure Control
- "C32078120", # Directional Light
- "C32078119", # DepthOfField
- "C32078118") # Decal (Atom)
def test_AtomEditorComponents_AddedToEntity(self, request, editor, level, workspace, project, launcher_platform):
+ """
+ Please review the hydra script run by this test for more specific test info.
+ Tests the following Atom components and verifies all "expected_lines" appear in Editor.log:
+ 1. Display Mapper
+ 2. Light
+ 3. Radius Weight Modifier
+ 4. PostFX Layer
+ 5. Physical Sky
+ 6. Global Skylight (IBL)
+ 7. Exposure Control
+ 8. Directional Light
+ 9. DepthOfField
+ 10. Decal (Atom)
+ """
cfg_args = [level]
expected_lines = [
diff --git a/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt
index e8f3349df4..834254134e 100644
--- a/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt
+++ b/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt
@@ -39,4 +39,19 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_
COMPONENT
Editor
)
+
+ ly_add_pytest(
+ NAME AutomatedTesting::EditorTests_Sandbox
+ TEST_SUITE sandbox
+ TEST_SERIAL
+ PATH ${CMAKE_CURRENT_LIST_DIR}
+ PYTEST_MARKS "SUITE_sandbox"
+ TIMEOUT 1500
+ RUNTIME_DEPENDENCIES
+ Legacy::Editor
+ AZ::AssetProcessor
+ AutomatedTesting.Assets
+ COMPONENT
+ Editor
+ )
endif()
diff --git a/AutomatedTesting/Gem/PythonTests/editor/test_Docking.py b/AutomatedTesting/Gem/PythonTests/editor/test_Docking.py
index c2d515e250..f887560a19 100644
--- a/AutomatedTesting/Gem/PythonTests/editor/test_Docking.py
+++ b/AutomatedTesting/Gem/PythonTests/editor/test_Docking.py
@@ -39,7 +39,7 @@ class TestDocking(object):
file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True)
@pytest.mark.test_case_id("C6376081")
- @pytest.mark.SUITE_periodic
+ @pytest.mark.SUITE_sandbox
def test_Docking_BasicDockedTools(self, request, editor, level, launcher_platform):
expected_lines = [
"The tools are all docked together in a tabbed widget",
diff --git a/AutomatedTesting/Gem/PythonTests/editor/test_Menus.py b/AutomatedTesting/Gem/PythonTests/editor/test_Menus.py
index 70a22f9e2a..c2da1343de 100644
--- a/AutomatedTesting/Gem/PythonTests/editor/test_Menus.py
+++ b/AutomatedTesting/Gem/PythonTests/editor/test_Menus.py
@@ -39,7 +39,7 @@ class TestMenus(object):
file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True)
@pytest.mark.test_case_id("C16780783", "C2174438")
- @pytest.mark.SUITE_periodic
+ @pytest.mark.SUITE_sandbox
def test_Menus_EditMenuOptions_Work(self, request, editor, level, launcher_platform):
expected_lines = [
"Undo Action triggered",
@@ -113,7 +113,7 @@ class TestMenus(object):
)
@pytest.mark.test_case_id("C16780778")
- @pytest.mark.SUITE_periodic
+ @pytest.mark.SUITE_sandbox
def test_Menus_FileMenuOptions_Work(self, request, editor, level, launcher_platform):
expected_lines = [
"New Level Action triggered",
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/largeworlds/CMakeLists.txt
index 72e3bec3df..c7fd43c7b2 100644
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/CMakeLists.txt
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/CMakeLists.txt
@@ -13,22 +13,21 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_
## DynVeg ##
- # Temporarily moving all tests to periodic suite - SPEC-6553
- #ly_add_pytest(
- # NAME AutomatedTesting::DynamicVegetationTests_Main
- # TEST_SERIAL
- # TEST_SUITE main
- # PATH ${CMAKE_CURRENT_LIST_DIR}/dyn_veg
- # PYTEST_MARKS "not SUITE_sandbox and not SUITE_periodic and not SUITE_benchmark"
- # TIMEOUT 1500
- # RUNTIME_DEPENDENCIES
- # AZ::AssetProcessor
- # Legacy::Editor
- # AutomatedTesting.GameLauncher
- # AutomatedTesting.Assets
- # COMPONENT
- # LargeWorlds
- #)
+ ly_add_pytest(
+ NAME AutomatedTesting::DynamicVegetationTests_Main
+ TEST_SERIAL
+ TEST_SUITE main
+ PATH ${CMAKE_CURRENT_LIST_DIR}/dyn_veg
+ PYTEST_MARKS "not SUITE_sandbox and not SUITE_periodic and not SUITE_benchmark"
+ TIMEOUT 1500
+ RUNTIME_DEPENDENCIES
+ AZ::AssetProcessor
+ Legacy::Editor
+ AutomatedTesting.GameLauncher
+ AutomatedTesting.Assets
+ COMPONENT
+ LargeWorlds
+ )
ly_add_pytest(
@@ -137,21 +136,21 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_
LargeWorlds
)
## LandscapeCanvas ##
- # Temporarily moving all tests to periodic suite - SPEC-6553
- #ly_add_pytest(
- # NAME AutomatedTesting::LandscapeCanvasTests_Main
- # TEST_SERIAL
- # TEST_SUITE main
- # PATH ${CMAKE_CURRENT_LIST_DIR}/largeworlds/landscape_canvas
- # PYTEST_MARKS "not SUITE_sandbox and not SUITE_periodic and not SUITE_benchmark"
- # TIMEOUT 1500
- # RUNTIME_DEPENDENCIES
- # AZ::AssetProcessor
- # Legacy::Editor
- # AutomatedTesting.Assets
- # COMPONENT
- # LargeWorlds
- #)
+
+ ly_add_pytest(
+ NAME AutomatedTesting::LandscapeCanvasTests_Main
+ TEST_SERIAL
+ TEST_SUITE main
+ PATH ${CMAKE_CURRENT_LIST_DIR}/landscape_canvas
+ PYTEST_MARKS "not SUITE_sandbox and not SUITE_periodic and not SUITE_benchmark"
+ TIMEOUT 1500
+ RUNTIME_DEPENDENCIES
+ AZ::AssetProcessor
+ Legacy::Editor
+ AutomatedTesting.Assets
+ COMPONENT
+ LargeWorlds
+ )
ly_add_pytest(
NAME AutomatedTesting::LandscapeCanvasTests_Periodic
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SurfaceMaskFilter_BasicSurfaceTagCreation.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SurfaceMaskFilter_BasicSurfaceTagCreation.py
index 4f58a23a19..730a557a9e 100755
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SurfaceMaskFilter_BasicSurfaceTagCreation.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SurfaceMaskFilter_BasicSurfaceTagCreation.py
@@ -23,6 +23,25 @@ class TestSurfaceMaskFilter_BasicSurfaceTagCreation(EditorTestHelper):
EditorTestHelper.__init__(self, log_prefix="TestSurfaceMaskFilter_BasicSurfaceTagCreation", args=["level"])
def run_test(self):
+ """
+ Summary:
+ Verifies basic surface tag value equality
+
+ Expected Behavior:
+ Surface tags of the same name are equal, and different names aren't.
+
+ Test Steps:
+ 1) Open level
+ 2) Create 2 new surface tags of identical names and verify they resolve as equal.
+ 3) Create another new tag of a different name and verify they resolve as different.
+
+ 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
+ """
self.log("SurfaceTag test started")
# Create a level
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/VegetationInstances_DespawnWhenOutOfRange.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/VegetationInstances_DespawnWhenOutOfRange.py
index c25761d655..46c5483988 100755
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/VegetationInstances_DespawnWhenOutOfRange.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/VegetationInstances_DespawnWhenOutOfRange.py
@@ -33,6 +33,25 @@ class TestVegetationInstances_DespawnWhenOutOfRange(EditorTestHelper):
EditorTestHelper.__init__(self, log_prefix='VegetationInstances_DespawnWhenOutOfRange', args=['level'])
def run_test(self):
+ """
+ Summary:
+ Verifies that vegetation instances properly spawn/despawn based on camera range.
+
+ Expected Behavior:
+ Vegetation instances despawn when out of camera range.
+
+ Test Steps:
+ 1) Create a new level
+ 2) Create a simple vegetation area, and set the view position near the spawner. Verify instances plant.
+ 3) Move the view position away from the spawner. Verify instances despawn.
+
+ 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
+ """
# Create a new level
self.test_success = self.create_level(
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/test_DynamicSliceInstanceSpawner.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/test_DynamicSliceInstanceSpawner.py
index 9898570692..ead1e8779c 100755
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/test_DynamicSliceInstanceSpawner.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/test_DynamicSliceInstanceSpawner.py
@@ -41,7 +41,7 @@ class TestDynamicSliceInstanceSpawner(object):
return console
@pytest.mark.test_case_id("C28851763")
- @pytest.mark.SUITE_periodic
+ @pytest.mark.SUITE_main
@pytest.mark.dynveg_area
@pytest.mark.parametrize("launcher_platform", ['windows_editor'])
def test_DynamicSliceInstanceSpawner_DynamicSliceSpawnerWorks(self, request, editor, level, workspace, project,
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/test_EmptyInstanceSpawner.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/test_EmptyInstanceSpawner.py
index 7bd8484cf4..ca71cd2137 100755
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/test_EmptyInstanceSpawner.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/test_EmptyInstanceSpawner.py
@@ -37,7 +37,7 @@ class TestEmptyInstanceSpawner(object):
file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True)
@pytest.mark.test_case_id("C28851762")
- @pytest.mark.SUITE_periodic
+ @pytest.mark.SUITE_main
@pytest.mark.dynveg_area
def test_EmptyInstanceSpawner_EmptySpawnerWorks(self, request, editor, level, launcher_platform):
cfg_args = [level]
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/EditorScripts/GradientGenerators_Incompatibilities.py b/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/EditorScripts/GradientGenerators_Incompatibilities.py
index cc9a15bba0..c37bc9780f 100755
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/EditorScripts/GradientGenerators_Incompatibilities.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/EditorScripts/GradientGenerators_Incompatibilities.py
@@ -28,8 +28,21 @@ class TestGradientGeneratorIncompatibilities(EditorTestHelper):
def run_test(self):
"""
Summary:
- Verify that Entities are not active when a Gradient Generator and incompatible component are both present
- on the same Entity.
+ This test verifies that components are disabled when conflicting components are present on the same entity.
+
+ Expected Behavior:
+ Gradient Generator components are incompatible with Vegetation area components.
+
+ Test Steps:
+ 1) Create a new level
+ 2) Create a new entity in the level
+ 3) Add each Gradient Generator component to an entity, and add a Vegetation Area component to the same entity
+ 4) Verify that components are only enabled when entity is free of a conflicting component
+
+ 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
"""
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/EditorScripts/GradientModifiers_Incompatibilities.py b/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/EditorScripts/GradientModifiers_Incompatibilities.py
index b7d12d074a..f2edc2924e 100755
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/EditorScripts/GradientModifiers_Incompatibilities.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/EditorScripts/GradientModifiers_Incompatibilities.py
@@ -28,8 +28,21 @@ class TestGradientModifiersIncompatibilities(EditorTestHelper):
def run_test(self):
"""
Summary:
- Verify that Entities are not active when a Gradient Modifier and incompatible component are both present
- on the same Entity.
+ This test verifies that components are disabled when conflicting components are present on the same entity.
+
+ Expected Behavior:
+ Gradient Modifier components are incompatible with Vegetation area components.
+
+ Test Steps:
+ 1) Create a new level
+ 2) Create a new entity in the level
+ 3) Add each Gradient Modifier component to an entity, and add a Vegetation Area component to the same entity
+ 4) Verify that components are only enabled when entity is free of a conflicting component
+
+ 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
"""
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/EditorScripts/GradientPreviewSettings_ClearingPinnedEntitySetsPreviewToOrigin.py b/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/EditorScripts/GradientPreviewSettings_ClearingPinnedEntitySetsPreviewToOrigin.py
index c37ee36265..45da74d6cd 100755
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/EditorScripts/GradientPreviewSettings_ClearingPinnedEntitySetsPreviewToOrigin.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/EditorScripts/GradientPreviewSettings_ClearingPinnedEntitySetsPreviewToOrigin.py
@@ -9,19 +9,6 @@ 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.
"""
-"""
-The below cases are combined in this script
-C2676829
-C3961326
-C3980659
-C3980664
-C3980669
-C3416548
-C2676823
-C3961321
-C2676826
-"""
-
import os
import sys
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/EditorScripts/GradientPreviewSettings_DefaultPinnedEntityIsSelf.py b/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/EditorScripts/GradientPreviewSettings_DefaultPinnedEntityIsSelf.py
index 5a758b9d89..b8f4114d30 100755
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/EditorScripts/GradientPreviewSettings_DefaultPinnedEntityIsSelf.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/EditorScripts/GradientPreviewSettings_DefaultPinnedEntityIsSelf.py
@@ -44,7 +44,21 @@ class TestGradientPreviewSettings(EditorTestHelper):
def run_test(self):
"""
Summary:
- Verify if the current entity is set to the pin preview to shape entity by default for several components.
+ This test verifies default values for the pinned entity for Gradient Preview settings.
+
+ Expected Behavior:
+ Pinned entity is self for all gradient generator/modifiers.
+
+ Test Steps:
+ 1) Create a new level
+ 2) Create a new entity in the level
+ 3) Add each Gradient Generator component to an entity, and verify the Pin Preview to Shape property is set to
+ self
+
+ 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
"""
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/EditorScripts/GradientSurfaceTagEmitter_ComponentDependencies.py b/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/EditorScripts/GradientSurfaceTagEmitter_ComponentDependencies.py
index a16e37e0fc..8e2d0611af 100755
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/EditorScripts/GradientSurfaceTagEmitter_ComponentDependencies.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/EditorScripts/GradientSurfaceTagEmitter_ComponentDependencies.py
@@ -31,11 +31,21 @@ class TestGradientSurfaceTagEmitterDependencies(EditorTestHelper):
def run_test(self):
"""
Summary:
- Component has a dependency on a Gradient component
+ This test verifies that the Gradient Surface Tag Emitter component is dependent on a gradient component.
Expected Result:
- Component is disabled until a Gradient Generator, Modifier or Gradient Reference component
- (and any sub-dependencies) is added to the entity.
+ Gradient Surface Tag Emitter component is disabled until a Gradient Generator, Modifier or Gradient Reference
+ component (and any sub-dependencies) is added to the entity.
+
+ Test Steps:
+ 1) Open level
+ 2) Create a new entity with a Gradient Surface Tag Emitter component
+ 3) Verify the component is disabled until a dependent component is also added to the entity
+
+ 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
"""
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/EditorScripts/GradientTransform_RequiresShape.py b/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/EditorScripts/GradientTransform_RequiresShape.py
index e1e901f2f7..2311363db9 100755
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/EditorScripts/GradientTransform_RequiresShape.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/EditorScripts/GradientTransform_RequiresShape.py
@@ -28,8 +28,20 @@ class TestGradientTransformRequiresShape(EditorTestHelper):
def run_test(self):
"""
Summary:
- Verify that Gradient Transform Modifier component requires a
- Shape component before the Entity can become active.
+ This test verifies that the Gradient Transform Modifier component is dependent on a shape component.
+
+ Expected Result:
+ Gradient Transform Modifier component is disabled until a shape component is added to the entity.
+
+ Test Steps:
+ 1) Open level
+ 2) Create a new entity with a Gradient Transform Modifier component
+ 3) Verify the component is disabled until a shape component is also added to the entity
+
+ 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
"""
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/EditorScripts/ImageGradient_RequiresShape.py b/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/EditorScripts/ImageGradient_RequiresShape.py
index dab8e6928a..a5d9632fd6 100755
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/EditorScripts/ImageGradient_RequiresShape.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/EditorScripts/ImageGradient_RequiresShape.py
@@ -28,8 +28,20 @@ class TestImageGradientRequiresShape(EditorTestHelper):
def run_test(self):
"""
Summary:
- Verify that Image Gradient component requires a
- Shape component before the Entity can become active.
+ This test verifies that the Image Gradient component is dependent on a shape component.
+
+ Expected Result:
+ Gradient Transform Modifier component is disabled until a shape component is added to the entity.
+
+ Test Steps:
+ 1) Open level
+ 2) Create a new entity with a Image Gradient component
+ 3) Verify the component is disabled until a shape component is also added to the entity
+
+ 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
"""
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/AreaNodes_DependentComponentsAdded.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/AreaNodes_DependentComponentsAdded.py
index d1e0b68ef4..c41d153cfa 100755
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/AreaNodes_DependentComponentsAdded.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/AreaNodes_DependentComponentsAdded.py
@@ -33,6 +33,26 @@ class TestAreaNodeComponentDependency(EditorTestHelper):
EditorTestHelper.__init__(self, log_prefix="AreaNodeComponentDependency", args=["level"])
def run_test(self):
+ """
+ Summary:
+ This test verifies that the Landscape Canvas nodes can be added to a graph, and correctly create entities with
+ proper dependent components.
+
+ Expected Behavior:
+ All expected component dependencies are met when adding an area node to a graph.
+
+ Test Steps:
+ 1) Create a new level
+ 2) Open Landscape Canvas and create a new graph
+ 3) Drag each of the area nodes to the graph area, and ensure the proper dependent components are added
+
+ 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
+ """
def onEntityCreated(parameters):
global newEntityId
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/AreaNodes_EntityCreatedOnNodeAdd.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/AreaNodes_EntityCreatedOnNodeAdd.py
index 4e429a192b..fb977b4987 100755
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/AreaNodes_EntityCreatedOnNodeAdd.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/AreaNodes_EntityCreatedOnNodeAdd.py
@@ -33,7 +33,25 @@ class TestGradientNodeEntityCreate(EditorTestHelper):
EditorTestHelper.__init__(self, log_prefix="AreaNodeEntityCreate", args=["level"])
def run_test(self):
+ """
+ Summary:
+ This test verifies that the Landscape Canvas nodes can be added to a graph, and correctly create entities.
+ Expected Behavior:
+ New entities are created when dragging area nodes to graph area.
+
+ Test Steps:
+ 1) Create a new level
+ 2) Open Landscape Canvas and create a new graph
+ 3) Drag each of the area nodes to the graph area, and ensure a new entity is created
+
+ 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
+ """
def onEntityCreated(parameters):
global newEntityId
newEntityId = parameters[0]
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/AreaNodes_EntityRemovedOnNodeDelete.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/AreaNodes_EntityRemovedOnNodeDelete.py
index 38f8641b4c..57ba8fc006 100755
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/AreaNodes_EntityRemovedOnNodeDelete.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/AreaNodes_EntityRemovedOnNodeDelete.py
@@ -34,7 +34,26 @@ class TestAreaNodeEntityDelete(EditorTestHelper):
EditorTestHelper.__init__(self, log_prefix="AreaNodeEntityDelete", args=["level"])
def run_test(self):
-
+ """
+ Summary:
+ This test verifies that the Landscape Canvas node deletion properly cleans up entities in the Editor.
+
+ Expected Behavior:
+ Entities are removed when area nodes are deleted from a graph.
+
+ Test Steps:
+ 1) Create a new level
+ 2) Open Landscape Canvas and create a new graph
+ 3) Drag each of the area nodes to the graph area, and ensure a new entity is created
+ 4) Delete the nodes, and ensure the newly created entities are removed
+
+ 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
+ """
def onEntityCreated(parameters):
global createdEntityId
createdEntityId = parameters[0]
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/ComponentUpdates_UpdateGraph.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/ComponentUpdates_UpdateGraph.py
index 26062c01f8..60527b64d2 100755
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/ComponentUpdates_UpdateGraph.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/ComponentUpdates_UpdateGraph.py
@@ -9,24 +9,6 @@ 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.
"""
-
-"""
-C22602072 - Graph is updated when underlying components are added/removed
-
-1. Open Level.
-2. Find LandscapeCanvas named entity.
-3. Ensure Vegetation Distribution Component is present on the BushSpawner entity.
-4. Open graph and ensure Distribution Filter wrapped node is present.
-5. Delete the Vegetation Distribution Filter component from the BushSpawner entity via Entity Inspector.
-6. Ensure the Vegetation Distribution Filter component was deleted from the BushSpawner entity and node is no longer
-present in the graph.
-7. Add Vegetation Altitude Filter to the BushSpawner entity through Entity Inspector.
-8. Ensure Altitude Filter was added to the BushSpawner node in the open graph.
-9. Add a new entity with unique name as a child of the Landscape Canvas entity.
-10. Add a Box Shape component to the new child entity.
-11. Ensure Box Shape node is present on the open graph.
-"""
-
import os
import sys
@@ -50,6 +32,36 @@ class TestComponentUpdatesUpdateGraph(EditorTestHelper):
EditorTestHelper.__init__(self, log_prefix="ComponentUpdatesUpdateGraph", args=["level"])
def run_test(self):
+ """
+ Summary:
+ This test verifies that the Landscape Canvas graphs update properly when components are added/removed outside of
+ Landscape Canvas.
+
+ Expected Behavior:
+ Graphs properly reflect component changes made to entities outside of Landscape Canvas.
+
+ Test Steps:
+ 1. Open Level
+ 2. Find LandscapeCanvas named entity
+ 3. Ensure Vegetation Distribution Component is present on the BushSpawner entity
+ 4. Open graph and ensure Distribution Filter wrapped node is present
+ 5. Delete the Vegetation Distribution Filter component from the BushSpawner entity via Entity Inspector
+ 6. Ensure the Vegetation Distribution Filter component was deleted from the BushSpawner entity and node is
+ no longer present in the graph
+ 7. Add Vegetation Altitude Filter to the BushSpawner entity through Entity Inspector
+ 8. Ensure Altitude Filter was added to the BushSpawner node in the open graph
+ 9. Add a new entity with unique name as a child of the Landscape Canvas entity
+ 10. Add a Box Shape component to the new child entity
+ 11. Ensure Box Shape node is present on the open graph
+
+ 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
+ """
+
# Create a new empty level and instantiate LC_BushFlowerBlender.slice
self.test_success = self.create_level(
self.args["level"],
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/CreateNewGraph.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/CreateNewGraph.py
index 5fed13985d..4b5e03abbc 100755
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/CreateNewGraph.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/CreateNewGraph.py
@@ -37,6 +37,25 @@ class TestCreateNewGraph(EditorTestHelper):
print("New root entity created")
def run_test(self):
+ """
+ Summary:
+ This test verifies that new graphs can be created in Landscape Canvas.
+
+ Expected Behavior:
+ New graphs can be created, and proper entity is created to hold graph data with a Landscape Canvas component.
+
+ Test Steps:
+ 1) Create a new level
+ 2) Open Landscape Canvas and create a new graph
+ 3) Ensures the root entity created contains a Landscape Canvas component
+
+ 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
+ """
self.test_success = self.create_level(
self.args["level"],
heightmap_resolution=128,
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/Edit_DisabledNodeDuplication.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/Edit_DisabledNodeDuplication.py
index 7fd3f075e0..81e24b20e1 100755
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/Edit_DisabledNodeDuplication.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/Edit_DisabledNodeDuplication.py
@@ -33,7 +33,25 @@ class TestDisabledNodeDuplication(EditorTestHelper):
EditorTestHelper.__init__(self, log_prefix="DisabledNodeDuplication", args=["level"])
def run_test(self):
+ """
+ Summary:
+ This test verifies Editor stability after duplicating disabled Landscape Canvas nodes.
+ Expected Behavior:
+ Editor remains stable and free of crashes.
+
+ Test Steps:
+ 1) Create a new level
+ 2) Open Landscape Canvas and create a new graph
+ 3) Create several new nodes, disable the nodes via disabling/deleting components, and duplicate the nodes
+
+ 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
+ """
def onEntityCreated(parameters):
global newEntityId
newEntityId = parameters[0]
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/Edit_UndoNodeDelete_SliceEntity.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/Edit_UndoNodeDelete_SliceEntity.py
index 27ab6fded3..61c4cf9ac2 100755
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/Edit_UndoNodeDelete_SliceEntity.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/Edit_UndoNodeDelete_SliceEntity.py
@@ -9,17 +9,6 @@ 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.
"""
-
-"""
-C30813586 - Editor remains stable after Undoing deletion of a node on a slice entity
-
-1. Open level with instantiated slice.
-2. Open the graph.
-3. Find the BushSpawner's Vegetation Layer Spawner node.
-4. Delete the node.
-5. Undo to restore the node.
-"""
-
import os
import sys
@@ -44,7 +33,26 @@ class TestUndoNodeDeleteSlice(EditorTestHelper):
EditorTestHelper.__init__(self, log_prefix="UndoNodeDeleteSlice", args=["level"])
def run_test(self):
-
+ """
+ Summary:
+ This test verifies Editor stability after undoing the deletion of nodes on a slice entity.
+
+ Expected Behavior:
+ Editor remains stable and free of crashes.
+
+ Test Steps:
+ 1) Create a new level
+ 2) Instantiate a slice with a Landscape Canvas setup
+ 3) Find a specific node on the graph, and delete it
+ 4) Restore the node with Undo
+
+ 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
+ """
# Create a new empty level and instantiate LC_BushFlowerBlender.slice
self.test_success = self.create_level(
self.args["level"],
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GradientMixer_NodeConstruction.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GradientMixer_NodeConstruction.py
index ca3bc04f47..124baf9d2e 100755
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GradientMixer_NodeConstruction.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GradientMixer_NodeConstruction.py
@@ -34,6 +34,27 @@ class TestGradientMixerNodeConstruction(EditorTestHelper):
EditorTestHelper.__init__(self, log_prefix="GradientMixerNodeConstruction", args=["level"])
def run_test(self):
+ """
+ Summary:
+ This test verifies a Gradient Mixer vegetation setup can be constructed through Landscape Canvas.
+
+ Expected Behavior:
+ Entities contain all required components and component references after creating nodes and setting connections
+ on a Landscape Canvas graph.
+
+ Test Steps:
+ 1) Create a new level
+ 2) Open Landscape Canvas and create a new graph
+ 3) Add all necessary nodes to the graph and set connections to form a Gradient Mixer setup
+ 4) Verify all components and component references were properly set during graph construction
+
+ 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
+ """
def onEntityCreated(parameters):
global newEntityId
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GradientModifierNodes_EntityCreatedOnNodeAdd.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GradientModifierNodes_EntityCreatedOnNodeAdd.py
index d40b19e7db..aa98eb3dc3 100755
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GradientModifierNodes_EntityCreatedOnNodeAdd.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GradientModifierNodes_EntityCreatedOnNodeAdd.py
@@ -33,6 +33,25 @@ class TestGradientModifierNodeEntityCreate(EditorTestHelper):
EditorTestHelper.__init__(self, log_prefix="GradientModifierNodeEntityCreate", args=["level"])
def run_test(self):
+ """
+ Summary:
+ This test verifies that the Landscape Canvas nodes can be added to a graph, and correctly create entities.
+
+ Expected Behavior:
+ New entities are created when dragging Gradient Modifier nodes to graph area.
+
+ Test Steps:
+ 1) Create a new level
+ 2) Open Landscape Canvas and create a new graph
+ 3) Drag each of the Gradient Modifier nodes to the graph area, and ensure a new entity is created
+
+ 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
+ """
def onEntityCreated(parameters):
global newEntityId
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GradientModifierNodes_EntityRemovedOnNodeDelete.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GradientModifierNodes_EntityRemovedOnNodeDelete.py
index dc263924d1..6a82b05039 100755
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GradientModifierNodes_EntityRemovedOnNodeDelete.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GradientModifierNodes_EntityRemovedOnNodeDelete.py
@@ -34,7 +34,26 @@ class TestGradientModifierNodeEntityDelete(EditorTestHelper):
EditorTestHelper.__init__(self, log_prefix="GradientModifierNodeEntityDelete", args=["level"])
def run_test(self):
-
+ """
+ Summary:
+ This test verifies that the Landscape Canvas node deletion properly cleans up entities in the Editor.
+
+ Expected Behavior:
+ Entities are removed when Gradient Modifier nodes are deleted from a graph.
+
+ Test Steps:
+ 1) Create a new level
+ 2) Open Landscape Canvas and create a new graph
+ 3) Drag each of the Gradient Modifier nodes to the graph area, and ensure a new entity is created
+ 4) Delete the nodes, and ensure the newly created entities are removed
+
+ 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
+ """
def onEntityCreated(parameters):
global createdEntityId
createdEntityId = parameters[0]
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GradientNodes_DependentComponentsAdded.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GradientNodes_DependentComponentsAdded.py
index 5e203e1892..f9360fe356 100755
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GradientNodes_DependentComponentsAdded.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GradientNodes_DependentComponentsAdded.py
@@ -33,6 +33,27 @@ class TestGradientNodeComponentDependency(EditorTestHelper):
EditorTestHelper.__init__(self, log_prefix="GradientNodeComponentDependency", args=["level"])
def run_test(self):
+ """
+ Summary:
+ This test verifies that the Landscape Canvas nodes can be added to a graph, and correctly create entities with
+ proper dependent components.
+
+ Expected Behavior:
+ All expected component dependencies are met when adding a Gradient Modifier node to a graph.
+
+ Test Steps:
+ 1) Create a new level
+ 2) Open Landscape Canvas and create a new graph
+ 3) Drag each of the Gradient Modifier nodes to the graph area, and ensure the proper dependent components are
+ added
+
+ 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
+ """
def onEntityCreated(parameters):
global newEntityId
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GradientNodes_EntityCreatedOnNodeAdd.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GradientNodes_EntityCreatedOnNodeAdd.py
index 6d4a2f58a7..8aaad9b81d 100755
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GradientNodes_EntityCreatedOnNodeAdd.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GradientNodes_EntityCreatedOnNodeAdd.py
@@ -32,6 +32,25 @@ class TestGradientNodeEntityCreate(EditorTestHelper):
EditorTestHelper.__init__(self, log_prefix="GradientNodeEntityCreate", args=["level"])
def run_test(self):
+ """
+ Summary:
+ This test verifies that the Landscape Canvas nodes can be added to a graph, and correctly create entities.
+
+ Expected Behavior:
+ New entities are created when dragging Gradient nodes to graph area.
+
+ Test Steps:
+ 1) Create a new level
+ 2) Open Landscape Canvas and create a new graph
+ 3) Drag each of the Gradient nodes to the graph area, and ensure a new entity is created
+
+ 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
+ """
def onEntityCreated(parameters):
global newEntityId
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GradientNodes_EntityRemovedOnNodeDelete.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GradientNodes_EntityRemovedOnNodeDelete.py
index 2b49e3a911..d74b86d0bf 100755
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GradientNodes_EntityRemovedOnNodeDelete.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GradientNodes_EntityRemovedOnNodeDelete.py
@@ -34,6 +34,26 @@ class TestGradientNodeEntityDelete(EditorTestHelper):
EditorTestHelper.__init__(self, log_prefix="GradientNodeEntityDelete", args=["level"])
def run_test(self):
+ """
+ Summary:
+ This test verifies that the Landscape Canvas node deletion properly cleans up entities in the Editor.
+
+ Expected Behavior:
+ Entities are removed when Gradient nodes are deleted from a graph.
+
+ Test Steps:
+ 1) Create a new level
+ 2) Open Landscape Canvas and create a new graph
+ 3) Drag each of the Gradient nodes to the graph area, and ensure a new entity is created
+ 4) Delete the nodes, and ensure the newly created entities are removed
+
+ 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
+ """
def onEntityCreated(parameters):
global createdEntityId
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GraphClosed_OnEntityDelete.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GraphClosed_OnEntityDelete.py
index d3ad5c1c1e..6aa539b554 100755
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GraphClosed_OnEntityDelete.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GraphClosed_OnEntityDelete.py
@@ -31,6 +31,26 @@ class TestGraphClosedOnEntityDelete(EditorTestHelper):
EditorTestHelper.__init__(self, log_prefix="GraphClosedOnEntityDelete", args=["level"])
def run_test(self):
+ """
+ Summary:
+ This test verifies that Landscape Canvas graphs are auto-closed when the corresponding entity is deleted.
+
+ Expected Behavior:
+ When a Landscape Canvas root entity is deleted, the corresponding graph automatically closes.
+
+ Test Steps:
+ 1) Create a new level
+ 2) Open Landscape Canvas and create a new graph
+ 3) Delete the automatically created entity
+ 4) Verify the open graph is closed
+
+ 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
+ """
def onEntityCreated(parameters):
global newRootEntityId
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GraphClosed_OnLevelChange.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GraphClosed_OnLevelChange.py
index b7b0008eb2..ebc75ab621 100755
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GraphClosed_OnLevelChange.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GraphClosed_OnLevelChange.py
@@ -29,7 +29,26 @@ class TestGraphClosedOnLevelChange(EditorTestHelper):
EditorTestHelper.__init__(self, log_prefix="GraphClosedOnLevelChange", args=["level"])
def run_test(self):
-
+ """
+ Summary:
+ This test verifies that Landscape Canvas graphs are auto-closed when the currently open level changes.
+
+ Expected Behavior:
+ When a new level is loaded in the Editor, open Landscape Canvas graphs are automatically closed.
+
+ Test Steps:
+ 1) Create a new level
+ 2) Open Landscape Canvas and create a new graph
+ 3) Open a different level
+ 4) Verify the open graph is closed
+
+ 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
+ """
# Create a new empty level
self.test_success = self.create_level(
self.args["level"],
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GraphClosed_TabbedGraph.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GraphClosed_TabbedGraph.py
index efd1cc5a55..4b018aeb45 100755
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GraphClosed_TabbedGraph.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GraphClosed_TabbedGraph.py
@@ -29,6 +29,26 @@ class TestGraphClosedTabbedGraph(EditorTestHelper):
EditorTestHelper.__init__(self, log_prefix="GraphClosedTabbedGraph", args=["level"])
def run_test(self):
+ """
+ Summary:
+ This test verifies that Landscape Canvas tabbed graphs can be independently closed.
+
+ Expected Behavior:
+ Closing a tabbed graph only closes the appropriate graph.
+
+ Test Steps:
+ 1) Create a new level
+ 2) Open Landscape Canvas and create several new graphs
+ 3) Close one of the open graphs
+ 4) Ensure the graph properly closed, and other open graphs remain open
+
+ 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
+ """
# Create a new empty level
self.test_success = self.create_level(
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GraphUpdates_UpdateComponents.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GraphUpdates_UpdateComponents.py
index f350d37178..f94a6c2e3a 100755
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GraphUpdates_UpdateComponents.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GraphUpdates_UpdateComponents.py
@@ -9,21 +9,6 @@ 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.
"""
-
-"""
-C22715182 - Components are updated when nodes are added/removed/updated
-
-1. Open Level.
-2. Open the graph on LC_BushFlowerBlender.slice
-3. Find the Rotation Modifier node on the BushSpawner entity
-4. Delete the Rotation Modifier node
-5. Ensure the Vegetation Rotation Modifier component is removed from the BushSpawner entity
-6. Delete the Vegetation Layer Spawner node from the graph
-7. Ensure BushSpawner entity is deleted
-8. Change connection from second Rotation Modifier node to a different Gradient
-9. Ensure Gradient reference on component is updated
-"""
-
import os
import sys
@@ -50,6 +35,31 @@ class TestGraphUpdatesUpdateComponents(EditorTestHelper):
EditorTestHelper.__init__(self, log_prefix="GraphUpdatesUpdateComponents", args=["level"])
def run_test(self):
+ """
+ Summary:
+ This test verifies that components are properly updated as nodes are added/removed/updated.
+
+ Expected Behavior:
+ Landscape Canvas node CRUD properly updates component entities.
+
+ Test Steps:
+ 1. Open Level.
+ 2. Open the graph on LC_BushFlowerBlender.slice
+ 3. Find the Rotation Modifier node on the BushSpawner entity
+ 4. Delete the Rotation Modifier node
+ 5. Ensure the Vegetation Rotation Modifier component is removed from the BushSpawner entity
+ 6. Delete the Vegetation Layer Spawner node from the graph
+ 7. Ensure BushSpawner entity is deleted
+ 8. Change connection from second Rotation Modifier node to a different Gradient
+ 9. Ensure Gradient reference on component is updated
+
+ 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
+ """
# Create a new empty level and instantiate LC_BushFlowerBlender.slice
self.test_success = self.create_level(
self.args["level"],
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/LandscapeCanvasComponent_AddedRemoved.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/LandscapeCanvasComponent_AddedRemoved.py
index 176429885f..c3857e1393 100755
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/LandscapeCanvasComponent_AddedRemoved.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/LandscapeCanvasComponent_AddedRemoved.py
@@ -30,6 +30,26 @@ class TestLandscapeCanvasComponentAddedRemoved(EditorTestHelper):
EditorTestHelper.__init__(self, log_prefix="LandscapeCanvasComponentAddedRemoved", args=["level"])
def run_test(self):
+ """
+ Summary:
+ This test verifies that the Landscape Canvas component can be added to/removed from an entity.
+
+ Expected Behavior:
+ Closing a tabbed graph only closes the appropriate graph.
+
+ Test Steps:
+ 1) Create a new level
+ 2) Create a new entity
+ 3) Add a Landscape Canvas component to the entity
+ 4) Remove the Landscape Canvas component from the entity
+
+ 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
+ """
# Create a new empty level
self.test_success = self.create_level(
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/LandscapeCanvas_SliceCreateInstantiate.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/LandscapeCanvas_SliceCreateInstantiate.py
index e0f13adaa9..f174a52610 100755
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/LandscapeCanvas_SliceCreateInstantiate.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/LandscapeCanvas_SliceCreateInstantiate.py
@@ -30,12 +30,21 @@ class TestLandscapeCanvasSliceCreateInstantiate(EditorTestHelper):
def run_test(self):
"""
Summary:
- C22602016 A slice containing the LandscapeCanvas component can be created/instantiated.
+ A slice containing the LandscapeCanvas component can be created/instantiated.
Expected Result:
- Slice is created and processed successfully and free of errors/warnings.
- Another copy of the slice is instantiated.
-
+ Slice is created/processed/instantiated successfully and free of errors/warnings.
+
+ Test Steps:
+ 1) Create a new level
+ 2) Create a new entity with a Landscape Canvas component
+ 3) Create a slice of the new entity
+ 4) Instantiate a new copy of the slice
+
+ 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
"""
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/LayerBlender_NodeConstruction.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/LayerBlender_NodeConstruction.py
index ecc529b9b4..82a2abf5ea 100755
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/LayerBlender_NodeConstruction.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/LayerBlender_NodeConstruction.py
@@ -34,6 +34,27 @@ class TestLayerBlenderNodeConstruction(EditorTestHelper):
EditorTestHelper.__init__(self, log_prefix="LayerBlenderNodeConstruction", args=["level"])
def run_test(self):
+ """
+ Summary:
+ This test verifies a Layer Blender vegetation setup can be constructed through Landscape Canvas.
+
+ Expected Behavior:
+ Entities contain all required components and component references after creating nodes and setting connections
+ on a Landscape Canvas graph.
+
+ Test Steps:
+ 1) Create a new level
+ 2) Open Landscape Canvas and create a new graph
+ 3) Add all necessary nodes to the graph and set connections to form a Layer Blender setup
+ 4) Verify all components and component references were properly set during graph construction
+
+ 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
+ """
def onEntityCreated(parameters):
global newEntityId
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/LayerExtenderNodes_ComponentEntitySync.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/LayerExtenderNodes_ComponentEntitySync.py
index 00fcb5170c..df3c549fff 100755
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/LayerExtenderNodes_ComponentEntitySync.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/LayerExtenderNodes_ComponentEntitySync.py
@@ -34,6 +34,25 @@ class TestLayerExtenderNodeComponentEntitySync(EditorTestHelper):
EditorTestHelper.__init__(self, log_prefix="LayerExtenderNodeComponentEntitySync", args=["level"])
def run_test(self):
+ """
+ Summary:
+ This test verifies that all wrapped nodes can be successfully added to/removed from parent nodes.
+
+ Expected Behavior:
+ All wrapped extender nodes can be added to/removed from appropriate parent nodes.
+
+ Test Steps:
+ 1) Create a new level
+ 2) Open Landscape Canvas and create a new graph
+ 3) Add Area Blender and Layer Spawner nodes to the graph, and add/remove each extender node to/from each
+
+ 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
+ """
def onEntityCreated(parameters):
global newEntityId
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/ShapeNodes_EntityCreatedOnNodeAdd.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/ShapeNodes_EntityCreatedOnNodeAdd.py
index bd10e5f4c6..cd4915ea24 100755
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/ShapeNodes_EntityCreatedOnNodeAdd.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/ShapeNodes_EntityCreatedOnNodeAdd.py
@@ -33,6 +33,25 @@ class TestShapeNodeEntityCreate(EditorTestHelper):
EditorTestHelper.__init__(self, log_prefix="ShapeNodeEntityCreate", args=["level"])
def run_test(self):
+ """
+ Summary:
+ This test verifies that the Landscape Canvas nodes can be added to a graph, and correctly create entities.
+
+ Expected Behavior:
+ New entities are created when dragging shape nodes to graph area.
+
+ Test Steps:
+ 1) Create a new level
+ 2) Open Landscape Canvas and create a new graph
+ 3) Drag each of the shape nodes to the graph area, and ensure a new entity is created
+
+ 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
+ """
def onEntityCreated(parameters):
global newEntityId
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/ShapeNodes_EntityRemovedOnNodeDelete.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/ShapeNodes_EntityRemovedOnNodeDelete.py
index f71f5ae906..fcfbe03576 100755
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/ShapeNodes_EntityRemovedOnNodeDelete.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/ShapeNodes_EntityRemovedOnNodeDelete.py
@@ -34,7 +34,27 @@ class TestShapeNodeEntityDelete(EditorTestHelper):
EditorTestHelper.__init__(self, log_prefix="ShapeNodeEntityDelete", args=["level"])
def run_test(self):
-
+ """
+ Summary:
+ This test verifies that the Landscape Canvas node deletion properly cleans up entities in the Editor.
+
+ Expected Behavior:
+ Entities are removed when shape nodes are deleted from a graph.
+
+ Test Steps:
+ 1) Create a new level
+ 2) Open Landscape Canvas and create a new graph
+ 3) Drag each of the shape nodes to the graph area, and ensure a new entity is created
+ 4) Delete the nodes, and ensure the newly created entities are removed
+
+ 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
+ """
+
def onEntityCreated(parameters):
global createdEntityId
createdEntityId = parameters[0]
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/SlotConnections_UpdateComponentReferences.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/SlotConnections_UpdateComponentReferences.py
index 968f39c64d..183c3f7ccb 100755
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/SlotConnections_UpdateComponentReferences.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/SlotConnections_UpdateComponentReferences.py
@@ -33,6 +33,27 @@ class TestSlotConnectionsUpdateComponents(EditorTestHelper):
EditorTestHelper.__init__(self, log_prefix="SlotConnectionsUpdateComponents", args=["level"])
def run_test(self):
+ """
+ Summary:
+ This test verifies that the Landscape Canvas slot connections properly update component references.
+
+ Expected Behavior:
+ A reference created through slot connections in Landscape Canvas is reflected in the Entity Inspector.
+
+ Test Steps:
+ 1) Create a new level
+ 2) Open Landscape Canvas and create a new graph
+ 3) Several nodes are added to a graph, and connections are set between the nodes
+ 4) Component references are verified via Entity Inspector
+
+ 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
+ """
+
# Retrieve the proper component TypeIds per component name
componentNames = [
'Random Noise Gradient',
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_GraphComponentSync.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_GraphComponentSync.py
index efeba3b74a..855764fa6f 100755
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_GraphComponentSync.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_GraphComponentSync.py
@@ -118,7 +118,7 @@ class TestGraphComponentSync(object):
@pytest.mark.test_case_id('C15987206')
@pytest.mark.SUITE_main
- def test_LandscapeCanvas_GradientMixerNodeConstruction(self, request, editor, level, launcher_platform):
+ def test_LandscapeCanvas_GradientMixer_NodeConstruction(self, request, editor, level, launcher_platform):
"""
Verifies a Gradient Mixer can be setup in Landscape Canvas and all references are property set.
"""
@@ -141,7 +141,7 @@ class TestGraphComponentSync(object):
@pytest.mark.test_case_id('C21333743')
@pytest.mark.SUITE_periodic
- def test_LandscapeCanvas_LayerBlenderNodeConstruction(self, request, editor, level, launcher_platform):
+ def test_LandscapeCanvas_LayerBlender_NodeConstruction(self, request, editor, level, launcher_platform):
"""
Verifies a Layer Blender can be setup in Landscape Canvas and all references are property set.
"""
diff --git a/AutomatedTesting/Levels/WaterSample/WaterSample.ly b/AutomatedTesting/Levels/WaterSample/WaterSample.ly
deleted file mode 100644
index b1899f3710..0000000000
--- a/AutomatedTesting/Levels/WaterSample/WaterSample.ly
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:d49aceca5ad4e0b9f46c8127afb5c53b68aa30272950b1abd66fba310977ff0c
-size 15032
diff --git a/AutomatedTesting/Levels/WaterSample/filelist.xml b/AutomatedTesting/Levels/WaterSample/filelist.xml
deleted file mode 100644
index d14b2fdaf2..0000000000
--- a/AutomatedTesting/Levels/WaterSample/filelist.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/AutomatedTesting/Levels/WaterSample/halfsphere.cgf b/AutomatedTesting/Levels/WaterSample/halfsphere.cgf
deleted file mode 100644
index 4426d8a232..0000000000
--- a/AutomatedTesting/Levels/WaterSample/halfsphere.cgf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:5f221acd847ec8a15e1333a5163d6d0fd886b8eda46fa7b133f76ddbf1d11216
-size 41472
diff --git a/AutomatedTesting/Levels/WaterSample/halfsphere2.cgf b/AutomatedTesting/Levels/WaterSample/halfsphere2.cgf
deleted file mode 100644
index c776ff68b8..0000000000
--- a/AutomatedTesting/Levels/WaterSample/halfsphere2.cgf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:c8e5dcfbe65fd2fd8ea29a38a96e703683c544fd42b9424857b1df3718c7775a
-size 41472
diff --git a/AutomatedTesting/Levels/WaterSample/level.pak b/AutomatedTesting/Levels/WaterSample/level.pak
deleted file mode 100644
index 1753ef4b93..0000000000
--- a/AutomatedTesting/Levels/WaterSample/level.pak
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:0378911c27933302042550d5a031a5f9104296162edc2b21e44893f1b8cff969
-size 44124
diff --git a/AutomatedTesting/Levels/WaterSample/leveldata/Environment.xml b/AutomatedTesting/Levels/WaterSample/leveldata/Environment.xml
deleted file mode 100644
index 6a95c631bb..0000000000
--- a/AutomatedTesting/Levels/WaterSample/leveldata/Environment.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/AutomatedTesting/Levels/WaterSample/leveldata/TerrainTexture.xml b/AutomatedTesting/Levels/WaterSample/leveldata/TerrainTexture.xml
deleted file mode 100644
index 21741afe52..0000000000
--- a/AutomatedTesting/Levels/WaterSample/leveldata/TerrainTexture.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/AutomatedTesting/Levels/WaterSample/leveldata/TimeOfDay.xml b/AutomatedTesting/Levels/WaterSample/leveldata/TimeOfDay.xml
deleted file mode 100644
index 60ad405904..0000000000
--- a/AutomatedTesting/Levels/WaterSample/leveldata/TimeOfDay.xml
+++ /dev/null
@@ -1,356 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/AutomatedTesting/Levels/WaterSample/leveldata/VegetationMap.dat b/AutomatedTesting/Levels/WaterSample/leveldata/VegetationMap.dat
deleted file mode 100644
index dce5631cd0..0000000000
--- a/AutomatedTesting/Levels/WaterSample/leveldata/VegetationMap.dat
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:0e6a5435c928079b27796f6b202bbc2623e7e454244ddc099a3cadf33b7cb9e9
-size 63
diff --git a/AutomatedTesting/Levels/WaterSample/pool.cgf b/AutomatedTesting/Levels/WaterSample/pool.cgf
deleted file mode 100644
index 04bec52a62..0000000000
--- a/AutomatedTesting/Levels/WaterSample/pool.cgf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:12ca8f1942331abde4d58724aea22609c8d7951cc415afa6e5f1c550a14e67b0
-size 363624
diff --git a/AutomatedTesting/Levels/WaterSample/pool2.cgf b/AutomatedTesting/Levels/WaterSample/pool2.cgf
deleted file mode 100644
index 204306f8a8..0000000000
--- a/AutomatedTesting/Levels/WaterSample/pool2.cgf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:f5b525a410730d84c0b3e97396d392e1e72f4b894742ddef3de4ede5542b0f8e
-size 86148
diff --git a/AutomatedTesting/Levels/WaterSample/tags.txt b/AutomatedTesting/Levels/WaterSample/tags.txt
deleted file mode 100644
index 0d6c1880e7..0000000000
--- a/AutomatedTesting/Levels/WaterSample/tags.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-0,0,0,0,0,0
-0,0,0,0,0,0
-0,0,0,0,0,0
-0,0,0,0,0,0
-0,0,0,0,0,0
-0,0,0,0,0,0
-0,0,0,0,0,0
-0,0,0,0,0,0
-0,0,0,0,0,0
-0,0,0,0,0,0
-0,0,0,0,0,0
-0,0,0,0,0,0
diff --git a/AutomatedTesting/Levels/WaterSample/terraintexture.pak b/AutomatedTesting/Levels/WaterSample/terraintexture.pak
deleted file mode 100644
index fe3604a050..0000000000
--- a/AutomatedTesting/Levels/WaterSample/terraintexture.pak
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:8739c76e681f900923b900c9df0ef75cf421d39cabb54650c4b9ad19b6a76d85
-size 22
diff --git a/AutomatedTesting/Levels/WaterSample/woodland_canyon_river.mtl b/AutomatedTesting/Levels/WaterSample/woodland_canyon_river.mtl
deleted file mode 100644
index 4548bca421..0000000000
--- a/AutomatedTesting/Levels/WaterSample/woodland_canyon_river.mtl
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/AutomatedTesting/Objects/LumberTank/ProxyGray_ddna.tif.exportsettings b/AutomatedTesting/Objects/LumberTank/ProxyGray_ddna.tif.exportsettings
index 013c774e9e..a4e1a9a3c5 100644
--- a/AutomatedTesting/Objects/LumberTank/ProxyGray_ddna.tif.exportsettings
+++ b/AutomatedTesting/Objects/LumberTank/ProxyGray_ddna.tif.exportsettings
@@ -1 +1 @@
-/autooptimizefile=0 /M=50,50,0,50,50,50 /preset=NormalsWithSmoothness /reduce="es3:1,ios:1,osx_gl:0,pc:0,provo:0"
\ No newline at end of file
+/autooptimizefile=0 /M=50,50,0,50,50,50 /preset=NormalsWithSmoothness /reduce="android:1,ios:1,mac:0,pc:0,provo:0"
\ No newline at end of file
diff --git a/AutomatedTesting/preview.png b/AutomatedTesting/preview.png
index 2191a0ebc2..3d4fe78063 100644
--- a/AutomatedTesting/preview.png
+++ b/AutomatedTesting/preview.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:a18fae4040a22d2bb359a8ca642b97bb8f6468eeb52e2826b3b029bd8f1350b6
-size 5466
+oid sha256:40949893ed7009eeaa90b7ce6057cb6be9dfaf7b162e3c26ba9dadf985939d7d
+size 2038
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 63177e9d60..a7e42613cb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -128,6 +128,10 @@ foreach(external_directory ${LY_EXTERNAL_SUBDIRS})
endforeach()
# The following steps have to be done after all targets are registered:
+# Defer generation of the StaticModules.inl file which is needed to create the AZ::Module derived class in monolithic
+# builds until after all the targets are known
+ly_delayed_generate_static_modules_inl()
+
# 1. generate a settings registry .setreg file for all ly_add_project_dependencies() and ly_add_target_dependencies() calls
# to provide applications with the filenames of gem modules to load
# This must be done before ly_delayed_target_link_libraries() as that inserts BUILD_DEPENDENCIES as MANUALLY_ADDED_DEPENDENCIES
diff --git a/Code/CryEngine/CryCommon/ISystem.h b/Code/CryEngine/CryCommon/ISystem.h
index f863804f3d..653776f55b 100644
--- a/Code/CryEngine/CryCommon/ISystem.h
+++ b/Code/CryEngine/CryCommon/ISystem.h
@@ -125,7 +125,7 @@ enum ESystemConfigPlatform
{
CONFIG_INVALID_PLATFORM = 0,
CONFIG_PC = 1,
- CONFIG_OSX_GL = 2,
+ CONFIG_MAC = 2,
CONFIG_OSX_METAL = 3,
CONFIG_ANDROID = 4,
CONFIG_IOS = 5,
diff --git a/Code/CryEngine/CryCommon/LyShine/IDraw2d.h b/Code/CryEngine/CryCommon/LyShine/IDraw2d.h
index 16fdfceca3..76a71c9e24 100644
--- a/Code/CryEngine/CryCommon/LyShine/IDraw2d.h
+++ b/Code/CryEngine/CryCommon/LyShine/IDraw2d.h
@@ -11,7 +11,6 @@
*/
#pragma once
-#include
#include
#include
#include
@@ -84,7 +83,7 @@ public: // types
//! If this is not passed then the defaults below are used
struct TextOptions
{
- IFFont* font; //!< default is "default"
+ AZStd::string fontName; //!< default is "default"
unsigned int effectIndex; //!< default is 0
AZ::Vector3 color; //!< default is (1,1,1)
HAlign horizontalAlignment; //!< default is HAlign::Left
diff --git a/Code/CryEngine/CrySystem/System.h b/Code/CryEngine/CrySystem/System.h
index b91b1ba059..a258030f70 100644
--- a/Code/CryEngine/CrySystem/System.h
+++ b/Code/CryEngine/CrySystem/System.h
@@ -729,7 +729,7 @@ protected: // -------------------------------------------------------------
CCmdLine* m_pCmdLine;
string m_currentLanguageAudio;
- string m_systemConfigName; // computed from system_(hardwareplatform)_(assetsPlatform) - eg, system_android_es3.cfg or system_android_opengl.cfg or system_windows_pc.cfg
+ string m_systemConfigName; // computed from system_(hardwareplatform)_(assetsPlatform) - eg, system_android_android.cfg or system_windows_pc.cfg
std::vector< std::pair > m_updateTimes;
diff --git a/Code/Framework/AzAndroid/java/com/amazon/lumberyard/LumberyardActivity.java b/Code/Framework/AzAndroid/java/com/amazon/lumberyard/LumberyardActivity.java
index b5d3de8164..5c1a120df6 100644
--- a/Code/Framework/AzAndroid/java/com/amazon/lumberyard/LumberyardActivity.java
+++ b/Code/Framework/AzAndroid/java/com/amazon/lumberyard/LumberyardActivity.java
@@ -244,7 +244,7 @@ public class LumberyardActivity extends NativeActivity
boolean useMainObb = GetBooleanResource("use_main_obb");
boolean usePatchObb = GetBooleanResource("use_patch_obb");
- if (IsBootstrapInAPK() && (useMainObb || usePatchObb))
+ if (AreAssetsInAPK() && (useMainObb || usePatchObb))
{
Log.d(TAG, "Using OBB expansion files for game assets");
@@ -421,12 +421,12 @@ public class LumberyardActivity extends NativeActivity
}
////////////////////////////////////////////////////////////////
- private boolean IsBootstrapInAPK()
+ private boolean AreAssetsInAPK()
{
try
{
- InputStream bootstrap = getAssets().open("bootstrap.cfg", AssetManager.ACCESS_UNKNOWN);
- bootstrap.close();
+ InputStream engine = getAssets().open("engine.json", AssetManager.ACCESS_UNKNOWN);
+ engine.close();
return true;
}
catch (IOException exception)
diff --git a/Code/Framework/AzCore/AzCore/Android/Utils.cpp b/Code/Framework/AzCore/AzCore/Android/Utils.cpp
index efbbf50d1d..d6435c67be 100644
--- a/Code/Framework/AzCore/AzCore/Android/Utils.cpp
+++ b/Code/Framework/AzCore/AzCore/Android/Utils.cpp
@@ -148,7 +148,7 @@ namespace AZ
}
}
- AZ_Assert(false, "Failed to locate the bootstrap.cfg path");
+ AZ_Assert(false, "Failed to locate the engine.json path");
return nullptr;
}
diff --git a/Code/Framework/AzCore/AzCore/Android/Utils.h b/Code/Framework/AzCore/AzCore/Android/Utils.h
index 222fac80ad..0862d53aa4 100644
--- a/Code/Framework/AzCore/AzCore/Android/Utils.h
+++ b/Code/Framework/AzCore/AzCore/Android/Utils.h
@@ -73,8 +73,8 @@ namespace AZ
//! \return The pointer position of the relative asset path
AZ::IO::FixedMaxPath StripApkPrefix(const char* filePath);
- //! Searches application storage and the APK for bootstrap.cfg. Will return nullptr
- //! if bootstrap.cfg is not found.
+ //! Searches application storage and the APK for engine.json. Will return nullptr
+ //! if engine.json is not found.
const char* FindAssetsDirectory();
//! Calls into Java to show the splash screen on the main UI (Java) thread
diff --git a/Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp b/Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp
index 8a170f5d89..f03b1aac76 100644
--- a/Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp
+++ b/Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp
@@ -462,8 +462,6 @@ namespace AZ
// for the application root.
CalculateAppRoot();
- // Merge the bootstrap.cfg file into the Settings Registry as soon as the OSAllocator has been created.
- SettingsRegistryMergeUtils::MergeSettingsToRegistry_Bootstrap(*m_settingsRegistry);
SettingsRegistryMergeUtils::MergeSettingsToRegistry_O3deUserRegistry(*m_settingsRegistry, AZ_TRAIT_OS_PLATFORM_CODENAME, {});
SettingsRegistryMergeUtils::MergeSettingsToRegistry_CommandLine(*m_settingsRegistry, m_commandLine, executeRegDumpCommands);
SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(*m_settingsRegistry);
diff --git a/Code/Framework/AzCore/AzCore/Component/TransformBus.h b/Code/Framework/AzCore/AzCore/Component/TransformBus.h
index 2003b949e2..b180e97332 100644
--- a/Code/Framework/AzCore/AzCore/Component/TransformBus.h
+++ b/Code/Framework/AzCore/AzCore/Component/TransformBus.h
@@ -172,78 +172,10 @@ namespace AZ
//! Rotation modifiers
//! @{
- //! @deprecated Use SetLocalRotation()
- //! Sets the entity's rotation in the world.
- //! The origin of the axes is the entity's position in world space.
- //! @param eulerAnglesRadians A three-dimensional vector, containing Euler angles in radians, to rotate the entity by.
- virtual void SetRotation([[maybe_unused]] const AZ::Vector3& eulerAnglesRadians) {}
-
- //! @deprecated Use SetLocalRotation()
- //! Sets the entity's rotation around the world's X axis.
- //! The origin of the axis is the entity's position in world space.
- //! @param eulerAngleRadians The X coordinate Euler angle in radians to use for the entity's rotation.
- virtual void SetRotationX([[maybe_unused]] float eulerAngleRadian) {}
-
- //! @deprecated Use SetLocalRotation()
- //! Sets the entity's rotation around the world's Y axis.
- //! The origin of the axis is the entity's position in world space.
- //! @param eulerAngleRadians The Y coordinate Euler angle in radians to use for the entity's rotation.
- virtual void SetRotationY([[maybe_unused]] float eulerAngleRadian) {}
-
- //! @deprecated Use SetLocalRotation()
- //! Sets the entity's rotation around the world's Z axis.
- //! The origin of the axis is the entity's position in world space.
- //! @param eulerAngleRadians The Z coordinate Euler angle in radians to use for the entity's rotation.
- virtual void SetRotationZ([[maybe_unused]] float eulerAngleRadian) {}
-
- //! @deprecated Use SetLocalRotationQuaternion()
//! Sets the entity's rotation in the world in quaternion notation.
//! The origin of the axes is the entity's position in world space.
//! @param quaternion A quaternion that represents the rotation to use for the entity.
- virtual void SetRotationQuaternion([[maybe_unused]] const AZ::Quaternion& quaternion) {}
-
- //! @deprecated Use RotateAroundLocalX()
- //! Rotates the entity around the world's X axis.
- //! The origin of the axis is the entity's position in world space.
- //! @param eulerAngleRadians The Euler angle in radians by which to rotate the entity around the X axis.
- virtual void RotateByX([[maybe_unused]] float eulerAngleRadian) {}
-
- //! @deprecated Use RotateAroundLocalY()
- //! Rotates the entity around the world's Y axis.
- //! The origin of the axis is the entity's position in world space.
- //! @param eulerAngleRadians The Euler angle in radians by which to rotate the entity around the Y axis.
- virtual void RotateByY([[maybe_unused]] float eulerAngleRadian) {}
-
- //! @deprecated Use RotateAroundLocalZ()
- //! Rotates the entity around the world's Z axis.
- //! The origin of the axis is the entity's position in world space.
- //! @param eulerAngleRadians The Euler angle in radians by which to rotate the entity around the Z axis.
- virtual void RotateByZ([[maybe_unused]] float eulerAngleRadian) {}
-
- //! @deprecated Use GetLocalRotation()
- //! Gets the entity's rotation in the world in Euler angles rotation in radians.
- //! @return A three-dimensional vector, containing Euler angles in radians, that represents the entity's rotation.
- virtual AZ::Vector3 GetRotationEulerRadians() { return AZ::Vector3(FLT_MAX); }
-
- //! @deprecated Use GetLocalRotationQuaternion()
- //! Gets the entity's rotation in the world in quaternion format.
- //! @return A quaternion that represents the entity's rotation in world space.
- virtual AZ::Quaternion GetRotationQuaternion() { return AZ::Quaternion::CreateZero(); }
-
- //! @deprecated Use GetLocalRotation()
- //! Gets the entity's rotation around the world's X axis.
- //! @return The Euler angle in radians by which the the entity is rotated around the X axis in world space.
- virtual float GetRotationX() { return FLT_MAX; }
-
- //! @deprecated Use GetLocalRotation()
- //! Gets the entity's rotation around the world's Y axis.
- //! @return The Euler angle in radians by which the the entity is rotated around the Y axis in world space.
- virtual float GetRotationY() { return FLT_MAX; }
-
- //! @deprecated Use GetLocalRotation()
- //! Gets the entity's rotation around the world's Z axis.
- //! @return The Euler angle in radians by which the the entity is rotated around the Z axis in world space.
- virtual float GetRotationZ() { return FLT_MAX; }
+ virtual void SetWorldRotationQuaternion([[maybe_unused]] const AZ::Quaternion& quaternion) {}
//! Get angles in radian for each principle axis around which the world transform is
//! rotated in the order of z-axis and y-axis and then x-axis.
@@ -287,71 +219,28 @@ namespace AZ
//! Scale modifiers
//! @{
- //! @deprecated Use SetLocalScale()
- //! Scales the entity along the world's axes. The origin of the axes is the entity's position in the world.
- //! @param scale A three-dimensional vector that represents the multipliers with which to scale the entity in world space.
- virtual void SetScale([[maybe_unused]] const AZ::Vector3& scale) {}
-
- //! @deprecated Use SetLocalScaleX()
- //! Scales the entity along the world's X axis. The origin of the axis is the entity's position in the world.
- //! @param scaleX The multiplier by which to scale the entity along the X axis in world space.
- virtual void SetScaleX([[maybe_unused]] float scaleX) {}
-
- //! @deprecated Use SetLocalScaleY()
- //! Scales the entity along the world's Y axis. The origin of the axis is the entity's position in the world.
- //! @param scaleY The multiplier by which to scale the entity along the Y axis in world space.
- virtual void SetScaleY([[maybe_unused]] float scaleY) {}
-
- //! @deprecated Use SetLocalScaleZ()
- //! Scales the entity along the world's Z axis. The origin of the axis is the entity's position in the world.
- //! @param scaleZ The multiplier by which to scale the entity along the Z axis in world space.
- virtual void SetScaleZ([[maybe_unused]] float scaleZ) {}
-
- //! @deprecated Use GetLocalScale()
- //! Gets the scale of the entity in world space.
- //! @return A three-dimensional vector that represents the scale of the entity in world space.
- virtual AZ::Vector3 GetScale() { return AZ::Vector3(FLT_MAX); }
-
- //! @deprecated Use GetLocalScale()
- //! Gets the amount by which an entity is scaled along the world's X axis.
- //! @return The amount by which an entity is scaled along the X axis in world space.
- virtual float GetScaleX() { return FLT_MAX; }
-
- //! @deprecated Use GetLocalScale()
- //! Gets the amount by which an entity is scaled along the world's Y axis.
- //! @return The amount by which an entity is scaled along the Y axis in world space.
- virtual float GetScaleY() { return FLT_MAX; }
-
- //! @deprecated Use GetLocalScale()
- //! Gets the amount by which an entity is scaled along the world's Z axis.
- //! @return The amount by which an entity is scaled along the Z axis in world space.
- virtual float GetScaleZ() { return FLT_MAX; }
-
//! Set local scale of the transform.
- //! @param scale The new scale to set along three local axes.
+ //! @param scale The new scale to set.
virtual void SetLocalScale([[maybe_unused]] const AZ::Vector3& scale) {}
- //! Set local scale of the transform on x-axis.
- //! @param scaleX The new x-axis scale to set.
- virtual void SetLocalScaleX([[maybe_unused]] float scaleX) {}
+ //! Get the scale value in local space.
+ //! @return The scale value in local space.
+ virtual AZ::Vector3 GetLocalScale() { return AZ::Vector3(FLT_MAX); }
- //! Set local scale of the transform on y-axis.
- //! @param scaleY The new y-axis scale to set.
- virtual void SetLocalScaleY([[maybe_unused]] float scaleY) {}
+ //! Get the scale value in world space.
+ //! @return The scale value in world space.
+ virtual AZ::Vector3 GetWorldScale() { return AZ::Vector3(FLT_MAX); }
- //! Set local scale of the transform on z-axis.
- //! @param scaleZ The new z-axis scale to set.
- virtual void SetLocalScaleZ([[maybe_unused]] float scaleZ) {}
+ //! Set the uniform scale value in local space.
+ virtual void SetLocalUniformScale([[maybe_unused]] float scale) {}
- //! Get the scale value on each axis in local space
- //! @return The scale value of type Vector3 along each axis in local space.
- virtual AZ::Vector3 GetLocalScale() { return AZ::Vector3(FLT_MAX); }
+ //! Get the uniform scale value in local space.
+ //! @return The uniform scale value in local space.
+ virtual float GetLocalUniformScale() { return FLT_MAX; }
- //! Get the scale value on each axis in world space.
- //! Note the transform will be skewed when it is rotated and has a parent transform scaled, in which
- //! case the returned world-scale from this function will be inaccurate.
- //! @return The scale value of type Vector3 along each axis in world space.
- virtual AZ::Vector3 GetWorldScale() { return AZ::Vector3(FLT_MAX); }
+ //! Get the uniform scale value in world space.
+ //! @return The uniform scale value in world space.
+ virtual float GetWorldUniformScale() { return FLT_MAX; }
//! @}
//! Transform hierarchy
diff --git a/Code/Framework/AzCore/AzCore/Math/Quaternion.cpp b/Code/Framework/AzCore/AzCore/Math/Quaternion.cpp
index 143fe59ca7..06443c0698 100644
--- a/Code/Framework/AzCore/AzCore/Math/Quaternion.cpp
+++ b/Code/Framework/AzCore/AzCore/Math/Quaternion.cpp
@@ -348,13 +348,20 @@ namespace AZ
return result.GetW() >= 0.0f ? result : -result;
}
- const Quaternion Quaternion::CreateFromEulerAnglesDegrees(Vector3& anglesInDegrees)
+ const Quaternion Quaternion::CreateFromEulerAnglesDegrees(const Vector3& anglesInDegrees)
{
Quaternion result;
result.SetFromEulerDegrees(anglesInDegrees);
return result;
}
+ const Quaternion Quaternion::CreateFromEulerAnglesRadians(const Vector3& anglesInRadians)
+ {
+ Quaternion result;
+ result.SetFromEulerRadians(anglesInRadians);
+ return result;
+ }
+
Quaternion Quaternion::Slerp(const Quaternion& dest, float t) const
{
const float DestDot = Dot(dest);
diff --git a/Code/Framework/AzCore/AzCore/Math/Quaternion.h b/Code/Framework/AzCore/AzCore/Math/Quaternion.h
index c4502063de..4d3b6641db 100644
--- a/Code/Framework/AzCore/AzCore/Math/Quaternion.h
+++ b/Code/Framework/AzCore/AzCore/Math/Quaternion.h
@@ -83,8 +83,11 @@ namespace AZ
static Quaternion CreateShortestArc(const Vector3& v1, const Vector3& v2);
- /// Creates a quaternion using rotation in degrees about the axes. First rotated about the X axis, followed by the Y axis, then the Z axis.
- static const Quaternion CreateFromEulerAnglesDegrees(Vector3& anglesInDegrees);
+ //! Creates a quaternion using rotation in degrees about the axes. First rotated about the X axis, followed by the Y axis, then the Z axis.
+ static const Quaternion CreateFromEulerAnglesDegrees(const Vector3& anglesInDegrees);
+
+ //! Creates a quaternion using rotation in radians about the axes. First rotated about the X axis, followed by the Y axis, then the Z axis.
+ static const Quaternion CreateFromEulerAnglesRadians(const Vector3& anglesInRadians);
//! Stores the vector to an array of 4 floats. The floats need only be 4 byte aligned, 16 byte alignment is not required.
void StoreToFloat4(float* values) const;
diff --git a/Code/Framework/AzCore/AzCore/Math/Random.h b/Code/Framework/AzCore/AzCore/Math/Random.h
index 8b28f6aaad..8b2763df50 100644
--- a/Code/Framework/AzCore/AzCore/Math/Random.h
+++ b/Code/Framework/AzCore/AzCore/Math/Random.h
@@ -126,17 +126,16 @@ namespace AZ
m_offsets.fill(1); // Halton sequences start at index 1.
m_increments.fill(1); // By default increment by 1 between each number.
}
-
- //! Returns a Halton sequence in an array of N length
- template
- AZStd::array, N> GetHaltonSequence()
+
+ //! Fills a provided container from begin to end with a Halton sequence.
+ //! Entries are expected to be, or implicitly converted to, AZStd::array.
+ template
+ void FillHaltonSequence(Iterator begin, Iterator end)
{
- AZStd::array, N> result;
-
AZStd::array indices = m_offsets;
// Generator that returns the Halton number for all bases for a single entry.
- auto f = [&] ()
+ auto f = [&]()
{
AZStd::array item;
for (auto d = 0; d < Dimensions; ++d)
@@ -147,12 +146,20 @@ namespace AZ
return item;
};
- AZStd::generate(result.begin(), result.end(), f);
+ AZStd::generate(begin, end, f);
+ }
+
+ //! Returns a Halton sequence in an array of N length.
+ template
+ AZStd::array, N> GetHaltonSequence()
+ {
+ AZStd::array, N> result;
+ FillHaltonSequence(result.begin(), result.end());
return result;
}
//! Sets the offsets per dimension to start generating a sequence from.
- //! By default, there is no offset (offset of 0 corresponds to starting at index 1)
+ //! By default, there is no offset (offset of 0 corresponds to starting at index 1).
void SetOffsets(AZStd::array offsets)
{
m_offsets = offsets;
diff --git a/Code/Framework/AzCore/AzCore/Math/Spline.h b/Code/Framework/AzCore/AzCore/Math/Spline.h
index 912c10f46f..1adfc9b2fa 100644
--- a/Code/Framework/AzCore/AzCore/Math/Spline.h
+++ b/Code/Framework/AzCore/AzCore/Math/Spline.h
@@ -441,10 +441,10 @@ namespace AZ
const Transform& worldFromLocal, const Vector3& src, const Vector3& dir, const Spline& spline)
{
Transform worldFromLocalNormalized = worldFromLocal;
- const Vector3 scale = worldFromLocalNormalized.ExtractScale();
+ const float scale = worldFromLocalNormalized.ExtractUniformScale();
const Transform localFromWorldNormalized = worldFromLocalNormalized.GetInverse();
- const Vector3 localRayOrigin = localFromWorldNormalized.TransformPoint(src) * scale.GetReciprocal();
+ const Vector3 localRayOrigin = localFromWorldNormalized.TransformPoint(src) / scale;
const Vector3 localRayDirection = localFromWorldNormalized.TransformVector(dir);
return spline.GetNearestAddressRay(localRayOrigin, localRayDirection);
}
diff --git a/Code/Framework/AzCore/AzCore/Math/Transform.cpp b/Code/Framework/AzCore/AzCore/Math/Transform.cpp
index bb3f764492..9090a9e94e 100644
--- a/Code/Framework/AzCore/AzCore/Math/Transform.cpp
+++ b/Code/Framework/AzCore/AzCore/Math/Transform.cpp
@@ -284,10 +284,15 @@ namespace AZ
Method("GetRotation", &Transform::GetRotation)->
Method("SetRotation", &Transform::SetRotation)->
Method("GetScale", &Transform::GetScale)->
- Method("SetScale", &Transform::SetScale)->
+ Method("GetUniformScale", &Transform::GetUniformScale)->
+ Method("SetScale", &Transform::SetScale)->
+ Method("SetUniformScale", &Transform::SetUniformScale)->
Method("ExtractScale", &Transform::ExtractScale)->
Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::All)->
+ Method("ExtractUniformScale", &Transform::ExtractUniformScale)->
+ Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::All)->
Method("MultiplyByScale", &Transform::MultiplyByScale)->
+ Method("MultiplyByUniformScale", &Transform::MultiplyByUniformScale)->
Method("GetInverse", &Transform::GetInverse)->
Method("Invert", &Transform::Invert)->
Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::All)->
@@ -306,6 +311,7 @@ namespace AZ
Method("CreateFromMatrix3x3", &Transform::CreateFromMatrix3x3)->
Method("CreateFromMatrix3x3AndTranslation", &Transform::CreateFromMatrix3x3AndTranslation)->
Method("CreateScale", &Transform::CreateScale)->
+ Method("CreateUniformScale", &Transform::CreateUniformScale)->
Method("CreateTranslation", &Transform::CreateTranslation)->
Method("ConstructFromValuesNumeric", &Internal::ConstructTransformFromValues);
}
diff --git a/Code/Framework/AzCore/AzCore/Math/Transform.h b/Code/Framework/AzCore/AzCore/Math/Transform.h
index eb1a12a912..7ae86edd89 100644
--- a/Code/Framework/AzCore/AzCore/Math/Transform.h
+++ b/Code/Framework/AzCore/AzCore/Math/Transform.h
@@ -89,8 +89,11 @@ namespace AZ
static Transform CreateFromMatrix3x4(const Matrix3x4& value);
- //! Sets the matrix to be a scale matrix, translation is set to zero.
- static Transform CreateScale(const Vector3& scale);
+ //! Sets the transform to apply scale only, no rotation or translation.
+ static Transform CreateScale(const AZ::Vector3& scale);
+
+ //! Sets the transform to apply (uniform) scale only, no rotation or translation.
+ static Transform CreateUniformScale(const float scale);
//! Sets the matrix to be a translation matrix, rotation part is set to identity.
static Transform CreateTranslation(const Vector3& translation);
@@ -119,13 +122,19 @@ namespace AZ
const Quaternion& GetRotation() const;
void SetRotation(const Quaternion& rotation);
- const Vector3& GetScale() const;
+ Vector3 GetScale() const;
+ float GetUniformScale() const;
void SetScale(const Vector3& v);
+ void SetUniformScale(const float scale);
- //! Sets the transforms scale to a unit value and returns the previous scale value.
+ //! Sets the transform's scale to a unit value and returns the previous scale value.
Vector3 ExtractScale();
- void MultiplyByScale(const Vector3& scale);
+ //! Sets the transform's scale to a unit value and returns the previous scale value.
+ float ExtractUniformScale();
+
+ void MultiplyByScale(const AZ::Vector3& scale);
+ void MultiplyByUniformScale(float scale);
Transform operator*(const Transform& rhs) const;
Transform& operator*=(const Transform& rhs);
diff --git a/Code/Framework/AzCore/AzCore/Math/Transform.inl b/Code/Framework/AzCore/AzCore/Math/Transform.inl
index 63425e6e41..a7d5e72749 100644
--- a/Code/Framework/AzCore/AzCore/Math/Transform.inl
+++ b/Code/Framework/AzCore/AzCore/Math/Transform.inl
@@ -65,6 +65,7 @@ namespace AZ
AZ_MATH_INLINE Transform Transform::CreateScale(const Vector3& scale)
{
+ AZ_WarningOnce("Transform", false, "CreateScale is deprecated, please use CreateUniformScale instead.");
Transform result;
result.m_rotation = Quaternion::CreateIdentity();
result.m_scale = scale;
@@ -72,6 +73,15 @@ namespace AZ
return result;
}
+ AZ_MATH_INLINE Transform Transform::CreateUniformScale(float scale)
+ {
+ Transform result;
+ result.m_rotation = Quaternion::CreateIdentity();
+ result.m_scale = Vector3(scale);
+ result.m_translation = Vector3::CreateZero();
+ return result;
+ }
+
AZ_MATH_INLINE Transform Transform::CreateTranslation(const Vector3& translation)
{
Transform result;
@@ -150,24 +160,50 @@ namespace AZ
m_rotation = rotation;
}
- AZ_MATH_INLINE const Vector3& Transform::GetScale() const
+ AZ_MATH_INLINE Vector3 Transform::GetScale() const
{
+ AZ_WarningOnce("Transform", false, "GetScale is deprecated, please use GetUniformScale instead.");
return m_scale;
}
+ AZ_MATH_INLINE float Transform::GetUniformScale() const
+ {
+ return m_scale.GetMaxElement();
+ }
+
AZ_MATH_INLINE void Transform::SetScale(const Vector3& scale)
{
+ AZ_WarningOnce("Transform", false, "SetScale is deprecated, please use SetUniformScale instead.");
m_scale = scale;
}
+ AZ_MATH_INLINE void Transform::SetUniformScale(const float scale)
+ {
+ m_scale = Vector3(scale);
+ }
+
AZ_MATH_INLINE Vector3 Transform::ExtractScale()
{
+ AZ_WarningOnce("Transform", false, "ExtractScale is deprecated, please use ExtractUniformScale instead.");
const Vector3 scale = m_scale;
m_scale = Vector3::CreateOne();
return scale;
}
+ AZ_MATH_INLINE float Transform::ExtractUniformScale()
+ {
+ const float scale = m_scale.GetMaxElement();
+ m_scale = Vector3::CreateOne();
+ return scale;
+ }
+
AZ_MATH_INLINE void Transform::MultiplyByScale(const Vector3& scale)
+ {
+ AZ_WarningOnce("Transform", false, "MultiplyByScale is deprecated, please use MultiplyByUniformScale instead.");
+ m_scale *= scale;
+ }
+
+ AZ_MATH_INLINE void Transform::MultiplyByUniformScale(float scale)
{
m_scale *= scale;
}
@@ -233,7 +269,7 @@ namespace AZ
AZ_MATH_INLINE void Transform::Orthogonalize()
{
- *this = GetOrthogonalized();
+ m_scale = Vector3::CreateOne();
}
AZ_MATH_INLINE bool Transform::IsClose(const Transform& rhs, float tolerance) const
diff --git a/Code/Framework/AzCore/AzCore/Math/TransformSerializer.cpp b/Code/Framework/AzCore/AzCore/Math/TransformSerializer.cpp
index 0a3e02ee0d..86bc1c36ea 100644
--- a/Code/Framework/AzCore/AzCore/Math/TransformSerializer.cpp
+++ b/Code/Framework/AzCore/AzCore/Math/TransformSerializer.cpp
@@ -60,7 +60,7 @@ namespace AZ
{
// Scale is transitioning to a single uniform scale value, but since it's still internally represented as a Vector3,
// we need to pick one number to use for load/store operations.
- float scale = transformInstance->GetScale().GetMaxElement();
+ float scale = transformInstance->GetUniformScale();
JSR::ResultCode loadResult =
ContinueLoadingFromJsonObjectField(&scale, azrtti_typeid(), inputValue, ScaleTag, context);
@@ -124,8 +124,8 @@ namespace AZ
// Scale is transitioning to a single uniform scale value, but since it's still internally represented as a Vector3,
// we need to pick one number to use for load/store operations.
- float scale = transformInstance->GetScale().GetMaxElement();
- float defaultScale = defaultTransformInstance ? defaultTransformInstance->GetScale().GetMaxElement() : 0.0f;
+ float scale = transformInstance->GetUniformScale();
+ float defaultScale = defaultTransformInstance ? defaultTransformInstance->GetUniformScale() : 0.0f;
JSR::ResultCode storeResult = ContinueStoringToJsonObjectField(
outputValue, ScaleTag, &scale, defaultTransformInstance ? &defaultScale : nullptr, azrtti_typeid(),
diff --git a/Code/Framework/AzCore/AzCore/PlatformId/PlatformDefaults.cpp b/Code/Framework/AzCore/AzCore/PlatformId/PlatformDefaults.cpp
index 63aad1ecf4..e31c3b0a1e 100644
--- a/Code/Framework/AzCore/AzCore/PlatformId/PlatformDefaults.cpp
+++ b/Code/Framework/AzCore/AzCore/PlatformId/PlatformDefaults.cpp
@@ -19,7 +19,7 @@ namespace AZ
{
inline namespace PlatformDefaults
{
- static const char* PlatformNames[PlatformId::NumPlatformIds] = { PlatformPC, PlatformES3, PlatformIOS, PlatformOSX, PlatformProvo, PlatformSalem, PlatformJasper, PlatformServer, PlatformAll, PlatformAllClient };
+ static const char* PlatformNames[PlatformId::NumPlatformIds] = { PlatformPC, PlatformAndroid, PlatformIOS, PlatformMac, PlatformProvo, PlatformSalem, PlatformJasper, PlatformServer, PlatformAll, PlatformAllClient };
const char* PlatformIdToPalFolder(AZ::PlatformId platform)
{
@@ -31,11 +31,11 @@ namespace AZ
{
case AZ::PC:
return "PC";
- case AZ::ES3:
+ case AZ::ANDROID_ID:
return "Android";
case AZ::IOS:
return "iOS";
- case AZ::OSX:
+ case AZ::MAC_ID:
return "Mac";
case AZ::PROVO:
return "Provo";
@@ -66,11 +66,11 @@ namespace AZ
}
else if (osPlatform == PlatformCodeNameMac)
{
- return PlatformOSX;
+ return PlatformMac;
}
else if (osPlatform == PlatformCodeNameAndroid)
{
- return PlatformES3;
+ return PlatformAndroid;
}
else if (osPlatform == PlatformCodeNameiOS)
{
@@ -207,13 +207,13 @@ namespace AZ
platformCodes.emplace_back(PlatformCodeNameWindows);
platformCodes.emplace_back(PlatformCodeNameLinux);
break;
- case PlatformId::ES3:
+ case PlatformId::ANDROID_ID:
platformCodes.emplace_back(PlatformCodeNameAndroid);
break;
case PlatformId::IOS:
platformCodes.emplace_back(PlatformCodeNameiOS);
break;
- case PlatformId::OSX:
+ case PlatformId::MAC_ID:
platformCodes.emplace_back(PlatformCodeNameMac);
break;
case PlatformId::PROVO:
diff --git a/Code/Framework/AzCore/AzCore/PlatformId/PlatformDefaults.h b/Code/Framework/AzCore/AzCore/PlatformId/PlatformDefaults.h
index 2d67c860cd..ba8c55f5f5 100644
--- a/Code/Framework/AzCore/AzCore/PlatformId/PlatformDefaults.h
+++ b/Code/Framework/AzCore/AzCore/PlatformId/PlatformDefaults.h
@@ -27,9 +27,9 @@ namespace AZ
inline namespace PlatformDefaults
{
constexpr char PlatformPC[] = "pc";
- constexpr char PlatformES3[] = "es3";
+ constexpr char PlatformAndroid[] = "android";
constexpr char PlatformIOS[] = "ios";
- constexpr char PlatformOSX[] = "osx_gl";
+ constexpr char PlatformMac[] = "mac";
constexpr char PlatformProvo[] = "provo";
constexpr char PlatformSalem[] = "salem";
constexpr char PlatformJasper[] = "jasper";
@@ -54,9 +54,9 @@ namespace AZ
AZ_ENUM_WITH_UNDERLYING_TYPE(PlatformId, int,
(Invalid, -1),
PC,
- ES3,
+ ANDROID_ID,
IOS,
- OSX,
+ MAC_ID,
PROVO,
SALEM,
JASPER,
@@ -73,9 +73,9 @@ namespace AZ
{
Platform_NONE = 0x00,
Platform_PC = 1 << PlatformId::PC,
- Platform_ES3 = 1 << PlatformId::ES3,
+ Platform_ANDROID = 1 << PlatformId::ANDROID_ID,
Platform_IOS = 1 << PlatformId::IOS,
- Platform_OSX = 1 << PlatformId::OSX,
+ Platform_MAC = 1 << PlatformId::MAC_ID,
Platform_PROVO = 1 << PlatformId::PROVO,
Platform_SALEM = 1 << PlatformId::SALEM,
Platform_JASPER = 1 << PlatformId::JASPER,
@@ -87,7 +87,7 @@ namespace AZ
// A special platform that will always correspond to all non-server platforms, even if new ones are added
Platform_ALL_CLIENT = 1ULL << 31,
- AllNamedPlatforms = Platform_PC | Platform_ES3 | Platform_IOS | Platform_OSX | Platform_PROVO | Platform_SALEM | Platform_JASPER | Platform_SERVER,
+ AllNamedPlatforms = Platform_PC | Platform_ANDROID | Platform_IOS | Platform_MAC | Platform_PROVO | Platform_SALEM | Platform_JASPER | Platform_SERVER,
};
AZ_DEFINE_ENUM_BITWISE_OPERATORS(PlatformFlags);
diff --git a/Code/Framework/AzCore/AzCore/PlatformId/PlatformId.cpp b/Code/Framework/AzCore/AzCore/PlatformId/PlatformId.cpp
index 0258869a0c..d56140be28 100644
--- a/Code/Framework/AzCore/AzCore/PlatformId/PlatformId.cpp
+++ b/Code/Framework/AzCore/AzCore/PlatformId/PlatformId.cpp
@@ -28,8 +28,8 @@ namespace AZ
return "Android64";
case PlatformID::PLATFORM_APPLE_IOS:
return "iOS";
- case PlatformID::PLATFORM_APPLE_OSX:
- return "OSX";
+ case PlatformID::PLATFORM_APPLE_MAC:
+ return "Mac";
#if defined(AZ_EXPAND_FOR_RESTRICTED_PLATFORM) || defined(AZ_TOOLS_EXPAND_FOR_RESTRICTED_PLATFORMS)
#define AZ_RESTRICTED_PLATFORM_EXPANSION(CodeName, CODENAME, codename, PrivateName, PRIVATENAME, privatename, PublicName, PUBLICNAME, publicname, PublicAuxName1, PublicAuxName2, PublicAuxName3)\
case PlatformID::PLATFORM_##PUBLICNAME:\
diff --git a/Code/Framework/AzCore/AzCore/PlatformId/PlatformId.h b/Code/Framework/AzCore/AzCore/PlatformId/PlatformId.h
index ce1a11d8ce..e8e7cef6dd 100644
--- a/Code/Framework/AzCore/AzCore/PlatformId/PlatformId.h
+++ b/Code/Framework/AzCore/AzCore/PlatformId/PlatformId.h
@@ -23,7 +23,7 @@ namespace AZ
PLATFORM_WINDOWS_64,
PLATFORM_LINUX_64,
PLATFORM_APPLE_IOS,
- PLATFORM_APPLE_OSX,
+ PLATFORM_APPLE_MAC,
PLATFORM_ANDROID_64, // ARMv8 / 64-bit
#if defined(AZ_EXPAND_FOR_RESTRICTED_PLATFORM) || defined(AZ_TOOLS_EXPAND_FOR_RESTRICTED_PLATFORMS)
#define AZ_RESTRICTED_PLATFORM_EXPANSION(CodeName, CODENAME, codename, PrivateName, PRIVATENAME, privatename, PublicName, PUBLICNAME, publicname, PublicAuxName1, PublicAuxName2, PublicAuxName3)\
diff --git a/Code/Framework/AzCore/AzCore/RTTI/AzStdOnDemandReflection.inl b/Code/Framework/AzCore/AzCore/RTTI/AzStdOnDemandReflection.inl
index 079c70c878..537d3e5c83 100644
--- a/Code/Framework/AzCore/AzCore/RTTI/AzStdOnDemandReflection.inl
+++ b/Code/Framework/AzCore/AzCore/RTTI/AzStdOnDemandReflection.inl
@@ -1020,29 +1020,60 @@ namespace AZ
}
};
- /// OnDemand reflection for AZStd::set
+
+ template
+ class Iterator_VM>
+ {
+ public:
+ using ContainerType = AZStd::unordered_set;
+ using IteratorType = typename ContainerType::iterator;
+ Iterator_VM(ContainerType& container)
+ : m_iterator(container.begin())
+ , m_end(container.end())
+ {}
+
+ const t_Key& GetKeyUnchecked() const
+ {
+ return *m_iterator;
+ }
+
+ bool IsNotAtEnd() const
+ {
+ return m_iterator != m_end;
+ }
+
+ t_Key& ModValueUnchecked()
+ {
+ return *m_iterator;
+ }
+
+ void Next()
+ {
+ ++m_iterator;
+ }
+
+ private:
+ IteratorType m_iterator;
+ IteratorType m_end;
+ };
+
+ /// OnDemand reflection for AZStd::unordered_set
template
struct OnDemandReflection< AZStd::unordered_set >
{
using ContainerType = AZStd::unordered_set;
using KeyListType = AZStd::vector;
- static AZ::Outcome Erase(ContainerType& thisMap, Key& key)
+ using ValueIteratorType = Iterator_VM;
+
+ static bool EraseCheck_VM(ContainerType& thisSet, Key& key)
{
- const auto result = thisMap.erase(key);
- if (result)
- {
- return AZ::Success();
- }
- else
- {
- return AZ::Failure();
- }
+ return thisSet.erase(key) != 0;
}
- static void Insert(ContainerType& thisSet, Key& key)
+ static ContainerType& ErasePost_VM(ContainerType& thisSet, [[maybe_unused]] Key&)
{
- thisSet.insert(key);
+ return thisSet;
}
static KeyListType GetKeys(ContainerType& thisSet)
@@ -1055,6 +1086,17 @@ namespace AZ
return keys;
}
+ static ContainerType& Insert(ContainerType& thisSet, Key& key)
+ {
+ thisSet.insert(key);
+ return thisSet;
+ }
+
+ static ValueIteratorType Iterate_VM(ContainerType& thisContainer)
+ {
+ return ValueIteratorType(thisContainer);
+ }
+
static void Swap(ContainerType& thisSet, ContainerType& otherSet)
{
thisSet.swap(otherSet);
@@ -1064,33 +1106,68 @@ namespace AZ
{
if (BehaviorContext* behaviorContext = azrtti_cast(context))
{
+ BranchOnResultInfo emptyBranchInfo;
+ emptyBranchInfo.m_returnResultInBranches = true;
+ emptyBranchInfo.m_trueToolTip = "The container is empty";
+ emptyBranchInfo.m_falseToolTip = "The container is not empty";
+
auto ContainsTransparent = [](const ContainerType& containerType, typename ContainerType::key_type& key)->bool
{
return containerType.contains(key);
};
+ ExplicitOverloadInfo explicitOverloadInfo;
behaviorContext->Class()
- ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
+ ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::ListOnly)
->Attribute(AZ::ScriptCanvasAttributes::PrettyName, ScriptCanvasOnDemandReflection::OnDemandPrettyName::Get(*behaviorContext))
->Attribute(AZ::Script::Attributes::ToolTip, ScriptCanvasOnDemandReflection::OnDemandToolTip::Get(*behaviorContext))
->Attribute(AZ::Script::Attributes::Category, ScriptCanvasOnDemandReflection::OnDemandCategoryName::Get(*behaviorContext))
->Attribute(AZ::Script::Attributes::Storage, AZ::Script::Attributes::StorageType::ScriptOwn)
->Method("BucketCount", static_cast(&ContainerType::bucket_count))
- ->Method("Erase", &Erase)
- ->Method("Empty", [](ContainerType& thisSet)->bool { return thisSet.empty(); })
+ ->Method("Empty", static_cast(&ContainerType::empty), { { { "Container", "The container to check if it is empty", nullptr, {} } } })
+ ->Attribute(AZ::ScriptCanvasAttributes::ExplicitOverloadCrc, ExplicitOverloadInfo("Is Empty", "Containers"))
+ ->Attribute(AZ::ScriptCanvasAttributes::BranchOnResult, emptyBranchInfo)
+ ->Method("EraseCheck_VM", &EraseCheck_VM)
+ ->Attribute(AZ::Script::Attributes::TreatAsMemberFunction, AZ::AttributeIsValid::IfPresent)
+ ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
+ ->Method("Erase", &ErasePost_VM)
+ ->Attribute(AZ::Script::Attributes::TreatAsMemberFunction, AZ::AttributeIsValid::IfPresent)
+ ->Attribute(AZ::ScriptCanvasAttributes::ExplicitOverloadCrc, ExplicitOverloadInfo("Erase", "Containers"))
+ ->Attribute(AZ::ScriptCanvasAttributes::CheckedOperation, CheckedOperationInfo("EraseCheck_VM", {}, "Out", "Key Not Found", true))
+ ->Attribute(AZ::ScriptCanvasAttributes::OverloadArgumentGroup, AZ::OverloadArgumentGroupInfo({ "ContainerGroup", "" }, { "ContainerGroup" }))
->Method("contains", ContainsTransparent)
+ ->Attribute(AZ::ScriptCanvasAttributes::ExplicitOverloadCrc, ExplicitOverloadInfo("Has Key", "Containers"))
->Attribute(AZ::Script::Attributes::TreatAsMemberFunction, AZ::AttributeIsValid::IfPresent)
->Method("Insert", &Insert)
+ ->Attribute(AZ::Script::Attributes::TreatAsMemberFunction, AZ::AttributeIsValid::IfPresent)
+ ->Attribute(AZ::ScriptCanvasAttributes::ExplicitOverloadCrc, ExplicitOverloadInfo("Insert", "Containers"))
+ ->Attribute(AZ::ScriptCanvasAttributes::OverloadArgumentGroup, AZ::OverloadArgumentGroupInfo({ "ContainerGroup", "", "" }, { "ContainerGroup" }))
->Method(k_sizeName, [](ContainerType* thisPtr) { return aznumeric_cast(thisPtr->size()); })
->Attribute(AZ::Script::Attributes::Operator, AZ::Script::Attributes::OperatorType::Length)
->Method("GetKeys", &GetKeys)
->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
+ ->Method("GetSize", [](ContainerType& thisPtr) { return aznumeric_cast(thisPtr.size()); })
+ ->Attribute(AZ::ScriptCanvasAttributes::ExplicitOverloadCrc, ExplicitOverloadInfo("Get Size", "Containers"))
+ ->Attribute(AZ::Script::Attributes::TreatAsMemberFunction, AZ::AttributeIsValid::IfPresent)
->Method("Reserve", static_cast(&ContainerType::reserve))
->Method("Swap", &Swap)
+ ->Method("Clear", [](ContainerType& thisContainer)->ContainerType& { thisContainer.clear(); return thisContainer; })
+ ->Attribute(AZ::Script::Attributes::TreatAsMemberFunction, AZ::AttributeIsValid::IfPresent)
+ ->Attribute(AZ::ScriptCanvasAttributes::ExplicitOverloadCrc, ExplicitOverloadInfo("Clear All Elements", "Containers"))
+ ->Attribute(AZ::ScriptCanvasAttributes::OverloadArgumentGroup, AZ::OverloadArgumentGroupInfo({ "ContainerGroup" }, { "ContainerGroup" }))
+ ->Method(k_iteratorConstructorName, &Iterate_VM)
+ ;
+
+ behaviorContext->Class()
+ ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::ListOnly)
+ ->Attribute(AZ::Script::Attributes::Storage, AZ::Script::Attributes::StorageType::ScriptOwn)
+ ->Method(k_iteratorGetKeyName, &ValueIteratorType::GetKeyUnchecked)
+ ->Method(k_iteratorModValueName, &ValueIteratorType::ModValueUnchecked)
+ ->Method(k_iteratorIsNotAtEndName, &ValueIteratorType::IsNotAtEnd)
+ ->Method(k_iteratorNextName, &ValueIteratorType::Next)
;
}
}
-
};
template <>
diff --git a/Code/Framework/AzCore/AzCore/RTTI/BehaviorContext.cpp b/Code/Framework/AzCore/AzCore/RTTI/BehaviorContext.cpp
index 635d160434..31a2cfc09e 100644
--- a/Code/Framework/AzCore/AzCore/RTTI/BehaviorContext.cpp
+++ b/Code/Framework/AzCore/AzCore/RTTI/BehaviorContext.cpp
@@ -165,7 +165,7 @@ namespace AZ
if (HasResult() != overload->HasResult())
{
- AZ_Error("Reflection", false, "Overload failure, all methods must have the same result, or none at all");
+ AZ_Error("Reflection", false, "Overload failure, all methods must have the same result, or none at all: %s", m_name.c_str());
return false;
}
@@ -176,7 +176,7 @@ namespace AZ
if (!(methodResult->m_typeId == overloadResult->m_typeId && methodResult->m_traits == overloadResult->m_traits))
{
- AZ_Error("Reflection", false, "Overload failure, all methods must have the same result, or none at all");
+ AZ_Error("Reflection", false, "Overload failure, all methods must have the same result, or none at all: %s", m_name.c_str());
return false;
}
}
@@ -575,7 +575,7 @@ namespace AZ
}
else
{
- AZ_Error("BehaviorContext", false, "safety check declared for method %s but it was not found in the class");
+ AZ_Error("BehaviorContext", false, "Method: %s, declared safety check: %s, but it was not found in class: %s", method.m_name.c_str(), m_name.c_str(), checkedOperationInfo.m_safetyCheckName.c_str());
}
}
}
diff --git a/Code/Framework/AzCore/AzCore/RTTI/BehaviorContextUtilities.cpp b/Code/Framework/AzCore/AzCore/RTTI/BehaviorContextUtilities.cpp
index c64b86ae0f..f6aac0fa16 100644
--- a/Code/Framework/AzCore/AzCore/RTTI/BehaviorContextUtilities.cpp
+++ b/Code/Framework/AzCore/AzCore/RTTI/BehaviorContextUtilities.cpp
@@ -34,10 +34,17 @@ namespace BehaviorContextUtilitiesCPP
using argument_type = const BehaviorParameter*;
using result_type = size_t;
result_type operator()(const argument_type& value) const
- {
- result_type result = AZStd::hash()(value->m_typeId);
- AZStd::hash_combine(result, CleanTraits(value->m_traits));
- return result;
+ {
+ if (value)
+ {
+ result_type result = AZStd::hash()(value->m_typeId);
+ AZStd::hash_combine(result, CleanTraits(value->m_traits));
+ return result;
+ }
+ else
+ {
+ return 0;
+ }
}
};
@@ -45,7 +52,11 @@ namespace BehaviorContextUtilitiesCPP
{
bool operator()(const BehaviorParameter* left, const BehaviorParameter* right) const
{
- return left->m_typeId == right->m_typeId && CleanTraits(left->m_traits) == CleanTraits(right->m_traits);
+ return (left == nullptr && right == nullptr)
+ || (left != nullptr
+ && right != nullptr
+ && left->m_typeId == right->m_typeId
+ && CleanTraits(left->m_traits) == CleanTraits(right->m_traits));
}
};
@@ -137,7 +148,7 @@ namespace AZ
for (size_t argIndex = 0, argSentinel = overload.GetNumArguments(); argIndex < argSentinel; ++argIndex)
{
auto overloadedArgIter = variance.m_input.find(argIndex);
- if (overloadedArgIter != variance.m_input.end())
+ if (overloadedArgIter != variance.m_input.end() && overloadedArgIter->second[overloadIndex])
{
// if this doesn't work try the type name
overloadName += ReplaceCppArtifacts(overloadedArgIter->second[overloadIndex]->m_name);
@@ -185,16 +196,24 @@ namespace AZ
{
auto argument = overloads[overloadIndex].first->GetArgument(0);
- const bool isThisPointer
- = (argument->m_traits & AZ::BehaviorParameter::Traits::TR_THIS_PTR) != 0
- || AZ::FindAttribute(AZ::Script::Attributes::TreatAsMemberFunction, overloads[overloadIndex].first->m_attributes);
+ if (argument)
+ {
+ const bool isThisPointer
+ = (argument->m_traits & AZ::BehaviorParameter::Traits::TR_THIS_PTR) != 0
+ || AZ::FindAttribute(AZ::Script::Attributes::TreatAsMemberFunction, overloads[overloadIndex].first->m_attributes);
- oneArgIsThisPointer = oneArgIsThisPointer || isThisPointer;
+ oneArgIsThisPointer = oneArgIsThisPointer || isThisPointer;
+ }
types.insert(argument);
stripedArgs.emplace_back(argument);
}
+ if (types.size() == overloads.size())
+ {
+ variance.m_unambiguousInput.insert(0);
+ }
+
if (types.size() > 1 && (onThis == VariantOnThis::Yes || !oneArgIsThisPointer))
{
variance.m_input.insert(AZStd::make_pair(0, stripedArgs));
@@ -210,11 +229,15 @@ namespace AZ
for (size_t overloadIndex = 0, overloadSentinel = overloads.size(); overloadIndex < overloadSentinel; ++overloadIndex)
{
auto argument = overloads[overloadIndex].first->GetArgument(argIndex);
-
types.insert(argument);
stripedArgs.emplace_back(argument);
}
+ if (types.size() == overloads.size())
+ {
+ variance.m_unambiguousInput.insert(0);
+ }
+
if (types.size() > 1)
{
variance.m_input.insert(AZStd::make_pair(argIndex, stripedArgs));
diff --git a/Code/Framework/AzCore/AzCore/RTTI/BehaviorContextUtilities.h b/Code/Framework/AzCore/AzCore/RTTI/BehaviorContextUtilities.h
index 4663635cdf..0dc9ecc969 100644
--- a/Code/Framework/AzCore/AzCore/RTTI/BehaviorContextUtilities.h
+++ b/Code/Framework/AzCore/AzCore/RTTI/BehaviorContextUtilities.h
@@ -27,6 +27,8 @@ namespace AZ
struct OverloadVariance
{
AZStd::unordered_map> m_input;
+ // the indices of inputs that make selection of overload unambiguous
+ AZStd::unordered_set m_unambiguousInput;
AZStd::vector m_output;
};
diff --git a/Code/Framework/AzCore/AzCore/Script/ScriptContext.cpp b/Code/Framework/AzCore/AzCore/Script/ScriptContext.cpp
index ac1e61a5aa..9bf6247e97 100644
--- a/Code/Framework/AzCore/AzCore/Script/ScriptContext.cpp
+++ b/Code/Framework/AzCore/AzCore/Script/ScriptContext.cpp
@@ -2048,10 +2048,6 @@ LUA_API const Node* lua_getDummyNode()
return true;
}
- else
- {
- AZ_Warning("Script", false, "Index %d is not a function!", functionIndex);
- }
return false;
}
@@ -2078,7 +2074,6 @@ LUA_API const Node* lua_getDummyNode()
}
else
{
- AZ_Warning("Script", lua_isnil(m_nativeContext, -1), "Name %s exists but is not a function!", functionName);
lua_pop(m_nativeContext, 1);
}
@@ -5888,7 +5883,6 @@ LUA_API const Node* lua_getDummyNode()
else
{
lua_pop(m_impl->m_lua, 1);
- AZ_Warning("Script", false, "%s is not a function!", functionName);
}
return false;
}
@@ -5906,7 +5900,6 @@ LUA_API const Node* lua_getDummyNode()
else
{
lua_pop(m_impl->m_lua, 1);
- AZ_Warning("Script", false, "CacheIndex %d is not a function!", cachedIndex);
}
return false;
}
diff --git a/Code/Framework/AzCore/AzCore/Script/ScriptSystemComponent.cpp b/Code/Framework/AzCore/AzCore/Script/ScriptSystemComponent.cpp
index 015554538f..11d4db2e07 100644
--- a/Code/Framework/AzCore/AzCore/Script/ScriptSystemComponent.cpp
+++ b/Code/Framework/AzCore/AzCore/Script/ScriptSystemComponent.cpp
@@ -937,7 +937,7 @@ void ScriptSystemComponent::Reflect(ReflectContext* reflection)
->Enum(PlatformID::PLATFORM_LINUX_64)>("Linux")
->Enum(PlatformID::PLATFORM_ANDROID_64)>("Android64")
->Enum(PlatformID::PLATFORM_APPLE_IOS)>("iOS")
- ->Enum(PlatformID::PLATFORM_APPLE_OSX)>("OSX")
+ ->Enum(PlatformID::PLATFORM_APPLE_MAC)>("Mac")
#if defined(AZ_EXPAND_FOR_RESTRICTED_PLATFORM) || defined(AZ_TOOLS_EXPAND_FOR_RESTRICTED_PLATFORMS)
#define AZ_RESTRICTED_PLATFORM_EXPANSION(CodeName, CODENAME, codename, PrivateName, PRIVATENAME, privatename, PublicName, PUBLICNAME, publicname, PublicAuxName1, PublicAuxName2, PublicAuxName3)\
->Enum(PlatformID::PLATFORM_##PUBLICNAME)>(#CodeName)
diff --git a/Code/Framework/AzCore/AzCore/Serialization/Json/JsonDeserializer.cpp b/Code/Framework/AzCore/AzCore/Serialization/Json/JsonDeserializer.cpp
index 93d12acba3..9c4641741e 100644
--- a/Code/Framework/AzCore/AzCore/Serialization/Json/JsonDeserializer.cpp
+++ b/Code/Framework/AzCore/AzCore/Serialization/Json/JsonDeserializer.cpp
@@ -10,6 +10,7 @@
*
*/
+#include "AzCore/RTTI/TypeInfo.h"
#include
#include
#include
@@ -61,6 +62,13 @@ namespace AZ
if (classData->m_azRtti && classData->m_azRtti->GetGenericTypeId() != typeId)
{
+ if (((classData->m_azRtti->GetTypeTraits() & (AZ::TypeTraits::is_signed | AZ::TypeTraits::is_unsigned)) != AZ::TypeTraits{0}) &&
+ context.GetSerializeContext()->GetUnderlyingTypeId(typeId) == classData->m_typeId)
+ {
+ // This value is from an enum, where a field has been reflected using ClassBuilder::Field, but the enum
+ // type itself has not been reflected using EnumBuilder. Treat it as an enum.
+ return LoadEnum(object, *classData, value, context);
+ }
serializer = context.GetRegistrationContext()->GetSerializerForType(classData->m_azRtti->GetGenericTypeId());
if (serializer)
{
@@ -77,21 +85,18 @@ namespace AZ
{
return LoadEnum(object, *classData, value, context);
}
- else if (classData->m_container)
+ if (classData->m_container)
{
return context.Report(Tasks::ReadField, Outcomes::Unsupported,
"The Json Serializer uses custom serializers to load containers. If this message is encountered "
"then a serializer for the target containers is missing, isn't registered or doesn't exist.");
}
- else if (value.IsObject())
+ if (value.IsObject())
{
return LoadClass(object, *classData, value, context);
}
- else
- {
- return context.Report(Tasks::ReadField, Outcomes::Unsupported,
- AZStd::string::format("Reading into targets of type '%s' is not supported.", classData->m_name));
- }
+ return context.Report(Tasks::ReadField, Outcomes::Unsupported,
+ AZStd::string::format("Reading into targets of type '%s' is not supported.", classData->m_name));
}
JsonSerializationResult::ResultCode JsonDeserializer::LoadToPointer(void* object, const Uuid& typeId,
@@ -233,8 +238,16 @@ namespace AZ
AZ::TypeId underlyingTypeId = AZ::TypeId::CreateNull();
if (!attributeReader.Read(underlyingTypeId))
{
- return context.Report(Tasks::RetrieveInfo, Outcomes::Unknown,
- "Unable to find underlying type of enum in class data.");
+ // for non-reflected enums, the passed-in classData already represents the enum's underlying type
+ if (context.GetSerializeContext()->GetUnderlyingTypeId(classData.m_typeId) == classData.m_typeId)
+ {
+ underlyingTypeId = classData.m_typeId;
+ }
+ else
+ {
+ return context.Report(Tasks::RetrieveInfo, Outcomes::Unknown,
+ "Unable to find underlying type of enum in class data.");
+ }
}
const SerializeContext::ClassData* underlyingClassData = context.GetSerializeContext()->FindClassData(underlyingTypeId);
diff --git a/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryMergeUtils.cpp b/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryMergeUtils.cpp
index 82bf1db484..5870c66633 100644
--- a/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryMergeUtils.cpp
+++ b/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryMergeUtils.cpp
@@ -494,13 +494,6 @@ namespace AZ::SettingsRegistryMergeUtils
return configFileParsed;
}
- void MergeSettingsToRegistry_Bootstrap(SettingsRegistryInterface& registry)
- {
- ConfigParserSettings parserSettings;
- parserSettings.m_registryRootPointerPath = BootstrapSettingsRootKey;
- MergeSettingsToRegistry_ConfigFile(registry, "bootstrap.cfg", parserSettings);
- }
-
void MergeSettingsToRegistry_AddRuntimeFilePaths(SettingsRegistryInterface& registry)
{
using FixedValueString = AZ::SettingsRegistryInterface::FixedValueString;
diff --git a/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryMergeUtils.h b/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryMergeUtils.h
index 576066c29f..b482530d24 100644
--- a/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryMergeUtils.h
+++ b/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryMergeUtils.h
@@ -172,9 +172,6 @@ namespace AZ::SettingsRegistryMergeUtils
bool MergeSettingsToRegistry_ConfigFile(SettingsRegistryInterface& registry, AZStd::string_view filePath,
const ConfigParserSettings& configParserSettings);
- //! Loads bootstrap.cfg into the Settings Registry. This file does not support specializations.
- void MergeSettingsToRegistry_Bootstrap(SettingsRegistryInterface& registry);
-
//! Extracts file path information from the environment and bootstrap to calculate the various file paths and adds those
//! to the Settings Registry under the FilePathsRootKey.
void MergeSettingsToRegistry_AddRuntimeFilePaths(SettingsRegistryInterface& registry);
diff --git a/Code/Framework/AzCore/Platform/Mac/AzCore/PlatformId/PlatformId_Mac.h b/Code/Framework/AzCore/Platform/Mac/AzCore/PlatformId/PlatformId_Mac.h
index d361e79f05..42dcd3e2f7 100644
--- a/Code/Framework/AzCore/Platform/Mac/AzCore/PlatformId/PlatformId_Mac.h
+++ b/Code/Framework/AzCore/Platform/Mac/AzCore/PlatformId/PlatformId_Mac.h
@@ -13,5 +13,5 @@
namespace AZ
{
- static const PlatformID g_currentPlatform = PlatformID::PLATFORM_APPLE_OSX;
+ static const PlatformID g_currentPlatform = PlatformID::PLATFORM_APPLE_MAC;
}
diff --git a/Code/Framework/AzCore/Tests/AZTestShared/Utils/Utils.cpp b/Code/Framework/AzCore/Tests/AZTestShared/Utils/Utils.cpp
index 38b9cd609b..9c6f85f08a 100644
--- a/Code/Framework/AzCore/Tests/AZTestShared/Utils/Utils.cpp
+++ b/Code/Framework/AzCore/Tests/AZTestShared/Utils/Utils.cpp
@@ -31,6 +31,8 @@ namespace UnitTest
ErrorHandler::ErrorHandler(const char* errorPattern)
: m_errorCount(0)
, m_warningCount(0)
+ , m_expectedErrorCount(0)
+ , m_expectedWarningCount(0)
, m_errorPattern(errorPattern)
{
AZ::Debug::TraceMessageBus::Handler::BusConnect();
@@ -51,6 +53,16 @@ namespace UnitTest
return m_warningCount;
}
+ int ErrorHandler::GetExpectedErrorCount() const
+ {
+ return m_expectedErrorCount;
+ }
+
+ int ErrorHandler::GetExpectedWarningCount() const
+ {
+ return m_expectedWarningCount;
+ }
+
bool ErrorHandler::SuppressExpectedErrors([[maybe_unused]] const char* window, const char* message)
{
return AZStd::string(message).find(m_errorPattern) != AZStd::string::npos;
@@ -61,7 +73,9 @@ namespace UnitTest
[[maybe_unused]] const char* func, const char* message)
{
m_errorCount++;
- return SuppressExpectedErrors(window, message);
+ bool suppress = SuppressExpectedErrors(window, message);
+ m_expectedErrorCount += suppress;
+ return suppress;
}
bool ErrorHandler::OnPreWarning(
@@ -69,7 +83,9 @@ namespace UnitTest
[[maybe_unused]] const char* func, const char* message)
{
m_warningCount++;
- return SuppressExpectedErrors(window, message);
+ bool suppress = SuppressExpectedErrors(window, message);
+ m_expectedWarningCount += suppress;
+ return suppress;
}
bool ErrorHandler::OnPrintf(const char* window, const char* message)
diff --git a/Code/Framework/AzCore/Tests/AZTestShared/Utils/Utils.h b/Code/Framework/AzCore/Tests/AZTestShared/Utils/Utils.h
index 044c3d1111..56ef340d22 100644
--- a/Code/Framework/AzCore/Tests/AZTestShared/Utils/Utils.h
+++ b/Code/Framework/AzCore/Tests/AZTestShared/Utils/Utils.h
@@ -30,8 +30,14 @@ namespace UnitTest
public:
explicit ErrorHandler(const char* errorPattern);
~ErrorHandler();
+ //! Returns the total number of errors encountered (including those which match the expected pattern).
int GetErrorCount() const;
+ //! Returns the total number of warnings encountered (including those which match the expected pattern).
int GetWarningCount() const;
+ //! Returns the number of errors encountered which matched the expected pattern.
+ int GetExpectedErrorCount() const;
+ //! Returns the number of warnings encountered which matched the expected pattern.
+ int GetExpectedWarningCount() const;
bool SuppressExpectedErrors(const char* window, const char* message);
// AZ::Debug::TraceMessageBus
@@ -44,6 +50,8 @@ namespace UnitTest
AZStd::string m_errorPattern;
int m_errorCount;
int m_warningCount;
+ int m_expectedErrorCount;
+ int m_expectedWarningCount;
};
}
diff --git a/Code/Framework/AzCore/Tests/Math/MathTestData.h b/Code/Framework/AzCore/Tests/Math/MathTestData.h
index cd3ade7854..c82c5caea7 100644
--- a/Code/Framework/AzCore/Tests/Math/MathTestData.h
+++ b/Code/Framework/AzCore/Tests/Math/MathTestData.h
@@ -61,8 +61,8 @@ namespace MathTestData
};
static const AZ::Transform NonOrthogonalTransforms[] = {
- AZ::Transform::CreateScale(AZ::Vector3(2.4f, 0.3f, 1.7f)),
- AZ::Transform::CreateRotationX(2.2f) * AZ::Transform::CreateScale(AZ::Vector3(0.2f, 0.8f, 1.4f))
+ AZ::Transform::CreateUniformScale(2.4f),
+ AZ::Transform::CreateRotationX(2.2f) * AZ::Transform::CreateUniformScale(0.8f)
};
static const AZ::Transform OrthogonalTransforms[] = {
diff --git a/Code/Framework/AzCore/Tests/Math/ObbTests.cpp b/Code/Framework/AzCore/Tests/Math/ObbTests.cpp
index a90d66f288..de267b4265 100644
--- a/Code/Framework/AzCore/Tests/Math/ObbTests.cpp
+++ b/Code/Framework/AzCore/Tests/Math/ObbTests.cpp
@@ -59,11 +59,11 @@ namespace UnitTest
TEST(MATH_Obb, TestScaleTransform)
{
Obb obb = Obb::CreateFromPositionRotationAndHalfLengths(position, rotation, halfLengths);
- Vector3 scaleFactors = Vector3(1.0f, 2.0f, 3.0f);
- Transform transform = Transform::CreateScale(scaleFactors);
+ float scale = 3.0f;
+ Transform transform = Transform::CreateUniformScale(scale);
obb = transform * obb;
- EXPECT_THAT(obb.GetPosition(), IsClose(Vector3(1.0f, 4.0f, 9.0f)));
- EXPECT_THAT(obb.GetHalfLengths(), IsClose(Vector3(0.5f, 1.0f, 1.5f)));
+ EXPECT_THAT(obb.GetPosition(), IsClose(Vector3(3.0f, 6.0f, 9.0f)));
+ EXPECT_THAT(obb.GetHalfLengths(), IsClose(Vector3(1.5f, 1.5f, 1.5f)));
}
TEST(MATH_Obb, TestSetPosition)
diff --git a/Code/Framework/AzCore/Tests/Math/RandomTests.cpp b/Code/Framework/AzCore/Tests/Math/RandomTests.cpp
index ace7d99704..7fe3acff54 100644
--- a/Code/Framework/AzCore/Tests/Math/RandomTests.cpp
+++ b/Code/Framework/AzCore/Tests/Math/RandomTests.cpp
@@ -24,7 +24,7 @@ namespace UnitTest
EXPECT_FLOAT_EQ(5981.0f / 15625.0f, GetHaltonNumber(4321, 5));
}
- TEST(MATH_Random, HaltonSequence)
+ TEST(MATH_Random, HaltonSequenceStandard)
{
HaltonSequence<3> sequence({ 2, 3, 5 });
auto regularSequence = sequence.GetHaltonSequence<5>();
@@ -48,7 +48,11 @@ namespace UnitTest
EXPECT_FLOAT_EQ(5.0f / 8.0f, regularSequence[4][0]);
EXPECT_FLOAT_EQ(7.0f / 9.0f, regularSequence[4][1]);
EXPECT_FLOAT_EQ(1.0f / 25.0f, regularSequence[4][2]);
-
+ }
+
+ TEST(MATH_Random, HaltonSequenceOffsets)
+ {
+ HaltonSequence<3> sequence({ 2, 3, 5 });
sequence.SetOffsets({ 1, 2, 3 });
auto offsetSequence = sequence.GetHaltonSequence<2>();
@@ -59,10 +63,15 @@ namespace UnitTest
EXPECT_FLOAT_EQ(3.0f / 4.0f, offsetSequence[1][0]);
EXPECT_FLOAT_EQ(4.0f / 9.0f, offsetSequence[1][1]);
EXPECT_FLOAT_EQ(1.0f / 25.0f, offsetSequence[1][2]);
-
+ }
+
+ TEST(MATH_Random, HaltonSequenceIncrements)
+ {
+ HaltonSequence<3> sequence({ 2, 3, 5 });
+ sequence.SetOffsets({ 1, 2, 3 });
sequence.SetIncrements({ 1, 2, 3 });
auto incrementedSequence = sequence.GetHaltonSequence<2>();
-
+
EXPECT_FLOAT_EQ(1.0f / 4.0f, incrementedSequence[0][0]);
EXPECT_FLOAT_EQ(1.0f / 9.0f, incrementedSequence[0][1]);
EXPECT_FLOAT_EQ(4.0f / 5.0f, incrementedSequence[0][2]);
@@ -71,4 +80,35 @@ namespace UnitTest
EXPECT_FLOAT_EQ(7.0f / 9.0f, incrementedSequence[1][1]);
EXPECT_FLOAT_EQ(11.0f / 25.0f, incrementedSequence[1][2]);
}
+
+ TEST(MATH_Random, FillHaltonSequence)
+ {
+ HaltonSequence<3> sequence({ 2, 3, 5 });
+ auto regularSequence = sequence.GetHaltonSequence<5>();
+
+ struct Point
+ {
+ Point() = default;
+ Point(AZStd::array arr)
+ :x(arr[0])
+ ,y(arr[1])
+ ,z(arr[2])
+ {}
+
+ float x = 0.0f;
+ float y = 0.0f;
+ float z = 0.0f;
+ };
+
+ AZStd::array ownedContainer;
+ sequence.FillHaltonSequence(ownedContainer.begin(), ownedContainer.end());
+
+ for (size_t i = 0; i < regularSequence.size(); ++i)
+ {
+ EXPECT_FLOAT_EQ(regularSequence[i][0], ownedContainer[i].x);
+ EXPECT_FLOAT_EQ(regularSequence[i][1], ownedContainer[i].y);
+ EXPECT_FLOAT_EQ(regularSequence[i][2], ownedContainer[i].z);
+ }
+ }
+
}
diff --git a/Code/Framework/AzCore/Tests/Math/TransformPerformanceTests.cpp b/Code/Framework/AzCore/Tests/Math/TransformPerformanceTests.cpp
index 400a845913..943aba9b76 100644
--- a/Code/Framework/AzCore/Tests/Math/TransformPerformanceTests.cpp
+++ b/Code/Framework/AzCore/Tests/Math/TransformPerformanceTests.cpp
@@ -180,13 +180,13 @@ namespace Benchmark
}
}
- BENCHMARK_F(BM_MathTransform, CreateScale)(benchmark::State& state)
+ BENCHMARK_F(BM_MathTransform, CreateUniformScale)(benchmark::State& state)
{
for (auto _ : state)
{
for (auto& testData : m_testDataArray)
{
- AZ::Transform result = AZ::Transform::CreateScale(testData.v3);
+ AZ::Transform result = AZ::Transform::CreateUniformScale(testData.value[0]);
benchmark::DoNotOptimize(result);
}
}
@@ -344,39 +344,39 @@ namespace Benchmark
}
}
- BENCHMARK_F(BM_MathTransform, GetScale)(benchmark::State& state)
+ BENCHMARK_F(BM_MathTransform, GetUniformScale)(benchmark::State& state)
{
for (auto _ : state)
{
for (auto& testData : m_testDataArray)
{
- AZ::Vector3 result = testData.t1.GetScale();
+ float result = testData.t1.GetUniformScale();
benchmark::DoNotOptimize(result);
}
}
}
- BENCHMARK_F(BM_MathTransform, SetScale)(benchmark::State& state)
+ BENCHMARK_F(BM_MathTransform, SetUniformScale)(benchmark::State& state)
{
for (auto _ : state)
{
for (auto& testData : m_testDataArray)
{
AZ::Transform testTransform = testData.t2;
- testTransform.SetScale(testData.v3);
+ testTransform.SetUniformScale(testData.value[0]);
benchmark::DoNotOptimize(testTransform);
}
}
}
- BENCHMARK_F(BM_MathTransform, ExtractScale)(benchmark::State& state)
+ BENCHMARK_F(BM_MathTransform, ExtractUniformScale)(benchmark::State& state)
{
for (auto _ : state)
{
for (auto& testData : m_testDataArray)
{
AZ::Transform testTransform = testData.t2;
- AZ::Vector3 result = testTransform.ExtractScale();
+ float result = testTransform.ExtractUniformScale();
benchmark::DoNotOptimize(result);
}
}
diff --git a/Code/Framework/AzCore/Tests/Math/TransformTests.cpp b/Code/Framework/AzCore/Tests/Math/TransformTests.cpp
index d0343211c3..529347f31d 100644
--- a/Code/Framework/AzCore/Tests/Math/TransformTests.cpp
+++ b/Code/Framework/AzCore/Tests/Math/TransformTests.cpp
@@ -159,37 +159,14 @@ namespace UnitTest
INSTANTIATE_TEST_CASE_P(MATH_Transform, TransformCreateFromQuaternionFixture, ::testing::ValuesIn(MathTestData::UnitQuaternions));
- using TransformCreateFromMatrix3x3Fixture = ::testing::TestWithParam;
-
- TEST_P(TransformCreateFromMatrix3x3Fixture, CreateFromMatrix3x3)
- {
- const AZ::Matrix3x3 matrix3x3 = GetParam();
- const AZ::Transform transform = AZ::Transform::CreateFromMatrix3x3(matrix3x3);
- EXPECT_THAT(transform.GetTranslation(), IsClose(AZ::Vector3::CreateZero()));
- const AZ::Vector3 vector(2.3f, -0.6, 1.8f);
- EXPECT_THAT(transform.TransformPoint(vector), IsClose(matrix3x3 * vector));
- }
-
- TEST_P(TransformCreateFromMatrix3x3Fixture, CreateFromMatrix3x3AndTranslation)
- {
- const AZ::Matrix3x3 matrix3x3 = GetParam();
- const AZ::Vector3 translation(-2.6f, 1.7f, 0.8f);
- const AZ::Transform transform = AZ::Transform::CreateFromMatrix3x3AndTranslation(matrix3x3, translation);
- EXPECT_THAT(transform.GetTranslation(), IsClose(translation));
- const AZ::Vector3 vector(2.3f, -0.6, 1.8f);
- EXPECT_THAT(transform.TransformPoint(vector), IsClose(matrix3x3 * vector + translation));
- }
-
- INSTANTIATE_TEST_CASE_P(MATH_Transform, TransformCreateFromMatrix3x3Fixture, ::testing::ValuesIn(MathTestData::Matrix3x3s));
-
- TEST(MATH_Transform, CreateScale)
+ TEST(MATH_Transform, CreateUniformScale)
{
- const AZ::Vector3 scale(1.7f, 0.3f, 2.4f);
- const AZ::Transform transform = AZ::Transform::CreateScale(scale);
+ const float scale = 1.7f;
+ const AZ::Transform transform = AZ::Transform::CreateUniformScale(scale);
const AZ::Vector3 vector(0.2f, -1.6f, 0.4f);
EXPECT_THAT(transform.GetTranslation(), IsClose(AZ::Vector3::CreateZero()));
const AZ::Vector3 transformedVector = transform.TransformPoint(vector);
- const AZ::Vector3 expected(0.34f, -0.48f, 0.96f);
+ const AZ::Vector3 expected(0.34f, -2.72f, 0.68f);
EXPECT_THAT(transformedVector, IsClose(expected));
}
@@ -237,10 +214,10 @@ namespace UnitTest
TEST(MATH_Transform, MultiplyByTransform)
{
const AZ::Transform transform1 = AZ::Transform::CreateRotationY(0.3f);
- const AZ::Transform transform2 = AZ::Transform::CreateScale(AZ::Vector3(1.3f, 1.5f, 0.4f));
+ const AZ::Transform transform2 = AZ::Transform::CreateUniformScale(1.3f);
const AZ::Transform transform3 = AZ::Transform::CreateFromQuaternionAndTranslation(
AZ::Quaternion(0.42f, 0.46f, -0.66f, 0.42f), AZ::Vector3(2.8f, -3.7f, 1.6f));
- const AZ::Transform transform4 = AZ::Transform::CreateRotationX(-0.7f) * AZ::Transform::CreateScale(AZ::Vector3(0.6f, 1.3f, 0.7f));
+ const AZ::Transform transform4 = AZ::Transform::CreateRotationX(-0.7f) * AZ::Transform::CreateUniformScale(0.6f);
AZ::Transform transform5 = transform1;
transform5 *= transform4;
const AZ::Vector3 vector(1.9f, 2.3f, 0.2f);
@@ -254,14 +231,14 @@ namespace UnitTest
TEST(MATH_Transform, TranslationCorrectInTransformHierarchy)
{
AZ::Transform parent = AZ::Transform::CreateRotationZ(AZ::DegToRad(45.0f));
- parent.SetScale(AZ::Vector3(3.0f, 2.0f, 1.0f));
+ parent.SetUniformScale(3.0f);
parent.SetTranslation(AZ::Vector3(0.2f, 0.3f, 0.4f));
AZ::Transform child = AZ::Transform::CreateRotationZ(AZ::DegToRad(90.0f));
child.SetTranslation(AZ::Vector3(0.5f, 0.6f, 0.7f));
const AZ::Transform overallTransform = parent * child;
const AZ::Vector3 overallTranslation = overallTransform.GetTranslation();
- const AZ::Vector3 expectedTranslation(0.412132f, 2.20919f, 1.1f);
- EXPECT_THAT(overallTranslation, IsClose(AZ::Vector3(0.412132f, 2.20919f, 1.1f)));
+ const AZ::Vector3 expectedTranslation(-0.012132f, 2.633452f, 2.5f);
+ EXPECT_THAT(overallTranslation, IsClose(expectedTranslation));
}
TEST(MATH_Transform, TransformPointVector3)
@@ -337,14 +314,14 @@ namespace UnitTest
TEST_P(TransformScaleFixture, Scale)
{
const AZ::Transform orthogonalTransform = GetParam();
- EXPECT_THAT(orthogonalTransform.GetScale(), IsClose(AZ::Vector3::CreateOne()));
+ EXPECT_NEAR(orthogonalTransform.GetUniformScale(), 1.0f, AZ::Constants::Tolerance);
AZ::Transform unscaledTransform = orthogonalTransform;
- unscaledTransform.ExtractScale();
- EXPECT_THAT(unscaledTransform.GetScale(), IsClose(AZ::Vector3::CreateOne()));
- const AZ::Vector3 scale(2.8f, 0.7f, 1.3f);
+ unscaledTransform.ExtractUniformScale();
+ EXPECT_NEAR(unscaledTransform.GetUniformScale(), 1.0f, AZ::Constants::Tolerance);
+ const float scale = 2.8f;
AZ::Transform scaledTransform = orthogonalTransform;
- scaledTransform.MultiplyByScale(scale);
- EXPECT_THAT(scaledTransform.GetScale(), IsClose(scale));
+ scaledTransform.MultiplyByUniformScale(scale);
+ EXPECT_NEAR(scaledTransform.GetUniformScale(), scale, AZ::Constants::Tolerance);
}
INSTANTIATE_TEST_CASE_P(MATH_Transform, TransformScaleFixture, ::testing::ValuesIn(MathTestData::OrthogonalTransforms));
@@ -353,24 +330,11 @@ namespace UnitTest
{
EXPECT_TRUE(AZ::Transform::CreateIdentity().IsOrthogonal());
EXPECT_TRUE(AZ::Transform::CreateRotationZ(0.3f).IsOrthogonal());
- EXPECT_FALSE(AZ::Transform::CreateScale(AZ::Vector3(0.8f, 0.3f, 1.2f)).IsOrthogonal());
+ EXPECT_FALSE(AZ::Transform::CreateUniformScale(0.8f).IsOrthogonal());
EXPECT_TRUE(AZ::Transform::CreateFromQuaternion(AZ::Quaternion(-0.52f, -0.08f, 0.56f, 0.64f)).IsOrthogonal());
AZ::Transform transform;
transform.SetFromEulerRadians(AZ::Vector3(0.2f, 0.4f, 0.1f));
EXPECT_TRUE(transform.IsOrthogonal());
-
- // want to test each possible way the transform could fail to be orthogonal, which we can do by testing for one
- // axis, then using a rotation which cycles the axes
- const AZ::Transform axisCycle = AZ::Transform::CreateFromQuaternion(AZ::Quaternion(0.5f, 0.5f, 0.5f, 0.5f));
-
- // a transform which is normalized in 2 axes, but not the third
- AZ::Transform nonOrthogonalTransform1 = AZ::Transform::CreateScale(AZ::Vector3(1.0f, 1.0f, 2.0f));
-
- for (int i = 0; i < 3; i++)
- {
- EXPECT_FALSE(nonOrthogonalTransform1.IsOrthogonal());
- nonOrthogonalTransform1 = axisCycle * nonOrthogonalTransform1;
- }
}
using TransformSetFromEulerDegreesFixture = ::testing::TestWithParam;
@@ -459,16 +423,17 @@ namespace UnitTest
{
const char* objectStreamBuffer =
R"DELIMITER(
-
+
)DELIMITER";
AZ::Transform* deserializedTransform = AZ::Utils::LoadObjectFromBuffer(objectStreamBuffer, strlen(objectStreamBuffer) + 1);
const AZ::Vector3 expectedTranslation(513.7845459f, 492.5420837f, 32.0000000f);
- const AZ::Vector3 expectedScale(1.5f, 0.5f, 1.2f);
+ const float expectedScale = 1.5f;
const AZ::Quaternion expectedRotation(0.2624075f, 0.4405251f, 0.2029076f, 0.8342113f);
const AZ::Transform expectedTransform =
- AZ::Transform::CreateFromQuaternionAndTranslation(expectedRotation, expectedTranslation) * AZ::Transform::CreateScale(expectedScale);
+ AZ::Transform::CreateFromQuaternionAndTranslation(expectedRotation, expectedTranslation) *
+ AZ::Transform::CreateUniformScale(expectedScale);
EXPECT_TRUE(deserializedTransform->IsClose(expectedTransform));
azfree(deserializedTransform);
diff --git a/Code/Framework/AzCore/Tests/ScriptMath.cpp b/Code/Framework/AzCore/Tests/ScriptMath.cpp
index cb673e92e7..dce63051c9 100644
--- a/Code/Framework/AzCore/Tests/ScriptMath.cpp
+++ b/Code/Framework/AzCore/Tests/ScriptMath.cpp
@@ -1275,10 +1275,10 @@ namespace UnitTest
script->Execute("AZTestAssert(t1:TransformVector(Vector3(1, 0, 0)):IsClose(Vector3(1, 0, 0)))");
script->Execute("AZTestAssert(t1:TransformVector(Vector3(0, 1, 0)):IsClose(Vector3(0, 0.866, 0.5)))");
script->Execute("AZTestAssert(t1:TransformVector(Vector3(0, 0, 1)):IsClose(Vector3(0, -0.5, 0.866)))");
- script->Execute("t1 = Transform.CreateScale(Vector3(1, 2, 3))");
- script->Execute("AZTestAssert(t1:TransformVector(Vector3(1, 0, 0)):IsClose(Vector3(1, 0, 0)))");
+ script->Execute("t1 = Transform.CreateUniformScale(2)");
+ script->Execute("AZTestAssert(t1:TransformVector(Vector3(1, 0, 0)):IsClose(Vector3(2, 0, 0)))");
script->Execute("AZTestAssert(t1:TransformVector(Vector3(0, 1, 0)):IsClose(Vector3(0, 2, 0)))");
- script->Execute("AZTestAssert(t1:TransformVector(Vector3(0, 0, 1)):IsClose(Vector3(0, 0, 3)))");
+ script->Execute("AZTestAssert(t1:TransformVector(Vector3(0, 0, 1)):IsClose(Vector3(0, 0, 2)))");
script->Execute("t1 = Transform.CreateTranslation(Vector3(1, 2, 3))");
script->Execute("AZTestAssert(t1:TransformVector(Vector3(1, 0, 0)):IsClose(Vector3(1, 0, 0)))");
script->Execute("AZTestAssert(t1:TransformVector(Vector3(0, 1, 0)):IsClose(Vector3(0, 1, 0)))");
@@ -1341,19 +1341,19 @@ namespace UnitTest
script->Execute("AZTestAssert(t3:GetTranslation():IsClose(Vector3(-5.90, 25.415, 19.645), 0.001))");
////test inverse, should handle non-orthogonal matrices
- script->Execute("t1 = Transform.CreateRotationX(1) * Transform.CreateScale(Vector3(1, 2, 3))");
+ script->Execute("t1 = Transform.CreateRotationX(1) * Transform.CreateUniformScale(2)");
script->Execute("AZTestAssert((t1*t1:GetInverse()):IsClose(Transform.CreateIdentity()))");
////scale access
- script->Execute("t1 = Transform.CreateRotationX(Math.DegToRad(40)) * Transform.CreateScale(Vector3(2, 3, 4))");
- script->Execute("AZTestAssert(t1:GetScale():IsClose(Vector3(2, 3, 4)))");
- script->Execute("AZTestAssert(t1:ExtractScale():IsClose(Vector3(2, 3, 4)))");
- script->Execute("AZTestAssert(t1:GetScale():IsClose(Vector3.CreateOne()))");
- script->Execute("t1:MultiplyByScale(Vector3(3, 4, 5))");
- script->Execute("AZTestAssert(t1:GetScale():IsClose(Vector3(3, 4, 5)))");
+ script->Execute("t1 = Transform.CreateRotationX(Math.DegToRad(40)) * Transform.CreateUniformScale(3)");
+ script->Execute("AZTestAssertFloatClose(t1:GetUniformScale(), 3)");
+ script->Execute("AZTestAssertFloatClose(t1:ExtractUniformScale(), 3)");
+ script->Execute("AZTestAssertFloatClose(t1:GetUniformScale(), 1)");
+ script->Execute("t1:MultiplyByUniformScale(2)");
+ script->Execute("AZTestAssertFloatClose(t1:GetUniformScale(), 2)");
////orthogonalize
- script->Execute("t1 = Transform.CreateRotationX(Math.DegToRad(30)) * Transform.CreateScale(Vector3(2, 3, 4))");
+ script->Execute("t1 = Transform.CreateRotationX(Math.DegToRad(30)) * Transform.CreateUniformScale(3)");
script->Execute("t1:SetTranslation(Vector3(1,2,3))");
script->Execute("t2 = t1:GetOrthogonalized()");
script->Execute("AZTestAssertFloatClose(t2:GetBasisX():GetLength(), 1)");
@@ -1372,7 +1372,7 @@ namespace UnitTest
script->Execute("t1 = Transform.CreateRotationX(Math.DegToRad(30))");
script->Execute("t1:SetTranslation(Vector3(1, 2, 3))");
script->Execute("AZTestAssert(t1:IsOrthogonal(0.05))");
- script->Execute("t1 = Transform.CreateRotationX(Math.DegToRad(30)) * Transform.CreateScale(Vector3(2, 3, 4))");
+ script->Execute("t1 = Transform.CreateRotationX(Math.DegToRad(30)) * Transform.CreateUniformScale(2)");
script->Execute("AZTestAssert( not t1:IsOrthogonal(0.05))");
////IsClose
diff --git a/Code/Framework/AzCore/Tests/Serialization/Json/TestCases.h b/Code/Framework/AzCore/Tests/Serialization/Json/TestCases.h
index b01dbe9b0d..ae313632af 100644
--- a/Code/Framework/AzCore/Tests/Serialization/Json/TestCases.h
+++ b/Code/Framework/AzCore/Tests/Serialization/Json/TestCases.h
@@ -21,7 +21,7 @@ namespace JsonSerializationTests
{
using JsonSerializationTestCases = ::testing::Types<
// Structures
- SimpleClass, SimpleInheritence, MultipleInheritence, SimpleNested, SimpleEnumWrapper,
+ SimpleClass, SimpleInheritence, MultipleInheritence, SimpleNested, SimpleEnumWrapper, NonReflectedEnumWrapper,
// Pointers
SimpleNullPointer, SimpleAssignedPointer, ComplexAssignedPointer, ComplexNullInheritedPointer,
ComplexAssignedDifferentInheritedPointer, ComplexAssignedSameInheritedPointer,
diff --git a/Code/Framework/AzCore/Tests/Serialization/Json/TestCases_Classes.cpp b/Code/Framework/AzCore/Tests/Serialization/Json/TestCases_Classes.cpp
index 5be031d70a..6da3120f59 100644
--- a/Code/Framework/AzCore/Tests/Serialization/Json/TestCases_Classes.cpp
+++ b/Code/Framework/AzCore/Tests/Serialization/Json/TestCases_Classes.cpp
@@ -373,6 +373,57 @@ namespace JsonSerializationTests
return MakeInstanceWithoutDefaults(AZStd::move(instance), json);
}
+ // NonReflectedEnumWrapper
+ bool NonReflectedEnumWrapper::Equals(const NonReflectedEnumWrapper& rhs, bool fullReflection) const
+ {
+ return !fullReflection || (m_enumClass == rhs.m_enumClass && m_rawEnum== rhs.m_rawEnum);
+ }
+
+ void NonReflectedEnumWrapper::Reflect(AZStd::unique_ptr& context, bool fullReflection)
+ {
+ if (fullReflection)
+ {
+ // Note that the enums are not reflected using context->Enum<>
+
+ context->Class()
+ ->Field("enumClass", &NonReflectedEnumWrapper::m_enumClass)
+ ->Field("rawEnum", &NonReflectedEnumWrapper::m_rawEnum);
+ }
+ }
+
+ InstanceWithSomeDefaults NonReflectedEnumWrapper::GetInstanceWithSomeDefaults()
+ {
+ auto instance = AZStd::make_unique();
+ instance->m_enumClass = NonReflectedEnumWrapper::SimpleEnumClass::Option2;
+
+ const char* strippedDefaults = R"(
+ {
+ "enumClass": 2
+ })";
+ const char* keptDefaults = R"(
+ {
+ "enumClass": 2,
+ "rawEnum": 0
+ })";
+
+ return MakeInstanceWithSomeDefaults(AZStd::move(instance),
+ strippedDefaults, keptDefaults);
+ }
+
+ InstanceWithoutDefaults NonReflectedEnumWrapper::GetInstanceWithoutDefaults()
+ {
+ auto instance = AZStd::make_unique();
+ instance->m_enumClass = NonReflectedEnumWrapper::SimpleEnumClass::Option2;
+ instance->m_rawEnum = NonReflectedEnumWrapper::SimpleRawEnum::RawOption1;
+
+ const char* json = R"(
+ {
+ "enumClass": 2,
+ "rawEnum": 1
+ })";
+ return MakeInstanceWithoutDefaults(AZStd::move(instance), json);
+ }
+
// TemplatedClass
bool TemplatedClass::Equals(const TemplatedClass& rhs, bool fullReflection) const
diff --git a/Code/Framework/AzCore/Tests/Serialization/Json/TestCases_Classes.h b/Code/Framework/AzCore/Tests/Serialization/Json/TestCases_Classes.h
index db5db23fba..1830ca9e6f 100644
--- a/Code/Framework/AzCore/Tests/Serialization/Json/TestCases_Classes.h
+++ b/Code/Framework/AzCore/Tests/Serialization/Json/TestCases_Classes.h
@@ -134,6 +134,35 @@ namespace JsonSerializationTests
SimpleRawEnum m_rawEnum{};
};
+ struct NonReflectedEnumWrapper
+ {
+ enum class SimpleEnumClass
+ {
+ Option1 = 1,
+ Option2,
+ };
+ enum SimpleRawEnum
+ {
+ RawOption1 = 1,
+ RawOption2,
+ };
+ AZ_CLASS_ALLOCATOR(NonReflectedEnumWrapper, AZ::SystemAllocator, 0);
+ AZ_RTTI(NonReflectedEnumWrapper, "{A80D5B6B-2FD1-46E9-A7A9-44C5E2650526}");
+
+ static constexpr bool SupportsPartialDefaults = true;
+
+ NonReflectedEnumWrapper() = default;
+ virtual ~NonReflectedEnumWrapper() = default;
+
+ bool Equals(const NonReflectedEnumWrapper& rhs, bool fullReflection) const;
+ static void Reflect(AZStd::unique_ptr& context, bool fullReflection);
+ static InstanceWithSomeDefaults GetInstanceWithSomeDefaults();
+ static InstanceWithoutDefaults GetInstanceWithoutDefaults();
+
+ SimpleEnumClass m_enumClass{};
+ SimpleRawEnum m_rawEnum{};
+ };
+
template
struct TemplatedClass
{
@@ -158,5 +187,7 @@ namespace AZ
{
AZ_TYPE_INFO_SPECIALIZE(JsonSerializationTests::SimpleEnumWrapper::SimpleEnumClass, "{AF6F1964-5B20-4689-BF23-F36B9C9AAE6A}");
AZ_TYPE_INFO_SPECIALIZE(JsonSerializationTests::SimpleEnumWrapper::SimpleRawEnum, "{EB24207F-B48F-4D8B-940D-3CD06A371739}");
+ AZ_TYPE_INFO_SPECIALIZE(JsonSerializationTests::NonReflectedEnumWrapper::SimpleEnumClass, "{E80E4A41-B29E-4B7C-B630-3B599172C837}");
+ AZ_TYPE_INFO_SPECIALIZE(JsonSerializationTests::NonReflectedEnumWrapper::SimpleRawEnum, "{C42AF28D-4F84-4540-972A-5B6EEFAB13FF}");
AZ_TYPE_INFO_TEMPLATE(JsonSerializationTests::TemplatedClass, "{CA4ADF74-66E7-4D16-B4AC-F71278C60EC7}", AZ_TYPE_INFO_TYPENAME);
}
diff --git a/Code/Framework/AzCore/Tests/Serialization/Json/TransformSerializerTests.cpp b/Code/Framework/AzCore/Tests/Serialization/Json/TransformSerializerTests.cpp
index 12711b1e1a..7eabd6e5e0 100644
--- a/Code/Framework/AzCore/Tests/Serialization/Json/TransformSerializerTests.cpp
+++ b/Code/Framework/AzCore/Tests/Serialization/Json/TransformSerializerTests.cpp
@@ -112,7 +112,7 @@ namespace JsonSerializationTests
AZ::Transform testTransform = AZ::Transform::CreateIdentity();
AZ::Transform expectedTransform =
AZ::Transform::CreateFromQuaternion(AZ::Quaternion(0.25f, 0.5f, 0.75f, 1.0f));
- expectedTransform.SetScale(AZ::Vector3(5.5f));
+ expectedTransform.SetUniformScale(5.5f);
rapidjson::Document json;
json.Parse(R"({ "Rotation": [ 0.25, 0.5, 0.75, 1.0 ], "Scale": 5.5 })");
@@ -128,7 +128,7 @@ namespace JsonSerializationTests
{
AZ::Transform testTransform = AZ::Transform::CreateIdentity();
AZ::Transform expectedTransform = AZ::Transform::CreateTranslation(AZ::Vector3(2.25f, 3.5f, 4.75f));
- expectedTransform.SetScale(AZ::Vector3(5.5f));
+ expectedTransform.SetUniformScale(5.5f);
rapidjson::Document json;
json.Parse(R"({ "Translation": [ 2.25, 3.5, 4.75 ], "Scale": 5.5 })");
@@ -189,7 +189,7 @@ namespace JsonSerializationTests
TEST_F(JsonTransformSerializerTests, Load_FullySetTransform_ReturnsSuccessWithOnlyScale)
{
AZ::Transform testTransform = AZ::Transform::CreateIdentity();
- AZ::Transform expectedTransform = AZ::Transform::CreateScale(AZ::Vector3(5.5f));
+ AZ::Transform expectedTransform = AZ::Transform::CreateUniformScale(5.5f);
rapidjson::Document json;
json.Parse(R"({ "Scale" : 5.5 })");
diff --git a/Code/Framework/AzCore/Tests/SettingsRegistryMergeUtilsTests.cpp b/Code/Framework/AzCore/Tests/SettingsRegistryMergeUtilsTests.cpp
index 36b9757ce3..751d9ded6c 100644
--- a/Code/Framework/AzCore/Tests/SettingsRegistryMergeUtilsTests.cpp
+++ b/Code/Framework/AzCore/Tests/SettingsRegistryMergeUtilsTests.cpp
@@ -372,15 +372,15 @@ mac_remote_filesystem=0
-- We need to know this before we establish VFS because different platform assets
-- are stored in different root folders in the cache. These correspond to the names
-- In the asset processor config file. This value also controls what config file is read
--- when you read system_xxxx_xxxx.cfg (for example, system_windows_pc.cfg or system_android_es3.cfg)
+-- when you read system_xxxx_xxxx.cfg (for example, system_windows_pc.cfg or system_android_android.cfg)
-- by default, pc assets (in the 'pc' folder) are used, with RC being fed 'pc' as the platform
-- by default on console we use the default assets=pc for better iteration times
-- we should turn on console specific assets only when in release and/or testing assets and/or loading performance
-- that way most people will not need to have 3 different caches taking up disk space
assets = pc
-android_assets = es3
+android_assets = android
ios_assets = ios
-mac_assets = osx_gl
+mac_assets = mac
-- Add the IP address of your console to the white list that will connect to the asset processor here
-- You can list addresses or CIDR's. CIDR's are helpful if you are using DHCP. A CIDR looks like an ip address with
@@ -438,9 +438,9 @@ mac_wait_for_connect=0
ConfigFileParams::SettingsKeyValuePair{"/ios_remote_filesystem", AZ::s64{0}},
ConfigFileParams::SettingsKeyValuePair{"/mac_remote_filesystem", AZ::s64{0}},
ConfigFileParams::SettingsKeyValuePair{"/assets", AZStd::string_view{"pc"}},
- ConfigFileParams::SettingsKeyValuePair{"/android_assets", AZStd::string_view{"es3"}},
+ ConfigFileParams::SettingsKeyValuePair{"/android_assets", AZStd::string_view{"android"}},
ConfigFileParams::SettingsKeyValuePair{"/ios_assets", AZStd::string_view{"ios"}},
- ConfigFileParams::SettingsKeyValuePair{"/mac_assets", AZStd::string_view{"osx_gl"}},
+ ConfigFileParams::SettingsKeyValuePair{"/mac_assets", AZStd::string_view{"mac"}},
ConfigFileParams::SettingsKeyValuePair{"/connect_to_remote", AZ::s64{0}},
ConfigFileParams::SettingsKeyValuePair{"/windows_connect_to_remote", AZ::s64{1}},
ConfigFileParams::SettingsKeyValuePair{"/android_connect_to_remote", AZ::s64{0}},
@@ -478,20 +478,20 @@ test_asset_processor_tag = test_value
[Platform pc]
tags=tools,renderer,dx12,vulkan
-[Platform es3]
+[Platform android]
tags=android,mobile,renderer,vulkan ; With Comments at the end
[Platform ios]
tags=mobile,renderer,metal
-[Platform osx_gl]
+[Platform mac]
tags=tools,renderer,metal)"
, AZStd::fixed_vector{
ConfigFileParams::SettingsKeyValuePair{"/test_asset_processor_tag", AZStd::string_view{"test_value"}},
ConfigFileParams::SettingsKeyValuePair{"/Platform pc/tags", AZStd::string_view{"tools,renderer,dx12,vulkan"}},
- ConfigFileParams::SettingsKeyValuePair{"/Platform es3/tags", AZStd::string_view{"android,mobile,renderer,vulkan"}},
+ ConfigFileParams::SettingsKeyValuePair{"/Platform android/tags", AZStd::string_view{"android,mobile,renderer,vulkan"}},
ConfigFileParams::SettingsKeyValuePair{"/Platform ios/tags", AZStd::string_view{"mobile,renderer,metal"}},
- ConfigFileParams::SettingsKeyValuePair{"/Platform osx_gl/tags", AZStd::string_view{"tools,renderer,metal"}},
+ ConfigFileParams::SettingsKeyValuePair{"/Platform mac/tags", AZStd::string_view{"tools,renderer,metal"}},
}}
)
);
diff --git a/Code/Framework/AzFramework/AzFramework/Application/Application.cpp b/Code/Framework/AzFramework/AzFramework/Application/Application.cpp
index e02892de4e..c65ba373f8 100644
--- a/Code/Framework/AzFramework/AzFramework/Application/Application.cpp
+++ b/Code/Framework/AzFramework/AzFramework/Application/Application.cpp
@@ -679,8 +679,6 @@ namespace AzFramework
{
auto fileIoBase = m_archiveFileIO.get();
// Set up the default file aliases based on the settings registry
- fileIoBase->SetAlias("@assets@", "");
- fileIoBase->SetAlias("@root@", GetEngineRoot());
fileIoBase->SetAlias("@engroot@", GetEngineRoot());
fileIoBase->SetAlias("@projectroot@", GetEngineRoot());
fileIoBase->SetAlias("@exefolder@", GetExecutableFolder());
@@ -694,8 +692,8 @@ namespace AzFramework
pathAliases.clear();
if (m_settingsRegistry->Get(pathAliases.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_CacheRootFolder))
{
- fileIoBase->SetAlias("@projectplatformcache@", pathAliases.c_str());
fileIoBase->SetAlias("@assets@", pathAliases.c_str());
+ fileIoBase->SetAlias("@projectplatformcache@", pathAliases.c_str());
fileIoBase->SetAlias("@root@", pathAliases.c_str()); // Deprecated Use @projectplatformcache@
}
pathAliases.clear();
diff --git a/Code/Framework/AzFramework/AzFramework/Archive/Archive.cpp b/Code/Framework/AzFramework/AzFramework/Archive/Archive.cpp
index b0285616df..4a80db2b24 100644
--- a/Code/Framework/AzFramework/AzFramework/Archive/Archive.cpp
+++ b/Code/Framework/AzFramework/AzFramework/Archive/Archive.cpp
@@ -2008,13 +2008,12 @@ namespace AZ::IO
// if no bind root is specified, compute one:
strBindRoot = !bindRoot.empty() ? bindRoot : szFullPath->ParentPath().Native();
- // Check if archive file disk exist on disk or inside of pak.
- bool bFileExists = IsFileExist(szFullPath->Native());
-
- if (!bFileExists && (nFactoryFlags & ZipDir::CacheFactory::FLAGS_READ_ONLY))
+ // Check if archive file disk exist on disk.
+ const bool pakOnDisk = FileIOBase::GetDirectInstance()->Exists(szFullPath->c_str());
+ if (!pakOnDisk && (nFactoryFlags & ZipDir::CacheFactory::FLAGS_READ_ONLY))
{
// Archive file not found.
- AZ_TracePrintf("Archive", "Cannot open Archive file %s\n", szFullPath->c_str());
+ AZ_TracePrintf("Archive", "Archive file %s does not exist\n", szFullPath->c_str());
return nullptr;
}
@@ -2492,8 +2491,6 @@ namespace AZ::IO
void Archive::FindCompressionInfo(bool& found, AZ::IO::CompressionInfo& info, const AZStd::string_view filename)
{
- constexpr uint32_t s_compressionTag = static_cast('Z') << 24 | static_cast('C') << 16 | static_cast('R') << 8 | static_cast('Y');
-
if (!found)
{
auto correctedFilename = AZ::IO::FileIOBase::GetDirectInstance()->ResolvePath(filename);
@@ -2519,7 +2516,6 @@ namespace AZ::IO
found = true;
info.m_archiveFilename.InitFromRelativePath(archive->GetFilePath());
- info.m_compressionTag.m_code = s_compressionTag;
info.m_offset = pFileData->GetFileDataOffset();
info.m_compressedSize = entry->desc.lSizeCompressed;
info.m_uncompressedSize = entry->desc.lSizeUncompressed;
@@ -2539,9 +2535,8 @@ namespace AZ::IO
break;
}
- info.m_decompressor = [&s_compressionTag]([[maybe_unused]] const AZ::IO::CompressionInfo& info, const void* compressed, size_t compressedSize, void* uncompressed, size_t uncompressedBufferSize)->bool
+ info.m_decompressor = []([[maybe_unused]] const AZ::IO::CompressionInfo& info, const void* compressed, size_t compressedSize, void* uncompressed, size_t uncompressedBufferSize)->bool
{
- AZ_Assert(info.m_compressionTag.m_code == s_compressionTag, "Provided compression info isn't supported by this decompressor.");
size_t nSizeUncompressed = uncompressedBufferSize;
return ZipDir::ZipRawUncompress(uncompressed, &nSizeUncompressed, compressed, compressedSize) == 0;
};
diff --git a/Code/Framework/AzFramework/AzFramework/Archive/ArchiveFindData.cpp b/Code/Framework/AzFramework/AzFramework/Archive/ArchiveFindData.cpp
index 678f4e40bf..1794ae90e7 100644
--- a/Code/Framework/AzFramework/AzFramework/Archive/ArchiveFindData.cpp
+++ b/Code/Framework/AzFramework/AzFramework/Archive/ArchiveFindData.cpp
@@ -50,6 +50,7 @@ namespace AZ::IO
, tWrite{ writeTime }
{
}
+
ArchiveFileIterator::ArchiveFileIterator(FindData* findData, AZStd::string_view filename, const FileDesc& fileDesc)
: m_findData{ findData }
, m_filename{ filename }
@@ -108,13 +109,10 @@ namespace AZ::IO
AZ::StringFunc::Path::GetFullPath(directory.c_str(), searchDirectory);
AZ::StringFunc::Path::GetFullFileName(directory.c_str(), pattern);
}
-
AZ::IO::FileIOBase::GetDirectInstance()->FindFiles(searchDirectory.c_str(), pattern.c_str(), [&](const char* filePath) -> bool
{
AZ::IO::FileDesc fileDesc;
-
- AZStd::string fullFilePath;
- AZ::StringFunc::Path::GetFullFileName(filePath, fullFilePath);
+ AZStd::string filePathEntry{filePath};
if (AZ::IO::FileIOBase::GetDirectInstance()->IsDirectory(filePath))
{
@@ -135,9 +133,8 @@ namespace AZ::IO
fileDesc.tAccess = fileDesc.tWrite;
fileDesc.tCreate = fileDesc.tWrite;
}
- [[maybe_unused]] auto result = m_mapFiles.emplace(AZStd::move(fullFilePath), fileDesc);
- AZ_Assert(result.second, "Failed to insert FindData entry for %s", fullFilePath.c_str());
-
+ [[maybe_unused]] auto result = m_mapFiles.emplace(AZStd::move(filePathEntry), fileDesc);
+ AZ_Assert(result.second, "Failed to insert FindData entry for filePath %s", filePath);
return true;
});
}
@@ -273,7 +270,9 @@ namespace AZ::IO
}
auto pakFileIter = m_mapFiles.begin();
- fileIterator.m_filename = pakFileIter->first;
+ AZStd::string fullFilePath;
+ AZ::StringFunc::Path::GetFullFileName(pakFileIter->first.c_str(), fullFilePath);
+ fileIterator.m_filename = AZStd::move(fullFilePath);
fileIterator.m_fileDesc = pakFileIter->second;
fileIterator.m_lastFetchValid = true;
diff --git a/Code/Framework/AzFramework/AzFramework/Asset/AssetProcessorMessages.cpp b/Code/Framework/AzFramework/AzFramework/Asset/AssetProcessorMessages.cpp
index 020feffc47..7280c4af5c 100644
--- a/Code/Framework/AzFramework/AzFramework/Asset/AssetProcessorMessages.cpp
+++ b/Code/Framework/AzFramework/AzFramework/Asset/AssetProcessorMessages.cpp
@@ -308,6 +308,56 @@ namespace AzFramework
}
}
+ //---------------------------------------------------------------------
+ GenerateRelativeSourcePathRequest::GenerateRelativeSourcePathRequest(const AZ::OSString& sourcePath)
+ {
+ AZ_Assert(!sourcePath.empty(), "GenerateRelativeSourcePathRequest: asset path is empty");
+ m_sourcePath = sourcePath;
+ }
+
+ unsigned int GenerateRelativeSourcePathRequest::GetMessageType() const
+ {
+ return MessageType;
+ }
+
+ void GenerateRelativeSourcePathRequest::Reflect(AZ::ReflectContext* context)
+ {
+ auto serialize = azrtti_cast(context);
+ if (serialize)
+ {
+ serialize->Class()
+ ->Version(1)
+ ->Field("SourcePath", &GenerateRelativeSourcePathRequest::m_sourcePath);
+ }
+ }
+
+ //---------------------------------------------------------------------
+ GenerateRelativeSourcePathResponse::GenerateRelativeSourcePathResponse(
+ bool resolved, const AZ::OSString& relativeSourcePath, const AZ::OSString& rootFolder)
+ {
+ m_relativeSourcePath = relativeSourcePath;
+ m_resolved = resolved;
+ m_rootFolder = rootFolder;
+ }
+
+ unsigned int GenerateRelativeSourcePathResponse::GetMessageType() const
+ {
+ return GenerateRelativeSourcePathRequest::MessageType;
+ }
+
+ void GenerateRelativeSourcePathResponse::Reflect(AZ::ReflectContext* context)
+ {
+ auto serialize = azrtti_cast(context);
+ if (serialize)
+ {
+ serialize->Class()
+ ->Version(1)
+ ->Field("RelativeSourcePath", &GenerateRelativeSourcePathResponse::m_relativeSourcePath)
+ ->Field("RootFolder", &GenerateRelativeSourcePathResponse::m_rootFolder)
+ ->Field("Resolved", &GenerateRelativeSourcePathResponse::m_resolved);
+ }
+ }
+
//---------------------------------------------------------------------
GetFullSourcePathFromRelativeProductPathRequest::GetFullSourcePathFromRelativeProductPathRequest(const AZ::OSString& relativeProductPath)
{
diff --git a/Code/Framework/AzFramework/AzFramework/Asset/AssetProcessorMessages.h b/Code/Framework/AzFramework/AzFramework/Asset/AssetProcessorMessages.h
index 9661e61828..c15f75e3e7 100644
--- a/Code/Framework/AzFramework/AzFramework/Asset/AssetProcessorMessages.h
+++ b/Code/Framework/AzFramework/AzFramework/Asset/AssetProcessorMessages.h
@@ -288,6 +288,45 @@ namespace AzFramework
bool m_resolved;
};
+ //////////////////////////////////////////////////////////////////////////
+ class GenerateRelativeSourcePathRequest : public BaseAssetProcessorMessage
+ {
+ public:
+ AZ_CLASS_ALLOCATOR(GenerateRelativeSourcePathRequest, AZ::OSAllocator, 0);
+ AZ_RTTI(GenerateRelativeSourcePathRequest, "{B3865033-F5A3-4749-8147-7B1AB04D5F6D}",
+ BaseAssetProcessorMessage);
+ static void Reflect(AZ::ReflectContext* context);
+
+ // For people that are debugging the network messages and just see MessageType as a value,
+ // the CRC value below is 739777771 (0x2C181CEB)
+ static constexpr unsigned int MessageType =
+ AZ_CRC_CE("AssetSystem::GenerateRelativeSourcePathRequest");
+
+ GenerateRelativeSourcePathRequest() = default;
+ GenerateRelativeSourcePathRequest(const AZ::OSString& sourcePath);
+ unsigned int GetMessageType() const override;
+
+ AZ::OSString m_sourcePath;
+ };
+
+ class GenerateRelativeSourcePathResponse : public BaseAssetProcessorMessage
+ {
+ public:
+ AZ_CLASS_ALLOCATOR(GenerateRelativeSourcePathResponse, AZ::OSAllocator, 0);
+ AZ_RTTI(GenerateRelativeSourcePathResponse, "{938D33DB-C8F6-4FA4-BC81-2F139A9BE1D7}",
+ BaseAssetProcessorMessage);
+ static void Reflect(AZ::ReflectContext* context);
+
+ GenerateRelativeSourcePathResponse() = default;
+ GenerateRelativeSourcePathResponse(
+ bool resolved, const AZ::OSString& relativeSourcePath, const AZ::OSString& rootFolder);
+ unsigned int GetMessageType() const override;
+
+ AZ::OSString m_relativeSourcePath;
+ AZ::OSString m_rootFolder; ///< This is the folder it was found in (the watched/scanned folder, such as gems /assets/ folder)
+ bool m_resolved;
+ };
+
//////////////////////////////////////////////////////////////////////////
class GetFullSourcePathFromRelativeProductPathRequest
: public BaseAssetProcessorMessage
diff --git a/Code/Framework/AzFramework/AzFramework/Asset/AssetSystemComponent.cpp b/Code/Framework/AzFramework/AzFramework/Asset/AssetSystemComponent.cpp
index 83c4907468..6b19084c2a 100644
--- a/Code/Framework/AzFramework/AzFramework/Asset/AssetSystemComponent.cpp
+++ b/Code/Framework/AzFramework/AzFramework/Asset/AssetSystemComponent.cpp
@@ -202,6 +202,7 @@ namespace AzFramework
// Requests
GetUnresolvedDependencyCountsRequest::Reflect(context);
GetRelativeProductPathFromFullSourceOrProductPathRequest::Reflect(context);
+ GenerateRelativeSourcePathRequest::Reflect(context);
GetFullSourcePathFromRelativeProductPathRequest::Reflect(context);
SourceAssetInfoRequest::Reflect(context);
AssetInfoRequest::Reflect(context);
@@ -234,6 +235,7 @@ namespace AzFramework
// Responses
GetUnresolvedDependencyCountsResponse::Reflect(context);
GetRelativeProductPathFromFullSourceOrProductPathResponse::Reflect(context);
+ GenerateRelativeSourcePathResponse::Reflect(context);
GetFullSourcePathFromRelativeProductPathResponse::Reflect(context);
SourceAssetInfoResponse::Reflect(context);
AssetInfoResponse::Reflect(context);
diff --git a/Code/Framework/AzFramework/AzFramework/Components/ComponentAdapter.h b/Code/Framework/AzFramework/AzFramework/Components/ComponentAdapter.h
index 682e886061..ee8b79bf06 100644
--- a/Code/Framework/AzFramework/AzFramework/Components/ComponentAdapter.h
+++ b/Code/Framework/AzFramework/AzFramework/Components/ComponentAdapter.h
@@ -1,22 +1,22 @@
/*
-* 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.
-*
-*/
+ * 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.
+ *
+ */
#pragma once
#include
#include
-#include
#include
#include
+#include
namespace AzFramework
{
@@ -64,15 +64,13 @@ namespace AzFramework
the EditContext. TController can friend itself to the editor component to make this work if required.
*/
template
- class ComponentAdapter
- : public AZ::Component
+ class ComponentAdapter : public AZ::Component
{
public:
-
AZ_RTTI((ComponentAdapter, "{644A9187-4FDB-42C1-9D59-DD75304B551A}", TController, TConfiguration), AZ::Component);
ComponentAdapter() = default;
- ComponentAdapter(const TConfiguration& configuration);
+ explicit ComponentAdapter(const TConfiguration& configuration);
static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& services);
static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& services);
@@ -85,7 +83,6 @@ namespace AzFramework
void Deactivate() override;
protected:
-
static void Reflect(AZ::ReflectContext* context);
// AZ::Component overrides ...
diff --git a/Code/Framework/AzFramework/AzFramework/Components/ComponentAdapter.inl b/Code/Framework/AzFramework/AzFramework/Components/ComponentAdapter.inl
index a1b0826193..5c36ff0bf7 100644
--- a/Code/Framework/AzFramework/AzFramework/Components/ComponentAdapter.inl
+++ b/Code/Framework/AzFramework/AzFramework/Components/ComponentAdapter.inl
@@ -1,14 +1,14 @@
/*
-* 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.
-*
-*/
+ * 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.
+ *
+ */
#include
@@ -32,10 +32,12 @@ namespace AzFramework
if (auto serializeContext = azrtti_cast(context))
{
+ // clang-format off
serializeContext->Class()
->Version(1)
->Field("Controller", &ComponentAdapter::m_controller)
;
+ // clang-format on
}
}
@@ -66,9 +68,6 @@ namespace AzFramework
GetDependentServicesHelper(services, typename AZ::HasComponentDependentServices::type());
}
- //////////////////////////////////////////////////////////////////////////
- // AZ::Component interface implementation
-
template
void ComponentAdapter::Init()
{
@@ -78,7 +77,7 @@ namespace AzFramework
template
void ComponentAdapter::Activate()
{
- m_controller.Activate(GetEntityId());
+ ComponentActivateHelper::Activate(m_controller, AZ::EntityComponentIdPair(GetEntityId(), GetId()));
}
template
diff --git a/Code/Framework/AzFramework/AzFramework/Components/ComponentAdapterHelpers.h b/Code/Framework/AzFramework/AzFramework/Components/ComponentAdapterHelpers.h
index 158ee95f39..f0ef262a71 100644
--- a/Code/Framework/AzFramework/AzFramework/Components/ComponentAdapterHelpers.h
+++ b/Code/Framework/AzFramework/AzFramework/Components/ComponentAdapterHelpers.h
@@ -13,6 +13,7 @@
#pragma once
#include
+#include
namespace AzFramework
{
@@ -27,18 +28,43 @@ namespace AzFramework
template
struct ComponentInitHelper
{
- static void Init(T& common)
+ static void Init([[maybe_unused]] T& controller)
{
- AZ_UNUSED(common);
}
};
template
struct ComponentInitHelper().Init())>>
{
- static void Init(T& common)
+ static void Init(T& controller)
{
- common.Init();
+ controller.Init();
+ }
+ };
+
+ template
+ struct ComponentActivateHelper
+ {
+ static void Activate([[maybe_unused]] T& controller, [[maybe_unused]] const AZ::EntityComponentIdPair& entityComponentIdPair)
+ {
+ }
+ };
+
+ template
+ struct ComponentActivateHelper().Activate(AZ::EntityId()))>>
+ {
+ static void Activate(T& controller, const AZ::EntityComponentIdPair& entityComponentIdPair)
+ {
+ controller.Activate(entityComponentIdPair.GetEntityId());
+ }
+ };
+
+ template
+ struct ComponentActivateHelper().Activate(AZ::EntityComponentIdPair()))>>
+ {
+ static void Activate(T& controller, const AZ::EntityComponentIdPair& entityComponentIdPair)
+ {
+ controller.Activate(entityComponentIdPair);
}
};
diff --git a/Code/Framework/AzFramework/AzFramework/Components/TransformComponent.cpp b/Code/Framework/AzFramework/AzFramework/Components/TransformComponent.cpp
index 9083cb7d0d..49adab2252 100644
--- a/Code/Framework/AzFramework/AzFramework/Components/TransformComponent.cpp
+++ b/Code/Framework/AzFramework/AzFramework/Components/TransformComponent.cpp
@@ -327,99 +327,13 @@ namespace AzFramework
return localZ;
}
- void TransformComponent::SetRotation(const AZ::Vector3& eulerAnglesRadian)
+ void TransformComponent::SetWorldRotationQuaternion(const AZ::Quaternion& quaternion)
{
- AZ_Warning("TransformComponent", false, "SetRotation is deprecated, please use SetLocalRotation");
-
- AZ::Transform newWorldTransform = m_worldTM;
- newWorldTransform.SetRotation(AZ::ConvertEulerRadiansToQuaternion(eulerAnglesRadian));
- SetWorldTM(newWorldTransform);
- }
-
- void TransformComponent::SetRotationQuaternion(const AZ::Quaternion& quaternion)
- {
- AZ_Warning("TransformComponent", false, "SetRotationQuaternion is deprecated, please use SetLocalRotationQuaternion");
-
AZ::Transform newWorldTransform = m_worldTM;
newWorldTransform.SetRotation(quaternion);
SetWorldTM(newWorldTransform);
}
- void TransformComponent::SetRotationX(float eulerAngleRadian)
- {
- AZ_Warning("TransformComponent", false, "SetRotationX is deprecated, please use SetLocalRotation");
-
- AZ::Transform newWorldTransform = m_worldTM;
- newWorldTransform.SetRotation(AZ::Quaternion::CreateRotationX(eulerAngleRadian));
- SetWorldTM(newWorldTransform);
- }
-
- void TransformComponent::SetRotationY(float eulerAngleRadian)
- {
- AZ_Warning("TransformComponent", false, "SetRotationY is deprecated, please use SetLocalRotation");
-
- AZ::Transform newWorldTransform = m_worldTM;
- newWorldTransform.SetRotation(AZ::Quaternion::CreateRotationY(eulerAngleRadian));
- SetWorldTM(newWorldTransform);
- }
-
- void TransformComponent::SetRotationZ(float eulerAngleRadian)
- {
- AZ_Warning("TransformComponent", false, "SetRotationZ is deprecated, please use SetLocalRotation");
-
- AZ::Transform newWorldTransform = m_worldTM;
- newWorldTransform.SetRotation(AZ::Quaternion::CreateRotationZ(eulerAngleRadian));
- SetWorldTM(newWorldTransform);
- }
-
- void TransformComponent::RotateByX(float eulerAngleRadian)
- {
- AZ_Warning("TransformComponent", false, "RotateByX is deprecated, please use RotateAroundLocalX");
- RotateAroundLocalX(eulerAngleRadian);
- }
-
- void TransformComponent::RotateByY(float eulerAngleRadian)
- {
- AZ_Warning("TransformComponent", false, "RotateByY is deprecated, please use RotateAroundLocalY");
- RotateAroundLocalY(eulerAngleRadian);
- }
-
- void TransformComponent::RotateByZ(float eulerAngleRadian)
- {
- AZ_Warning("TransformComponent", false, "RotateByZ is deprecated, please use RotateAroundLocalZ");
- RotateAroundLocalZ(eulerAngleRadian);
- }
-
- AZ::Vector3 TransformComponent::GetRotationEulerRadians()
- {
- AZ_Warning("TransformComponent", false, "GetRotationEulerRadians is deprecated, please use GetWorldRotation");
- return m_worldTM.GetRotation().GetEulerRadians();
- }
-
- AZ::Quaternion TransformComponent::GetRotationQuaternion()
- {
- AZ_Warning("TransformComponent", false, "GetRotationQuaternion is deprecated, please use GetWorldRotationQuaternion");
- return m_worldTM.GetRotation();
- }
-
- float TransformComponent::GetRotationX()
- {
- AZ_Warning("TransformComponent", false, "GetRotationX is deprecated, please use GetWorldRotation");
- return GetRotationEulerRadians().GetX();
- }
-
- float TransformComponent::GetRotationY()
- {
- AZ_Warning("TransformComponent", false, "GetRotationY is deprecated, please use GetWorldRotation");
- return GetRotationEulerRadians().GetY();
- }
-
- float TransformComponent::GetRotationZ()
- {
- AZ_Warning("TransformComponent", false, "GetRotationZ is deprecated, please use GetWorldRotation");
- return GetRotationEulerRadians().GetZ();
- }
-
AZ::Vector3 TransformComponent::GetWorldRotation()
{
return m_worldTM.GetRotation().GetEulerRadians();
@@ -432,46 +346,26 @@ namespace AzFramework
void TransformComponent::SetLocalRotation(const AZ::Vector3& eulerRadianAngles)
{
- AZ::Transform newLocalTM = AZ::ConvertEulerRadiansToTransform(eulerRadianAngles);
- newLocalTM.SetScale(m_localTM.GetScale());
- newLocalTM.SetTranslation(m_localTM.GetTranslation());
+ AZ::Transform newLocalTM = m_localTM;
+ newLocalTM.SetRotation(AZ::Quaternion::CreateFromEulerAnglesRadians(eulerRadianAngles));
SetLocalTM(newLocalTM);
}
void TransformComponent::SetLocalRotationQuaternion(const AZ::Quaternion& quaternion)
{
- AZ::Transform newLocalTM;
- newLocalTM.SetScale(m_localTM.GetScale());
- newLocalTM.SetTranslation(m_localTM.GetTranslation());
+ AZ::Transform newLocalTM = m_localTM;
newLocalTM.SetRotation(quaternion);
SetLocalTM(newLocalTM);
}
static AZ::Transform RotateAroundLocalHelper(float eulerAngleRadian, const AZ::Transform& localTM, AZ::Vector3 axis)
{
- //get the existing translation and scale
- AZ::Vector3 translation = localTM.GetTranslation();
- AZ::Vector3 scale = localTM.GetScale();
-
//normalize the axis before creating rotation
axis.Normalize();
AZ::Quaternion rotate = AZ::Quaternion::CreateFromAxisAngle(axis, eulerAngleRadian);
- //create new rotation transform
- AZ::Quaternion currentRotate = localTM.GetRotation();
- AZ::Quaternion newRotate = rotate * currentRotate;
- newRotate.Normalize();
-
- //scale
- AZ::Transform newLocalTM = AZ::Transform::CreateScale(scale);
-
- //rotate
- AZ::Transform rotateLocalTM = AZ::Transform::CreateFromQuaternion(newRotate);
- newLocalTM = rotateLocalTM * newLocalTM;
-
- //translate
- newLocalTM.SetTranslation(translation);
-
+ AZ::Transform newLocalTM = localTM;
+ newLocalTM.SetRotation((rotate * localTM.GetRotation()).GetNormalized());
return newLocalTM;
}
@@ -512,75 +406,6 @@ namespace AzFramework
return m_localTM.GetRotation();
}
- void TransformComponent::SetScale(const AZ::Vector3& scale)
- {
- AZ_Warning("TransformComponent", false, "SetScale is deprecated, please use SetLocalScale");
-
- if (!m_worldTM.GetScale().IsClose(scale))
- {
- AZ::Transform newWorldTransform = m_worldTM;
- newWorldTransform.SetScale(scale);
- SetWorldTM(newWorldTransform);
- }
- }
-
- void TransformComponent::SetScaleX(float scaleX)
- {
- AZ_Warning("TransformComponent", false, "SetScaleX is deprecated, please use SetLocalScaleX");
-
- AZ::Vector3 newScale = m_worldTM.GetScale();
- newScale.SetX(scaleX);
- AZ::Transform newWorldTransform = m_worldTM;
- newWorldTransform.SetScale(newScale);
- SetWorldTM(newWorldTransform);
- }
-
- void TransformComponent::SetScaleY(float scaleY)
- {
- AZ_Warning("TransformComponent", false, "SetScaleY is deprecated, please use SetLocalScaleY");
-
- AZ::Vector3 newScale = m_worldTM.GetScale();
- newScale.SetY(scaleY);
- AZ::Transform newWorldTransform = m_worldTM;
- newWorldTransform.SetScale(newScale);
- SetWorldTM(newWorldTransform);
- }
-
- void TransformComponent::SetScaleZ(float scaleZ)
- {
- AZ_Warning("TransformComponent", false, "SetScaleZ is deprecated, please use SetLocalScaleZ");
-
- AZ::Vector3 newScale = m_worldTM.GetScale();
- newScale.SetZ(scaleZ);
- AZ::Transform newWorldTransform = m_worldTM;
- newWorldTransform.SetScale(newScale);
- SetWorldTM(newWorldTransform);
- }
-
- AZ::Vector3 TransformComponent::GetScale()
- {
- AZ_Warning("TransformComponent", false, "GetScale is deprecated, please use GetLocalScale");
- return m_worldTM.GetScale();
- }
-
- float TransformComponent::GetScaleX()
- {
- AZ_Warning("TransformComponent", false, "GetScaleX is deprecated, please use GetLocalScale");
- return m_worldTM.GetScale().GetX();
- }
-
- float TransformComponent::GetScaleY()
- {
- AZ_Warning("TransformComponent", false, "GetScaleY is deprecated, please use GetLocalScale");
- return m_worldTM.GetScale().GetY();
- }
-
- float TransformComponent::GetScaleZ()
- {
- AZ_Warning("TransformComponent", false, "GetScaleZ is deprecated, please use GetLocalScale");
- return m_worldTM.GetScale().GetZ();
- }
-
void TransformComponent::SetLocalScale(const AZ::Vector3& scale)
{
AZ::Transform newLocalTM = m_localTM;
@@ -588,41 +413,31 @@ namespace AzFramework
SetLocalTM(newLocalTM);
}
- void TransformComponent::SetLocalScaleX(float scaleX)
+ AZ::Vector3 TransformComponent::GetLocalScale()
{
- AZ::Transform newLocalTM = m_localTM;
- AZ::Vector3 newScale = newLocalTM.GetScale();
- newScale.SetX(scaleX);
- newLocalTM.SetScale(newScale);
- SetLocalTM(newLocalTM);
+ return m_localTM.GetScale();
}
- void TransformComponent::SetLocalScaleY(float scaleY)
+ AZ::Vector3 TransformComponent::GetWorldScale()
{
- AZ::Transform newLocalTM = m_localTM;
- AZ::Vector3 newScale = newLocalTM.GetScale();
- newScale.SetY(scaleY);
- newLocalTM.SetScale(newScale);
- SetLocalTM(newLocalTM);
+ return m_worldTM.GetScale();
}
- void TransformComponent::SetLocalScaleZ(float scaleZ)
+ void TransformComponent::SetLocalUniformScale(float scale)
{
AZ::Transform newLocalTM = m_localTM;
- AZ::Vector3 newScale = newLocalTM.GetScale();
- newScale.SetZ(scaleZ);
- newLocalTM.SetScale(newScale);
+ newLocalTM.SetUniformScale(scale);
SetLocalTM(newLocalTM);
}
- AZ::Vector3 TransformComponent::GetLocalScale()
+ float TransformComponent::GetLocalUniformScale()
{
- return m_localTM.GetScale();
+ return m_localTM.GetUniformScale();
}
- AZ::Vector3 TransformComponent::GetWorldScale()
+ float TransformComponent::GetWorldUniformScale()
{
- return m_worldTM.GetScale();
+ return m_worldTM.GetUniformScale();
}
AZStd::vector TransformComponent::GetChildren()
@@ -929,45 +744,7 @@ namespace AzFramework
->Event("GetLocalX", &AZ::TransformBus::Events::GetLocalX)
->Event("GetLocalY", &AZ::TransformBus::Events::GetLocalY)
->Event("GetLocalZ", &AZ::TransformBus::Events::GetLocalZ)
- ->Event("RotateByX", &AZ::TransformBus::Events::RotateByX)
- ->Attribute(AZ::Script::Attributes::Deprecated, true)
- ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
- ->Event("RotateByY", &AZ::TransformBus::Events::RotateByY)
- ->Attribute(AZ::Script::Attributes::Deprecated, true)
- ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
- ->Event("RotateByZ", &AZ::TransformBus::Events::RotateByZ)
- ->Attribute(AZ::Script::Attributes::Deprecated, true)
- ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
- ->Event("SetEulerRotation", &AZ::TransformBus::Events::SetRotation)
- ->Attribute(AZ::Script::Attributes::Deprecated, true)
- ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
- ->Event("SetRotationQuaternion", &AZ::TransformBus::Events::SetRotationQuaternion)
- ->Attribute(AZ::Script::Attributes::Deprecated, true)
- ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
- ->Event("SetRotationX", &AZ::TransformBus::Events::SetRotationX)
- ->Attribute(AZ::Script::Attributes::Deprecated, true)
- ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
- ->Event("SetRotationY", &AZ::TransformBus::Events::SetRotationY)
- ->Attribute(AZ::Script::Attributes::Deprecated, true)
- ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
- ->Event("SetRotationZ", &AZ::TransformBus::Events::SetRotationZ)
- ->Attribute(AZ::Script::Attributes::Deprecated, true)
- ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
- ->Event("GetEulerRotation", &AZ::TransformBus::Events::GetRotationEulerRadians)
- ->Attribute(AZ::Script::Attributes::Deprecated, true)
- ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
- ->Event("GetRotationQuaternion", &AZ::TransformBus::Events::GetRotationQuaternion)
- ->Attribute(AZ::Script::Attributes::Deprecated, true)
- ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
- ->Event("GetRotationX", &AZ::TransformBus::Events::GetRotationX)
- ->Attribute(AZ::Script::Attributes::Deprecated, true)
- ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
- ->Event("GetRotationY", &AZ::TransformBus::Events::GetRotationY)
- ->Attribute(AZ::Script::Attributes::Deprecated, true)
- ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
- ->Event("GetRotationZ", &AZ::TransformBus::Events::GetRotationZ)
- ->Attribute(AZ::Script::Attributes::Deprecated, true)
- ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
+ ->Event("SetWorldRotationQuaternion", &AZ::TransformBus::Events::SetWorldRotationQuaternion)
->Event("GetWorldRotation", &AZ::TransformBus::Events::GetWorldRotation)
->Event("GetWorldRotationQuaternion", &AZ::TransformBus::Events::GetWorldRotationQuaternion)
->Event("SetLocalRotation", &AZ::TransformBus::Events::SetLocalRotation)
@@ -979,34 +756,7 @@ namespace AzFramework
->Event("GetLocalRotationQuaternion", &AZ::TransformBus::Events::GetLocalRotationQuaternion)
->Attribute("Rotation", AZ::Edit::Attributes::PropertyRotation)
->VirtualProperty("Rotation", "GetLocalRotationQuaternion", "SetLocalRotationQuaternion")
- ->Event("SetScale", &AZ::TransformBus::Events::SetScale)
- ->Attribute(AZ::Script::Attributes::Deprecated, true)
- ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
- ->Event("SetScaleX", &AZ::TransformBus::Events::SetScaleX)
- ->Attribute(AZ::Script::Attributes::Deprecated, true)
- ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
- ->Event("SetScaleY", &AZ::TransformBus::Events::SetScaleY)
- ->Attribute(AZ::Script::Attributes::Deprecated, true)
- ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
- ->Event("SetScaleZ", &AZ::TransformBus::Events::SetScaleZ)
- ->Attribute(AZ::Script::Attributes::Deprecated, true)
- ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
- ->Event("GetScale", &AZ::TransformBus::Events::GetScale)
- ->Attribute(AZ::Script::Attributes::Deprecated, true)
- ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
- ->Event("GetScaleX", &AZ::TransformBus::Events::GetScaleX)
- ->Attribute(AZ::Script::Attributes::Deprecated, true)
- ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
- ->Event("GetScaleY", &AZ::TransformBus::Events::GetScaleY)
- ->Attribute(AZ::Script::Attributes::Deprecated, true)
- ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
- ->Event("GetScaleZ", &AZ::TransformBus::Events::GetScaleZ)
- ->Attribute(AZ::Script::Attributes::Deprecated, true)
- ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
->Event("SetLocalScale", &AZ::TransformBus::Events::SetLocalScale)
- ->Event("SetLocalScaleX", &AZ::TransformBus::Events::SetLocalScaleX)
- ->Event("SetLocalScaleY", &AZ::TransformBus::Events::SetLocalScaleY)
- ->Event("SetLocalScaleZ", &AZ::TransformBus::Events::SetLocalScaleZ)
->Event("GetLocalScale", &AZ::TransformBus::Events::GetLocalScale)
->Attribute("Scale", AZ::Edit::Attributes::PropertyScale)
->VirtualProperty("Scale", "GetLocalScale", "SetLocalScale")
diff --git a/Code/Framework/AzFramework/AzFramework/Components/TransformComponent.h b/Code/Framework/AzFramework/AzFramework/Components/TransformComponent.h
index 0dd53d84ed..9009c6bff9 100644
--- a/Code/Framework/AzFramework/AzFramework/Components/TransformComponent.h
+++ b/Code/Framework/AzFramework/AzFramework/Components/TransformComponent.h
@@ -112,22 +112,7 @@ namespace AzFramework
float GetLocalZ() override;
// Rotation modifiers
- void SetRotation(const AZ::Vector3& eulerAnglesRadian) override;
- void SetRotationQuaternion(const AZ::Quaternion& quaternion) override;
- void SetRotationX(float eulerAngleRadian) override;
- void SetRotationY(float eulerAngleRadian) override;
- void SetRotationZ(float eulerAngleRadian) override;
-
- void RotateByX(float eulerAngleRadian) override;
- void RotateByY(float eulerAngleRadian) override;
- void RotateByZ(float eulerAngleRadian) override;
-
- AZ::Vector3 GetRotationEulerRadians() override;
- AZ::Quaternion GetRotationQuaternion() override;
-
- float GetRotationX() override;
- float GetRotationY() override;
- float GetRotationZ() override;
+ void SetWorldRotationQuaternion(const AZ::Quaternion& quaternion) override;
AZ::Vector3 GetWorldRotation() override;
AZ::Quaternion GetWorldRotationQuaternion() override;
@@ -143,24 +128,14 @@ namespace AzFramework
AZ::Quaternion GetLocalRotationQuaternion() override;
// Scale Modifiers
- void SetScale(const AZ::Vector3& scale) override;
- void SetScaleX(float scaleX) override;
- void SetScaleY(float scaleY) override;
- void SetScaleZ(float scaleZ) override;
-
- AZ::Vector3 GetScale() override;
- float GetScaleX() override;
- float GetScaleY() override;
- float GetScaleZ() override;
-
void SetLocalScale(const AZ::Vector3& scale) override;
- void SetLocalScaleX(float scaleX) override;
- void SetLocalScaleY(float scaleY) override;
- void SetLocalScaleZ(float scaleZ) override;
-
AZ::Vector3 GetLocalScale() override;
AZ::Vector3 GetWorldScale() override;
+ void SetLocalUniformScale(float scale) override;
+ float GetLocalUniformScale() override;
+ float GetWorldUniformScale() override;
+
// Transform hierarchy
AZStd::vector GetChildren() override;
AZStd::vector GetAllDescendants() override;
diff --git a/Code/Framework/AzFramework/AzFramework/Font/FontInterface.h b/Code/Framework/AzFramework/AzFramework/Font/FontInterface.h
index b64b61e22c..04a0572bb9 100644
--- a/Code/Framework/AzFramework/AzFramework/Font/FontInterface.h
+++ b/Code/Framework/AzFramework/AzFramework/Font/FontInterface.h
@@ -15,6 +15,7 @@
#include
#include
#include
+#include
#include
#include
@@ -42,11 +43,15 @@ namespace AzFramework
{
ViewportId m_drawViewportId = InvalidViewportId; //!< Viewport to draw into
AZ::Vector3 m_position; //!< world space position for 3d draws, screen space x,y,depth for 2d.
- AZ::Color m_color = AZ::Colors::White; //!< Color to draw the text
+ AZ::Color m_color = AZ::Colors::White; //!< Color to draw the text
+ unsigned int m_effectIndex = 0; //!< effect index to apply
AZ::Vector2 m_scale = AZ::Vector2(1.0f); //!< font scale
- float m_lineSpacing; //!< Spacing between new lines, as a percentage of m_scale.
+ float m_textSizeFactor = 12.0f; //!< font size in pixels
+ float m_lineSpacing = 1.0f; //!< Spacing between new lines, as a percentage of m_scale.
TextHorizontalAlignment m_hAlign = TextHorizontalAlignment::Left; //!< Horizontal text alignment
TextVerticalAlignment m_vAlign = TextVerticalAlignment::Top; //!< Vertical text alignment
+ bool m_useTransform = false; //!< Use specified transform
+ AZ::Matrix3x4 m_transform = AZ::Matrix3x4::Identity(); //!< Transform to apply to text quads
bool m_monospace = false; //!< disable character proportional spacing
bool m_depthTest = false; //!< Test character against the depth buffer
bool m_virtual800x600ScreenSize = true; //!< Text placement and size are scaled relative to a virtual 800x600 resolution
diff --git a/Code/Framework/AzFramework/AzFramework/Physics/Ragdoll.h b/Code/Framework/AzFramework/AzFramework/Physics/Ragdoll.h
index 239d93cf32..97c841e8f8 100644
--- a/Code/Framework/AzFramework/AzFramework/Physics/Ragdoll.h
+++ b/Code/Framework/AzFramework/AzFramework/Physics/Ragdoll.h
@@ -102,7 +102,7 @@ namespace Physics
/// Is the ragdoll currently simulated?
/// @result True in case the ragdoll is simulated, false if not.
- virtual bool IsSimulated() = 0;
+ virtual bool IsSimulated() const = 0;
/// Writes the state for all of the bodies in the ragdoll to the provided output.
/// The caller owns the output state and can safely manipulate it without affecting the physics simulation.
diff --git a/Code/Framework/AzFramework/AzFramework/ProjectManager/ProjectManager.cpp b/Code/Framework/AzFramework/AzFramework/ProjectManager/ProjectManager.cpp
index 985bc4665d..2742b90f4c 100644
--- a/Code/Framework/AzFramework/AzFramework/ProjectManager/ProjectManager.cpp
+++ b/Code/Framework/AzFramework/AzFramework/ProjectManager/ProjectManager.cpp
@@ -46,7 +46,6 @@ namespace AzFramework::ProjectManager
// Store the Command line to the Setting Registry
AZ::SettingsRegistryImpl settingsRegistry;
AZ::SettingsRegistryMergeUtils::StoreCommandLineToRegistry(settingsRegistry, commandLine);
- AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_Bootstrap(settingsRegistry);
AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_O3deUserRegistry(settingsRegistry, AZ_TRAIT_OS_PLATFORM_CODENAME, {});
// Retrieve Command Line from Settings Registry, it may have been updated by the call to FindEngineRoot()
// in MergeSettingstoRegistry_ConfigFile
@@ -99,51 +98,18 @@ namespace AzFramework::ProjectManager
AZ::AllocatorInstance::Create();
}
{
- const char projectsScript[] = "projects.py";
+ AZStd::string filename = "o3de";
+ AZ::IO::FixedMaxPath executablePath = AZ::Utils::GetExecutableDirectory();
+ executablePath /= filename + AZ_TRAIT_OS_EXECUTABLE_EXTENSION;
- AZ_Warning("ProjectManager", false, "No project provided - launching project selector.");
-
- if (engineRootPath.empty())
+ if (!AZ::IO::SystemFile::Exists(executablePath.c_str()))
{
- AZ_Error("ProjectManager", false, "Couldn't find engine root");
+ AZ_Error("ProjectManager", false, "%s not found", executablePath.c_str());
return false;
}
- auto projectManagerPath = engineRootPath / "scripts" / "project_manager";
-
- if (!AZ::IO::SystemFile::Exists((projectManagerPath / projectsScript).c_str()))
- {
- AZ_Error("ProjectManager", false, "%s not found at %s!", projectsScript, projectManagerPath.c_str());
- return false;
- }
- AZ::IO::FixedMaxPathString executablePath;
- AZ::Utils::GetExecutablePathReturnType result = AZ::Utils::GetExecutablePath(executablePath.data(), executablePath.capacity());
- if (result.m_pathStored != AZ::Utils::ExecutablePathResult::Success)
- {
- AZ_Error("ProjectManager", false, "Could not determine executable path!");
- return false;
- }
- AZ::IO::FixedMaxPath parentPath(executablePath.c_str());
- auto exeFolder = parentPath.ParentPath();
- AZStd::fixed_string<8> debugOption;
- auto lastSep = exeFolder.Native().find_last_of(AZ_CORRECT_FILESYSTEM_SEPARATOR);
- if (lastSep != AZStd::string_view::npos)
- {
- exeFolder = exeFolder.Native().substr(lastSep + 1);
- }
- if (exeFolder == "debug")
- {
- // We need to use the debug version of the python interpreter to load up our debug version of our libraries which work with the debug version of QT living in this folder
- debugOption = "debug ";
- }
- AZ::IO::FixedMaxPath pythonPath = engineRootPath / "python";
- pythonPath /= AZ_TRAIT_AZFRAMEWORK_PYTHON_SHELL;
- auto cmdPath = AZ::IO::FixedMaxPathString::format("%s %s%s --executable_path=%s --parent_pid=%" PRIu32, pythonPath.Native().c_str(),
- debugOption.c_str(), (projectManagerPath / projectsScript).c_str(), executablePath.c_str(), AZ::Platform::GetCurrentProcessId());
AzFramework::ProcessLauncher::ProcessLaunchInfo processLaunchInfo;
-
- processLaunchInfo.m_commandlineParameters = cmdPath;
- processLaunchInfo.m_showWindow = false;
+ processLaunchInfo.m_commandlineParameters = executablePath.String();
launchSuccess = AzFramework::ProcessLauncher::LaunchUnwatchedProcess(processLaunchInfo);
}
if (ownsSystemAllocator)
diff --git a/Code/Framework/AzFramework/AzFramework/Spawnable/Spawnable.h b/Code/Framework/AzFramework/AzFramework/Spawnable/Spawnable.h
index 5e507b3498..79cea647e4 100644
--- a/Code/Framework/AzFramework/AzFramework/Spawnable/Spawnable.h
+++ b/Code/Framework/AzFramework/AzFramework/Spawnable/Spawnable.h
@@ -19,10 +19,13 @@
#include
#include
-namespace AzFramework
+namespace AZ
{
class ReflectContext;
+}
+namespace AzFramework
+{
class Spawnable final
: public AZ::Data::AssetData
{
diff --git a/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesInterface.cpp b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesInterface.cpp
index a528797f63..97169ebeb3 100644
--- a/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesInterface.cpp
+++ b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesInterface.cpp
@@ -14,6 +14,10 @@
namespace AzFramework
{
+ //
+ // SpawnableEntityContainerView
+ //
+
SpawnableEntityContainerView::SpawnableEntityContainerView(AZ::Entity** begin, size_t length)
: m_begin(begin)
, m_end(begin + length)
@@ -52,6 +56,9 @@ namespace AzFramework
}
+ //
+ // SpawnableConstEntityContainerView
+ //
SpawnableConstEntityContainerView::SpawnableConstEntityContainerView(AZ::Entity** begin, size_t length)
: m_begin(begin)
@@ -91,6 +98,136 @@ namespace AzFramework
}
+ //
+ // SpawnableIndexEntityPair
+ //
+
+ SpawnableIndexEntityPair::SpawnableIndexEntityPair(AZ::Entity** entityIterator, size_t* indexIterator)
+ : m_entity(entityIterator)
+ , m_index(indexIterator)
+ {
+ }
+
+ AZ::Entity* SpawnableIndexEntityPair::GetEntity()
+ {
+ return *m_entity;
+ }
+
+ const AZ::Entity* SpawnableIndexEntityPair::GetEntity() const
+ {
+ return *m_entity;
+ }
+
+ size_t SpawnableIndexEntityPair::GetIndex() const
+ {
+ return *m_index;
+ }
+
+ //
+ // SpawnableIndexEntityIterator
+ //
+
+ SpawnableIndexEntityIterator::SpawnableIndexEntityIterator(AZ::Entity** entityIterator, size_t* indexIterator)
+ : m_value(entityIterator, indexIterator)
+ {
+ }
+
+ SpawnableIndexEntityIterator& SpawnableIndexEntityIterator::operator++()
+ {
+ ++m_value.m_entity;
+ ++m_value.m_index;
+ return *this;
+ }
+
+ SpawnableIndexEntityIterator SpawnableIndexEntityIterator::operator++(int)
+ {
+ SpawnableIndexEntityIterator result = *this;
+ ++m_value.m_entity;
+ ++m_value.m_index;
+ return result;
+ }
+
+ SpawnableIndexEntityIterator& SpawnableIndexEntityIterator::operator--()
+ {
+ --m_value.m_entity;
+ --m_value.m_index;
+ return *this;
+ }
+
+ SpawnableIndexEntityIterator SpawnableIndexEntityIterator::operator--(int)
+ {
+ SpawnableIndexEntityIterator result = *this;
+ --m_value.m_entity;
+ --m_value.m_index;
+ return result;
+ }
+
+ bool SpawnableIndexEntityIterator::operator==(const SpawnableIndexEntityIterator& rhs)
+ {
+ return m_value.m_entity == rhs.m_value.m_entity && m_value.m_index == rhs.m_value.m_index;
+ }
+
+ bool SpawnableIndexEntityIterator::operator!=(const SpawnableIndexEntityIterator& rhs)
+ {
+ return m_value.m_entity != rhs.m_value.m_entity || m_value.m_index != rhs.m_value.m_index;
+ }
+
+ SpawnableIndexEntityPair& SpawnableIndexEntityIterator::operator*()
+ {
+ return m_value;
+ }
+
+ const SpawnableIndexEntityPair& SpawnableIndexEntityIterator::operator*() const
+ {
+ return m_value;
+ }
+
+ SpawnableIndexEntityPair* SpawnableIndexEntityIterator::operator->()
+ {
+ return &m_value;
+ }
+
+ const SpawnableIndexEntityPair* SpawnableIndexEntityIterator::operator->() const
+ {
+ return &m_value;
+ }
+
+
+ //
+ // SpawnableConstIndexEntityContainerView
+ //
+
+ SpawnableConstIndexEntityContainerView::SpawnableConstIndexEntityContainerView(
+ AZ::Entity** beginEntity, size_t* beginIndices, size_t length)
+ : m_begin(beginEntity, beginIndices)
+ , m_end(beginEntity + length, beginIndices + length)
+ {
+ }
+
+ const SpawnableIndexEntityIterator& SpawnableConstIndexEntityContainerView::begin()
+ {
+ return m_begin;
+ }
+
+ const SpawnableIndexEntityIterator& SpawnableConstIndexEntityContainerView::end()
+ {
+ return m_end;
+ }
+
+ const SpawnableIndexEntityIterator& SpawnableConstIndexEntityContainerView::cbegin()
+ {
+ return m_begin;
+ }
+
+ const SpawnableIndexEntityIterator& SpawnableConstIndexEntityContainerView::cend()
+ {
+ return m_end;
+ }
+
+
+ //
+ // EntitySpawnTicket
+ //
EntitySpawnTicket::EntitySpawnTicket(EntitySpawnTicket&& rhs)
: m_payload(rhs.m_payload)
diff --git a/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesInterface.h b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesInterface.h
index ac66288ff2..69bca8e111 100644
--- a/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesInterface.h
+++ b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesInterface.h
@@ -58,6 +58,72 @@ namespace AzFramework
AZ::Entity** m_end;
};
+ class SpawnableIndexEntityPair
+ {
+ public:
+ friend class SpawnableIndexEntityIterator;
+
+ AZ::Entity* GetEntity();
+ const AZ::Entity* GetEntity() const;
+ size_t GetIndex() const;
+
+ private:
+ SpawnableIndexEntityPair() = default;
+ SpawnableIndexEntityPair(const SpawnableIndexEntityPair&) = default;
+ SpawnableIndexEntityPair(SpawnableIndexEntityPair&&) = default;
+ SpawnableIndexEntityPair(AZ::Entity** entityIterator, size_t* indexIterator);
+
+ SpawnableIndexEntityPair& operator=(const SpawnableIndexEntityPair&) = default;
+ SpawnableIndexEntityPair& operator=(SpawnableIndexEntityPair&&) = default;
+
+ AZ::Entity** m_entity { nullptr };
+ size_t* m_index { nullptr };
+ };
+
+ class SpawnableIndexEntityIterator
+ {
+ public:
+ // Limited to bidirectional iterator as there's no use case for extending it further, but can be extended if a use case is found.
+ using iterator_category = AZStd::bidirectional_iterator_tag;
+ using value_type = SpawnableIndexEntityPair;
+ using difference_type = size_t;
+ using pointer = SpawnableIndexEntityPair*;
+ using reference = SpawnableIndexEntityPair&;
+
+ SpawnableIndexEntityIterator(AZ::Entity** entityIterator, size_t* indexIterator);
+
+ SpawnableIndexEntityIterator& operator++();
+ SpawnableIndexEntityIterator operator++(int);
+ SpawnableIndexEntityIterator& operator--();
+ SpawnableIndexEntityIterator operator--(int);
+
+ bool operator==(const SpawnableIndexEntityIterator& rhs);
+ bool operator!=(const SpawnableIndexEntityIterator& rhs);
+
+ SpawnableIndexEntityPair& operator*();
+ const SpawnableIndexEntityPair& operator*() const;
+ SpawnableIndexEntityPair* operator->();
+ const SpawnableIndexEntityPair* operator->() const;
+
+ private:
+ SpawnableIndexEntityPair m_value;
+ };
+
+ class SpawnableConstIndexEntityContainerView
+ {
+ public:
+ SpawnableConstIndexEntityContainerView(AZ::Entity** beginEntity, size_t* beginIndices, size_t length);
+
+ const SpawnableIndexEntityIterator& begin();
+ const SpawnableIndexEntityIterator& end();
+ const SpawnableIndexEntityIterator& cbegin();
+ const SpawnableIndexEntityIterator& cend();
+
+ private:
+ SpawnableIndexEntityIterator m_begin;
+ SpawnableIndexEntityIterator m_end;
+ };
+
//! Requests to the SpawnableEntitiesInterface require a ticket with a valid spawnable that be used as a template. A ticket can
//! be reused for multiple calls on the same spawnable and is safe to use by multiple threads at the same time. Entities created
//! from the spawnable may be tracked by the ticket and so using the same ticket is needed to despawn the exact entities created
@@ -88,6 +154,7 @@ namespace AzFramework
using EntityDespawnCallback = AZStd::function;
using ReloadSpawnableCallback = AZStd::function;
using ListEntitiesCallback = AZStd::function;
+ using ListIndicesEntitiesCallback = AZStd::function;
using ClaimEntitiesCallback = AZStd::function;
using BarrierCallback = AZStd::function;
@@ -140,6 +207,15 @@ namespace AzFramework
//! @param ticket Only the entities associated with this ticket will be listed.
//! @param listCallback Required callback that will be called to list the entities on.
virtual void ListEntities(EntitySpawnTicket& ticket, ListEntitiesCallback listCallback) = 0;
+ //! List all entities that are spawned using this ticket with their spawnable index.
+ //! Spawnables contain a flat list of entities, which are used as templates to spawn entities from. For every spawned entity
+ //! the index of the entity in the spawnable that was used as a template is stored. This version of ListEntities will return
+ //! both the entities and this index. The index can be used with SpawnEntities to create the same entities again. Note that
+ //! the same index may appear multiple times as there are no restriction on how many instance of a specific entity can be
+ //! created.
+ //! @param ticket Only the entities associated with this ticket will be listed.
+ //! @param listCallback Required callback that will be called to list the entities and indices on.
+ virtual void ListIndicesAndEntities(EntitySpawnTicket& ticket, ListIndicesEntitiesCallback listCallback) = 0;
//! Claim all entities that are spawned using this ticket. Ownership of the entities is transferred from the ticket to the
//! caller through the callback. After this call the ticket will have no entities associated with it. The caller of
//! this function will need to manage the entities after this call.
diff --git a/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesManager.cpp b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesManager.cpp
index 8045766686..7e20f7b265 100644
--- a/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesManager.cpp
+++ b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesManager.cpp
@@ -25,6 +25,8 @@ namespace AzFramework
void SpawnableEntitiesManager::SpawnAllEntities(EntitySpawnTicket& ticket, EntityPreInsertionCallback preInsertionCallback,
EntitySpawnCallback completionCallback)
{
+ AZ_Assert(ticket.IsValid(), "Ticket provided to SpawnAllEntities hasn't been initialized.");
+
SpawnAllEntitiesCommand queueEntry;
queueEntry.m_ticket = &ticket;
queueEntry.m_completionCallback = AZStd::move(completionCallback);
@@ -40,6 +42,8 @@ namespace AzFramework
EntitySpawnTicket& ticket, AZStd::vector entityIndices,
EntityPreInsertionCallback preInsertionCallback, EntitySpawnCallback completionCallback)
{
+ AZ_Assert(ticket.IsValid(), "Ticket provided to SpawnEntities hasn't been initialized.");
+
SpawnEntitiesCommand queueEntry;
queueEntry.m_ticket = &ticket;
queueEntry.m_entityIndices = AZStd::move(entityIndices);
@@ -54,6 +58,8 @@ namespace AzFramework
void SpawnableEntitiesManager::DespawnAllEntities(EntitySpawnTicket& ticket, EntityDespawnCallback completionCallback)
{
+ AZ_Assert(ticket.IsValid(), "Ticket provided to DespawnAllEntities hasn't been initialized.");
+
DespawnAllEntitiesCommand queueEntry;
queueEntry.m_ticket = &ticket;
queueEntry.m_completionCallback = AZStd::move(completionCallback);
@@ -67,6 +73,8 @@ namespace AzFramework
void SpawnableEntitiesManager::ReloadSpawnable(EntitySpawnTicket& ticket, AZ::Data::Asset spawnable,
ReloadSpawnableCallback completionCallback)
{
+ AZ_Assert(ticket.IsValid(), "Ticket provided to ReloadSpawnable hasn't been initialized.");
+
ReloadSpawnableCommand queueEntry;
queueEntry.m_ticket = &ticket;
queueEntry.m_spawnable = AZStd::move(spawnable);
@@ -81,6 +89,7 @@ namespace AzFramework
void SpawnableEntitiesManager::ListEntities(EntitySpawnTicket& ticket, ListEntitiesCallback listCallback)
{
AZ_Assert(listCallback, "ListEntities called on spawnable entities without a valid callback to use.");
+ AZ_Assert(ticket.IsValid(), "Ticket provided to ListEntities hasn't been initialized.");
ListEntitiesCommand queueEntry;
queueEntry.m_ticket = &ticket;
@@ -92,9 +101,25 @@ namespace AzFramework
}
}
+ void SpawnableEntitiesManager::ListIndicesAndEntities(EntitySpawnTicket& ticket, ListIndicesEntitiesCallback listCallback)
+ {
+ AZ_Assert(listCallback, "ListEntities called on spawnable entities without a valid callback to use.");
+ AZ_Assert(ticket.IsValid(), "Ticket provided to ListEntities hasn't been initialized.");
+
+ ListIndicesEntitiesCommand queueEntry;
+ queueEntry.m_ticket = &ticket;
+ queueEntry.m_listCallback = AZStd::move(listCallback);
+ {
+ AZStd::scoped_lock queueLock(m_pendingRequestQueueMutex);
+ queueEntry.m_ticketId = GetTicketPayload(ticket).m_nextTicketId++;
+ m_pendingRequestQueue.push(AZStd::move(queueEntry));
+ }
+ }
+
void SpawnableEntitiesManager::ClaimEntities(EntitySpawnTicket& ticket, ClaimEntitiesCallback listCallback)
{
AZ_Assert(listCallback, "ClaimEntities called on spawnable entities without a valid callback to use.");
+ AZ_Assert(ticket.IsValid(), "Ticket provided to ClaimEntities hasn't been initialized.");
ClaimEntitiesCommand queueEntry;
queueEntry.m_ticket = &ticket;
@@ -109,6 +134,7 @@ namespace AzFramework
void SpawnableEntitiesManager::Barrier(EntitySpawnTicket& ticket, BarrierCallback completionCallback)
{
AZ_Assert(completionCallback, "Barrier on spawnable entities called without a valid callback to use.");
+ AZ_Assert(ticket.IsValid(), "Ticket provided to Barrier hasn't been initialized.");
BarrierCommand queueEntry;
queueEntry.m_ticket = &ticket;
@@ -499,6 +525,27 @@ namespace AzFramework
}
}
+ bool SpawnableEntitiesManager::ProcessRequest(ListIndicesEntitiesCommand& request, [[maybe_unused]] AZ::SerializeContext& serializeContext)
+ {
+ Ticket& ticket = GetTicketPayload(*request.m_ticket);
+ if (request.m_ticketId == ticket.m_currentTicketId)
+ {
+ AZ_Assert(
+ ticket.m_spawnedEntities.size() == ticket.m_spawnedEntityIndices.size(),
+ "Entities and indices on spawnable ticket have gone out of sync.");
+ request.m_listCallback(
+ *request.m_ticket,
+ SpawnableConstIndexEntityContainerView(
+ ticket.m_spawnedEntities.begin(), ticket.m_spawnedEntityIndices.begin(), ticket.m_spawnedEntities.size()));
+ ticket.m_currentTicketId++;
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
bool SpawnableEntitiesManager::ProcessRequest(ClaimEntitiesCommand& request, [[maybe_unused]] AZ::SerializeContext& serializeContext)
{
Ticket& ticket = GetTicketPayload(*request.m_ticket);
diff --git a/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesManager.h b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesManager.h
index e20f58ac76..3481ab180a 100644
--- a/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesManager.h
+++ b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesManager.h
@@ -36,6 +36,7 @@ namespace AzFramework
{
public:
AZ_RTTI(AzFramework::SpawnableEntitiesManager, "{6E14333F-128C-464C-94CA-A63B05A5E51C}");
+ AZ_CLASS_ALLOCATOR(SpawnableEntitiesManager, AZ::SystemAllocator, 0);
enum class CommandQueueStatus : bool
{
@@ -58,6 +59,7 @@ namespace AzFramework
ReloadSpawnableCallback completionCallback = {}) override;
void ListEntities(EntitySpawnTicket& ticket, ListEntitiesCallback listCallback) override;
+ void ListIndicesAndEntities(EntitySpawnTicket& ticket, ListIndicesEntitiesCallback listCallback) override;
void ClaimEntities(EntitySpawnTicket& ticket, ClaimEntitiesCallback listCallback) override;
void Barrier(EntitySpawnTicket& spawnInfo, BarrierCallback completionCallback) override;
@@ -123,6 +125,12 @@ namespace AzFramework
EntitySpawnTicket* m_ticket;
uint32_t m_ticketId;
};
+ struct ListIndicesEntitiesCommand
+ {
+ ListIndicesEntitiesCallback m_listCallback;
+ EntitySpawnTicket* m_ticket;
+ uint32_t m_ticketId;
+ };
struct ClaimEntitiesCommand
{
ClaimEntitiesCallback m_listCallback;
@@ -141,8 +149,9 @@ namespace AzFramework
uint32_t m_ticketId;
};
- using Requests = AZStd::variant;
+ using Requests = AZStd::variant<
+ SpawnAllEntitiesCommand, SpawnEntitiesCommand, DespawnAllEntitiesCommand, ReloadSpawnableCommand, ListEntitiesCommand,
+ ListIndicesEntitiesCommand, ClaimEntitiesCommand, BarrierCommand, DestroyTicketCommand>;
AZ::Entity* SpawnSingleEntity(const AZ::Entity& entityTemplate,
AZ::SerializeContext& serializeContext);
@@ -155,6 +164,7 @@ namespace AzFramework
bool ProcessRequest(DespawnAllEntitiesCommand& request, AZ::SerializeContext& serializeContext);
bool ProcessRequest(ReloadSpawnableCommand& request, AZ::SerializeContext& serializeContext);
bool ProcessRequest(ListEntitiesCommand& request, AZ::SerializeContext& serializeContext);
+ bool ProcessRequest(ListIndicesEntitiesCommand& request, AZ::SerializeContext& serializeContext);
bool ProcessRequest(ClaimEntitiesCommand& request, AZ::SerializeContext& serializeContext);
bool ProcessRequest(BarrierCommand& request, AZ::SerializeContext& serializeContext);
bool ProcessRequest(DestroyTicketCommand& request, AZ::SerializeContext& serializeContext);
diff --git a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/ViewportInteraction.h b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/ViewportInteraction.h
index 884562d7e8..28971dc779 100644
--- a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/ViewportInteraction.h
+++ b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/ViewportInteraction.h
@@ -41,6 +41,7 @@ namespace AzManipulatorTestFramework
AZStd::optional ViewportScreenToWorld(const AzFramework::ScreenPoint& screenPosition, float depth) override;
AZStd::optional ViewportScreenToWorldRay(
const AzFramework::ScreenPoint& screenPosition) override;
+ float DeviceScalingFactor() override;
private:
// ViewportInteractionRequestBus ...
bool GridSnappingEnabled();
diff --git a/Code/Framework/AzManipulatorTestFramework/Source/ViewportInteraction.cpp b/Code/Framework/AzManipulatorTestFramework/Source/ViewportInteraction.cpp
index ebef9dea30..7d32187a74 100644
--- a/Code/Framework/AzManipulatorTestFramework/Source/ViewportInteraction.cpp
+++ b/Code/Framework/AzManipulatorTestFramework/Source/ViewportInteraction.cpp
@@ -127,4 +127,9 @@ namespace AzManipulatorTestFramework
{
return {};
}
-} // namespace AzManipulatorTestFramework
+
+ float ViewportInteraction::DeviceScalingFactor()
+ {
+ return 1.0f;
+ }
+}// namespace AzManipulatorTestFramework
diff --git a/Code/Framework/AzNetworking/CMakeLists.txt b/Code/Framework/AzNetworking/CMakeLists.txt
index 0fe95441ce..c6673058d7 100644
--- a/Code/Framework/AzNetworking/CMakeLists.txt
+++ b/Code/Framework/AzNetworking/CMakeLists.txt
@@ -65,5 +65,12 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
ly_add_googletest(
NAME AZ::AzNetworking.Tests
)
+
+ ly_add_googletest(
+ NAME AZ::AzNetworking.Tests.Sandbox
+ TARGET AZ::AzNetworking.Tests
+ TEST_SUITE sandbox
+ )
+
endif()
diff --git a/Code/Framework/AzNetworking/Tests/TcpTransport/TcpTransportTests.cpp b/Code/Framework/AzNetworking/Tests/TcpTransport/TcpTransportTests.cpp
index eed12e1881..7cc3af5a51 100644
--- a/Code/Framework/AzNetworking/Tests/TcpTransport/TcpTransportTests.cpp
+++ b/Code/Framework/AzNetworking/Tests/TcpTransport/TcpTransportTests.cpp
@@ -129,7 +129,7 @@ namespace UnitTest
#if AZ_TRAIT_DISABLE_FAILED_NETWORKING_TESTS
TEST_F(TcpTransportTests, DISABLED_TestSingleClient)
#else
- TEST_F(TcpTransportTests, TestSingleClient)
+ TEST_F(TcpTransportTests, SUITE_sandbox_TestSingleClient)
#endif // AZ_TRAIT_DISABLE_FAILED_NETWORKING_TESTS
{
TestTcpServer testServer;
@@ -157,7 +157,7 @@ namespace UnitTest
#if AZ_TRAIT_DISABLE_FAILED_NETWORKING_TESTS
TEST_F(TcpTransportTests, DISABLED_TestMultipleClients)
#else
- TEST_F(TcpTransportTests, TestMultipleClients)
+ TEST_F(TcpTransportTests, SUITE_sandbox_TestMultipleClients)
#endif // AZ_TRAIT_DISABLE_FAILED_NETWORKING_TESTS
{
constexpr uint32_t NumTestClients = 50;
diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/img/UI20/toolbar/Local.svg b/Code/Framework/AzQtComponents/AzQtComponents/Components/img/UI20/toolbar/Local.svg
new file mode 100644
index 0000000000..2017cabe21
--- /dev/null
+++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/img/UI20/toolbar/Local.svg
@@ -0,0 +1,8 @@
+
+
\ No newline at end of file
diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/img/UI20/toolbar/Parent.svg b/Code/Framework/AzQtComponents/AzQtComponents/Components/img/UI20/toolbar/Parent.svg
new file mode 100644
index 0000000000..c0b9580985
--- /dev/null
+++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/img/UI20/toolbar/Parent.svg
@@ -0,0 +1,8 @@
+
+
\ No newline at end of file
diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/img/UI20/toolbar/World.svg b/Code/Framework/AzQtComponents/AzQtComponents/Components/img/UI20/toolbar/World.svg
new file mode 100644
index 0000000000..4d77775e3d
--- /dev/null
+++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/img/UI20/toolbar/World.svg
@@ -0,0 +1,8 @@
+
+
\ No newline at end of file
diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/resources.qrc b/Code/Framework/AzQtComponents/AzQtComponents/Components/resources.qrc
index 8ea4755a24..00fa95d094 100644
--- a/Code/Framework/AzQtComponents/AzQtComponents/Components/resources.qrc
+++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/resources.qrc
@@ -354,6 +354,7 @@
img/UI20/toolbar/Grid.svg
img/UI20/toolbar/Lighting.svg
img/UI20/toolbar/Load.svg
+ img/UI20/toolbar/Local.svg
img/UI20/toolbar/Locked.svg
img/UI20/toolbar/LUA.svg
img/UI20/toolbar/Material.svg
@@ -362,6 +363,7 @@
img/UI20/toolbar/Object_follow_terrain.svg
img/UI20/toolbar/Object_height.svg
img/UI20/toolbar/Object_list.svg
+ img/UI20/toolbar/Parent.svg
img/UI20/toolbar/particle.svg
img/UI20/toolbar/Play.svg
img/UI20/toolbar/Redo.svg
@@ -380,6 +382,7 @@
img/UI20/toolbar/undo.svg
img/UI20/toolbar/Unlocked.svg
img/UI20/toolbar/Vertex_snapping.svg
+ img/UI20/toolbar/World.svg
img/UI20/toolbar/X_axis.svg
img/UI20/toolbar/Y_axis.svg
img/UI20/toolbar/Z_axis.svg
diff --git a/Code/Framework/AzTest/AzTest/Platform/Linux/AzTest_Traits_Linux.h b/Code/Framework/AzTest/AzTest/Platform/Linux/AzTest_Traits_Linux.h
index 0090ce066b..855b4fe416 100644
--- a/Code/Framework/AzTest/AzTest/Platform/Linux/AzTest_Traits_Linux.h
+++ b/Code/Framework/AzTest/AzTest/Platform/Linux/AzTest_Traits_Linux.h
@@ -39,4 +39,3 @@
#define AZ_TRAIT_DISABLE_FAILED_EMOTION_FX_EDITOR_TESTS true
#define AZ_TRAIT_DISABLE_FAILED_METRICS_TESTS true
-#define AZ_TRAIT_DISABLE_ASSET_JOB_PARALLEL_TESTS true
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/API/EditorAssetSystemAPI.h b/Code/Framework/AzToolsFramework/AzToolsFramework/API/EditorAssetSystemAPI.h
index 98e4c6b5eb..715de30bfa 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/API/EditorAssetSystemAPI.h
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/API/EditorAssetSystemAPI.h
@@ -60,10 +60,20 @@ namespace AzToolsFramework
//! and is generally checked into source control.
virtual const char* GetAbsoluteDevRootFolderPath() = 0;
- /// Convert a full source path like "c:\\dev\gamename\\blah\\test.tga" into a relative product path.
+ /// Convert a full source path like "c:\\dev\\gamename\\blah\\test.tga" into a relative product path.
/// asset paths never mention their alias and are relative to the asset cache root
virtual bool GetRelativeProductPathFromFullSourceOrProductPath(const AZStd::string& fullPath, AZStd::string& relativeProductPath) = 0;
+ /** Convert a source path like "c:\\dev\\gamename\\blah\\test.tga" into a relative source path, like "blah/test.tga".
+ * If no valid relative path could be created, the input source path will be returned in relativePath.
+ * @param sourcePath partial or full path to a source file. (The file doesn't need to exist)
+ * @param relativePath the output relative path for the source file, if a valid one could be created
+ * @param rootFilePath the root path that relativePath is relative to
+ * @return true if a valid relative path was created, false if it wasn't
+ */
+ virtual bool GenerateRelativeSourcePath(
+ const AZStd::string& sourcePath, AZStd::string& relativePath, AZStd::string& rootFilePath) = 0;
+
/// Convert a relative asset path like "blah/test.tga" to a full source path path.
/// Once the asset processor has finished building, this function is capable of handling even when the extension changes
/// or when the source is in a different folder or in a different location (such as inside gems)
@@ -110,14 +120,14 @@ namespace AzToolsFramework
/**
* Query to see if a specific asset platform is enabled
- * @param platform the asset platform to check e.g. es3, ios, etc.
+ * @param platform the asset platform to check e.g. android, ios, etc.
* @return true if enabled, false otherwise
*/
virtual bool IsAssetPlatformEnabled(const char* platform) = 0;
/**
* Get the total number of pending assets left to process for a specific asset platform
- * @param platform the asset platform to check e.g. es3, ios, etc.
+ * @param platform the asset platform to check e.g. android, ios, etc.
* @return -1 if the process fails, a positive number otherwise
*/
virtual int GetPendingAssetsForPlatform(const char* platform) = 0;
@@ -302,7 +312,7 @@ namespace AzToolsFramework
inline const char* GetHostAssetPlatform()
{
#if defined(AZ_PLATFORM_MAC)
- return "osx_gl";
+ return "mac";
#elif defined(AZ_PLATFORM_WINDOWS)
return "pc";
#elif defined(AZ_PLATFORM_LINUX)
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/API/EditorViewportIconDisplayInterface.h b/Code/Framework/AzToolsFramework/AzToolsFramework/API/EditorViewportIconDisplayInterface.h
new file mode 100644
index 0000000000..a2264b5058
--- /dev/null
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/API/EditorViewportIconDisplayInterface.h
@@ -0,0 +1,80 @@
+/*
+* 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.
+*
+*/
+#pragma once
+
+#include
+#include
+#include
+
+#include
+
+namespace AzToolsFramework
+{
+ //! An interface for loading simple icon assets and rendering them to screen on a per-viewport basis.
+ class EditorViewportIconDisplayInterface
+ {
+ public:
+ AZ_RTTI(EditorViewportIconDisplayInterface, "{D5190B58-2561-4F3F-B793-F1E7D454CDF2}");
+
+ using IconId = AZ::s32;
+ static constexpr IconId InvalidIconId = -1;
+
+ enum class CoordinateSpace : AZ::u8
+ {
+ ScreenSpace,
+ WorldSpace
+ };
+
+ //! These draw parameters control rendering for a single icon to a single viewport.
+ struct DrawParameters
+ {
+ //! The ViewportId to render to.
+ AzFramework::ViewportId m_viewport = AzFramework::InvalidViewportId;
+ //! The icon ID, retrieved from GetOrLoadIconForPath, to render to screen.
+ IconId m_icon = InvalidIconId;
+ //! The color, including opacity, to render the icon with. White will render the icon as opaque in its original color.
+ AZ::Color m_color = AZ::Colors::White;
+ //! The position to render the icon to, in world or screen space depending on m_positionSpace.
+ AZ::Vector3 m_position;
+ //! The coordinate system to use for m_position.
+ //! ScreenSpace will accept m_position in the form of [X, Y, Depth], where X & Y are screen coordinates in
+ //! pixels and Depth is a z-ordering depth value from 0.0f to 1.0f.
+ //! WorldSpace will accept a 3D vector in world space coordinates that will be translated back into screen
+ //! space when the icon is rendered.
+ CoordinateSpace m_positionSpace = CoordinateSpace::ScreenSpace;
+ //! The size to render the icon as, in pixels.
+ AZ::Vector2 m_size;
+ };
+
+ //! The current load status of an icon retrieved by GetOrLoadIconForPath.
+ enum class IconLoadStatus : AZ::u8
+ {
+ Unloaded,
+ Loading,
+ Loaded,
+ Error
+ };
+
+ //! Draws an icon to a viewport given a set of draw parameters.
+ //! Requires an IconId retrieved from GetOrLoadIconForPath.
+ virtual void DrawIcon(const DrawParameters& drawParameters) = 0;
+ //! Retrieves a reusable IconId for an icon at a given path.
+ //! This will load the icon, if it has not already been loaded.
+ //! @param path should be a relative asset path to an icon image asset.
+ //! png and svg icons are currently supported.
+ virtual IconId GetOrLoadIconForPath(AZStd::string_view path) = 0;
+ //! Gets the current load status of an icon retrieved via GetOrLoadIconForPath.
+ virtual IconLoadStatus GetIconLoadStatus(IconId icon) = 0;
+ };
+
+ using EditorViewportIconDisplay = AZ::Interface;
+} //namespace AzToolsFramework
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/API/ToolsApplicationAPI.h b/Code/Framework/AzToolsFramework/AzToolsFramework/API/ToolsApplicationAPI.h
index 82fa3f94f5..72150b1b57 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/API/ToolsApplicationAPI.h
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/API/ToolsApplicationAPI.h
@@ -239,6 +239,11 @@ namespace AzToolsFramework
*/
virtual int RemoveDirtyEntity(AZ::EntityId target) = 0;
+ /*!
+ * Clears the dirty entity set.
+ */
+ virtual void ClearDirtyEntities() = 0;
+
/*!
* \return true if an undo/redo operation is in progress.
*/
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Application/ToolsApplication.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Application/ToolsApplication.cpp
index e77704c920..88057787bb 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/Application/ToolsApplication.cpp
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Application/ToolsApplication.cpp
@@ -1354,6 +1354,11 @@ namespace AzToolsFramework
return static_cast(m_dirtyEntities.erase(entityId));
}
+ void ToolsApplication::ClearDirtyEntities()
+ {
+ m_dirtyEntities.clear();
+ }
+
void ToolsApplication::UndoPressed()
{
if (m_undoStack)
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Application/ToolsApplication.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Application/ToolsApplication.h
index 6c836ac888..bafced67bd 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/Application/ToolsApplication.h
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Application/ToolsApplication.h
@@ -85,6 +85,7 @@ namespace AzToolsFramework
void AddDirtyEntity(AZ::EntityId entityId) override;
int RemoveDirtyEntity(AZ::EntityId entityId) override;
+ void ClearDirtyEntities() override;
bool IsDuringUndoRedo() override { return m_isDuringUndoRedo; }
void UndoPressed() override;
void RedoPressed() override;
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Asset/AssetSystemComponent.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Asset/AssetSystemComponent.cpp
index 5529829913..4966d9cce9 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/Asset/AssetSystemComponent.cpp
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Asset/AssetSystemComponent.cpp
@@ -265,6 +265,30 @@ namespace AzToolsFramework
return response.m_resolved;
}
+ bool AssetSystemComponent::GenerateRelativeSourcePath(
+ const AZStd::string& sourcePath, AZStd::string& relativePath, AZStd::string& rootFilePath)
+ {
+ AzFramework::SocketConnection* engineConnection = AzFramework::SocketConnection::GetInstance();
+ if (!engineConnection || !engineConnection->IsConnected())
+ {
+ relativePath = sourcePath;
+ return false;
+ }
+
+ AzFramework::AssetSystem::GenerateRelativeSourcePathRequest request(sourcePath);
+ AzFramework::AssetSystem::GenerateRelativeSourcePathResponse response;
+ if (!SendRequest(request, response))
+ {
+ AZ_Error("Editor", false, "Failed to send GenerateRelativeSourcePath request for %s", sourcePath.c_str());
+ relativePath = sourcePath;
+ return false;
+ }
+
+ relativePath = response.m_relativeSourcePath;
+ rootFilePath = response.m_rootFolder;
+ return response.m_resolved;
+ }
+
bool AssetSystemComponent::GetFullSourcePathFromRelativeProductPath(const AZStd::string& relPath, AZStd::string& fullPath)
{
auto foundIt = m_assetSourceRelativePathToFullPathCache.find(relPath);
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Asset/AssetSystemComponent.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Asset/AssetSystemComponent.h
index 399ee1ac9d..9d839c60f5 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/Asset/AssetSystemComponent.h
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Asset/AssetSystemComponent.h
@@ -63,6 +63,8 @@ namespace AzToolsFramework
const char* GetAbsoluteDevGameFolderPath() override;
const char* GetAbsoluteDevRootFolderPath() override;
bool GetRelativeProductPathFromFullSourceOrProductPath(const AZStd::string& fullPath, AZStd::string& outputPath) override;
+ bool GenerateRelativeSourcePath(
+ const AZStd::string& sourcePath, AZStd::string& outputPath, AZStd::string& watchFolder) override;
bool GetFullSourcePathFromRelativeProductPath(const AZStd::string& relPath, AZStd::string& fullPath) override;
bool GetAssetInfoById(const AZ::Data::AssetId& assetId, const AZ::Data::AssetType& assetType, const AZStd::string& platformName, AZ::Data::AssetInfo& assetInfo, AZStd::string& rootFilePath) override;
bool GetSourceInfoBySourcePath(const char* sourcePath, AZ::Data::AssetInfo& assetInfo, AZStd::string& watchFolder) override;
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetPicker/AssetPickerDialog.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetPicker/AssetPickerDialog.cpp
index 9ab50a803c..92711f45b2 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetPicker/AssetPickerDialog.cpp
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetPicker/AssetPickerDialog.cpp
@@ -81,9 +81,20 @@ namespace AzToolsFramework
m_ui->m_assetBrowserTreeViewWidget->SetName("AssetBrowserTreeView_" + name);
+ bool selectedAsset = false;
+
for (auto& assetId : selection.GetSelectedAssetIds())
{
- m_ui->m_assetBrowserTreeViewWidget->SelectProduct(assetId);
+ if (assetId.IsValid())
+ {
+ selectedAsset = true;
+ m_ui->m_assetBrowserTreeViewWidget->SelectProduct(assetId);
+ }
+ }
+
+ if (!selectedAsset)
+ {
+ m_ui->m_assetBrowserTreeViewWidget->SelectFolder(selection.GetDefaultDirectory());
}
setWindowTitle(tr("Pick %1").arg(m_selection.GetTitle()));
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetSelectionModel.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetSelectionModel.cpp
index 65f361dc83..83734a24c3 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetSelectionModel.cpp
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetSelectionModel.cpp
@@ -93,6 +93,16 @@ namespace AzToolsFramework
m_selectedAssetIds.push_back(selectedAssetId);
}
+ void AssetSelectionModel::SetDefaultDirectory(AZStd::string_view defaultDirectory)
+ {
+ m_defaultDirectory = defaultDirectory;
+ }
+
+ AZStd::string_view AssetSelectionModel::GetDefaultDirectory() const
+ {
+ return m_defaultDirectory;
+ }
+
AZStd::vector& AssetSelectionModel::GetResults()
{
return m_results;
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetSelectionModel.h b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetSelectionModel.h
index 59cc9d05e2..5e9d23602a 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetSelectionModel.h
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetSelectionModel.h
@@ -47,6 +47,9 @@ namespace AzToolsFramework
const AZStd::vector& GetSelectedAssetIds() const;
void SetSelectedAssetIds(const AZStd::vector& selectedAssetIds);
void SetSelectedAssetId(const AZ::Data::AssetId& selectedAssetId);
+
+ void SetDefaultDirectory(AZStd::string_view defaultDirectory);
+ AZStd::string_view GetDefaultDirectory() const;
AZStd::vector& GetResults();
const AssetBrowserEntry* GetResult();
@@ -72,6 +75,7 @@ namespace AzToolsFramework
AZStd::vector m_selectedAssetIds;
AZStd::vector m_results;
+ AZStd::string m_defaultDirectory;
QString m_title;
};
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Views/AssetBrowserTreeView.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Views/AssetBrowserTreeView.cpp
index eeee433835..6cd60b0015 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Views/AssetBrowserTreeView.cpp
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Views/AssetBrowserTreeView.cpp
@@ -14,6 +14,7 @@
#include
#include
#include
+#include
#include
@@ -270,7 +271,20 @@ namespace AzToolsFramework
return false;
}
- bool AssetBrowserTreeView::SelectEntry(const QModelIndex& idxParent, const AZStd::vector& entries, const uint32_t entryPathIndex)
+ void AssetBrowserTreeView::SelectFolder(AZStd::string_view folderPath)
+ {
+ if (folderPath.size() == 0)
+ {
+ return;
+ }
+
+ AZStd::vector entries;
+ AZ::StringFunc::Tokenize(folderPath, entries, "/");
+
+ SelectEntry(QModelIndex(), entries, 0, true);
+ }
+
+ bool AssetBrowserTreeView::SelectEntry(const QModelIndex& idxParent, const AZStd::vector& entries, const uint32_t entryPathIndex, bool useDisplayName)
{
if (entries.empty())
{
@@ -285,30 +299,43 @@ namespace AzToolsFramework
auto rowIdx = model()->index(idx, 0, idxParent);
auto rowEntry = GetEntryFromIndex(rowIdx);
- // Check if this entry name matches the query
- if (rowEntry && AzFramework::StringFunc::Equal(entry.c_str(), rowEntry->GetName().c_str(), true))
+ if (rowEntry)
{
- // Final entry found - set it as the selected element
- if (entryPathIndex == entries.size() - 1)
- {
- selectionModel()->clear();
- selectionModel()->select(rowIdx, QItemSelectionModel::Select);
- setCurrentIndex(rowIdx);
- return true;
- }
+ // Check if this entry name matches the query
+ AZStd::string_view compareName = useDisplayName ? (const char*)(rowEntry->GetDisplayName().toUtf8()) : rowEntry->GetName().c_str();
- // If this isn't the final entry, it needs to be a folder for the path to be valid (otherwise, early out)
- if (rowEntry->GetEntryType() == AssetBrowserEntry::AssetEntryType::Folder)
+ if (AzFramework::StringFunc::Equal(entry.c_str(), compareName, true))
{
- // Folder found - if the final entry is found, expand this folder so the final entry is viewable in the Asset Browser (otherwise, early out)
- if (SelectEntry(rowIdx, entries, entryPathIndex + 1))
+ // Final entry found - set it as the selected element
+ if (entryPathIndex == entries.size() - 1)
{
- expand(rowIdx);
+ if (rowEntry->GetEntryType() == AssetBrowserEntry::AssetEntryType::Folder)
+ {
+ // Expand the item itself if it is a folder
+ expand(rowIdx);
+ }
+
+ selectionModel()->clear();
+ selectionModel()->select(rowIdx, QItemSelectionModel::Select);
+ setCurrentIndex(rowIdx);
+
return true;
}
+
+ // If this isn't the final entry, it needs to be a folder for the path to be valid (otherwise, early out)
+ if (rowEntry->GetEntryType() == AssetBrowserEntry::AssetEntryType::Folder)
+ {
+ // Folder found - if the final entry is found, expand this folder so the final entry is viewable in the Asset
+ // Browser (otherwise, early out)
+ if (SelectEntry(rowIdx, entries, entryPathIndex + 1, useDisplayName))
+ {
+ expand(rowIdx);
+ return true;
+ }
+ }
+
+ return false;
}
-
- return false;
}
}
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Views/AssetBrowserTreeView.h b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Views/AssetBrowserTreeView.h
index 697396b09e..19cbd3745a 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Views/AssetBrowserTreeView.h
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Views/AssetBrowserTreeView.h
@@ -60,6 +60,8 @@ namespace AzToolsFramework
AZStd::vector GetSelectedAssets() const;
+ void SelectFolder(AZStd::string_view folderPath);
+
//////////////////////////////////////////////////////////////////////////
// AssetBrowserViewRequestBus
void SelectProduct(AZ::Data::AssetId assetID) override;
@@ -67,6 +69,7 @@ namespace AzToolsFramework
void ClearFilter() override;
void Update() override;
+
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
@@ -105,7 +108,7 @@ namespace AzToolsFramework
QString m_name;
bool SelectProduct(const QModelIndex& idxParent, AZ::Data::AssetId assetID);
- bool SelectEntry(const QModelIndex& idxParent, const AZStd::vector& entryPathTokens, const uint32_t entryPathIndex = 0);
+ bool SelectEntry(const QModelIndex& idxParent, const AZStd::vector& entryPathTokens, const uint32_t entryPathIndex = 0, bool useDisplayName = false);
//! Grab one entry from the source thumbnail list and update it
void UpdateSCThumbnails();
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipInterface.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipInterface.h
index 8412361657..32ea9db3da 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipInterface.h
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipInterface.h
@@ -56,5 +56,7 @@ namespace AzToolsFramework
virtual void StartPlayInEditor() = 0;
virtual void StopPlayInEditor() = 0;
+
+ virtual void CreateNewLevelPrefab(AZStd::string_view filename, const AZStd::string& templateFilename) = 0;
};
}
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipService.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipService.cpp
index da529d9349..439789f11b 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipService.cpp
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipService.cpp
@@ -14,9 +14,11 @@
#include
#include
#include
+#include
#include
#include
#include
+#include
#include
#include
#include
@@ -222,12 +224,11 @@ namespace AzToolsFramework
AzToolsFramework::Prefab::TemplateId templateId = m_prefabSystemComponent->GetTemplateIdFromFilePath(relativePath);
m_rootInstance->SetTemplateSourcePath(relativePath);
+
if (templateId == AzToolsFramework::Prefab::InvalidTemplateId)
{
- // This has not been loaded yet, this is the case of being saved with a different name.
- // Create it
m_rootInstance->m_containerEntity->AddComponent(aznew Prefab::EditorPrefabComponent());
- HandleEntitiesAdded({m_rootInstance->m_containerEntity.get()});
+ HandleEntitiesAdded({ m_rootInstance->m_containerEntity.get() });
AzToolsFramework::Prefab::PrefabDom dom;
bool success = AzToolsFramework::Prefab::PrefabDomUtils::StoreInstanceInPrefabDom(*m_rootInstance, dom);
@@ -236,7 +237,8 @@ namespace AzToolsFramework
AZ_Error("Prefab", false, "Failed to convert current root instance into a DOM when saving file '%.*s'", AZ_STRING_ARG(filename));
return false;
}
- templateId = m_prefabSystemComponent->AddTemplate(relativePath, std::move(dom));
+ templateId = m_prefabSystemComponent->AddTemplate(relativePath, AZStd::move(dom));
+
if (templateId == AzToolsFramework::Prefab::InvalidTemplateId)
{
AZ_Error("Prefab", false, "Couldn't add new template id '%i' when saving file '%.*s'", templateId, AZ_STRING_ARG(filename));
@@ -263,6 +265,71 @@ namespace AzToolsFramework
return false;
}
+ void PrefabEditorEntityOwnershipService::CreateNewLevelPrefab(AZStd::string_view filename, const AZStd::string& templateFilename)
+ {
+ AZ::IO::Path relativePath = m_loaderInterface->GetRelativePathToProject(filename);
+ AzToolsFramework::Prefab::TemplateId templateId = m_prefabSystemComponent->GetTemplateIdFromFilePath(relativePath);
+
+ m_rootInstance->SetTemplateSourcePath(relativePath);
+
+ AZStd::string watchFolder;
+ AZ::Data::AssetInfo assetInfo;
+ bool sourceInfoFound = false;
+ AzToolsFramework::AssetSystemRequestBus::BroadcastResult(
+ sourceInfoFound, &AzToolsFramework::AssetSystemRequestBus::Events::GetSourceInfoBySourcePath, templateFilename.c_str(),
+ assetInfo, watchFolder);
+
+ if (sourceInfoFound)
+ {
+ AZStd::string fullPath;
+ AZ::StringFunc::Path::Join(watchFolder.c_str(), assetInfo.m_relativePath.c_str(), fullPath);
+
+ // Get the default prefab and copy the Dom over to the new template being saved
+ Prefab::TemplateId defaultId = m_loaderInterface->LoadTemplateFromFile(fullPath.c_str());
+ Prefab::PrefabDom& dom = m_prefabSystemComponent->FindTemplateDom(defaultId);
+
+ Prefab::PrefabDom levelDefaultDom;
+ levelDefaultDom.CopyFrom(dom, levelDefaultDom.GetAllocator());
+
+ Prefab::PrefabDomPath sourcePath("/Source");
+ sourcePath.Set(levelDefaultDom, relativePath.c_str());
+
+ templateId = m_prefabSystemComponent->AddTemplate(relativePath, AZStd::move(levelDefaultDom));
+ }
+ else
+ {
+ m_rootInstance->m_containerEntity->AddComponent(aznew Prefab::EditorPrefabComponent());
+ HandleEntitiesAdded({ m_rootInstance->m_containerEntity.get() });
+
+ AzToolsFramework::Prefab::PrefabDom dom;
+ bool success = AzToolsFramework::Prefab::PrefabDomUtils::StoreInstanceInPrefabDom(*m_rootInstance, dom);
+ if (!success)
+ {
+ AZ_Error(
+ "Prefab", false, "Failed to convert current root instance into a DOM when saving file '%.*s'", AZ_STRING_ARG(filename));
+ return;
+ }
+ templateId = m_prefabSystemComponent->AddTemplate(relativePath, std::move(dom));
+ }
+
+ if (templateId == AzToolsFramework::Prefab::InvalidTemplateId)
+ {
+ AZ_Error("Prefab", false, "Couldn't create new template id '%i' when creating new level '%.*s'", templateId, AZ_STRING_ARG(filename));
+ return;
+ }
+
+ Prefab::TemplateId prevTemplateId = m_rootInstance->GetTemplateId();
+ m_rootInstance->SetTemplateId(templateId);
+
+ if (prevTemplateId != Prefab::InvalidTemplateId && templateId != prevTemplateId)
+ {
+ // Make sure we only have one level template loaded at a time
+ m_prefabSystemComponent->RemoveTemplate(prevTemplateId);
+ }
+
+ m_prefabSystemComponent->PropagateTemplateChanges(templateId);
+ }
+
Prefab::InstanceOptionalReference PrefabEditorEntityOwnershipService::CreatePrefab(
const AZStd::vector& entities, AZStd::vector>&& nestedPrefabInstances,
AZ::IO::PathView filePath, Prefab::InstanceOptionalReference instanceToParentUnder)
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipService.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipService.h
index 3be9b95df0..d8eb81dd40 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipService.h
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipService.h
@@ -170,6 +170,8 @@ namespace AzToolsFramework
void StartPlayInEditor() override;
void StopPlayInEditor() override;
+ void CreateNewLevelPrefab(AZStd::string_view filename, const AZStd::string& templateFilename) override;
+
protected:
AZ::SliceComponent::SliceInstanceAddress GetOwningSlice() override;
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/SliceEditorEntityOwnershipService.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/SliceEditorEntityOwnershipService.cpp
index 906ea98357..14dcf5e55d 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/SliceEditorEntityOwnershipService.cpp
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/SliceEditorEntityOwnershipService.cpp
@@ -614,7 +614,7 @@ namespace AzToolsFramework
AZ::Quaternion oldEntityRotation;
AZ::TransformBus::EventResult(oldEntityRotation, id, &AZ::TransformBus::Events::GetWorldRotationQuaternion);
- transformComponent->SetRotationQuaternion(oldEntityRotation);
+ transformComponent->SetWorldRotationQuaternion(oldEntityRotation);
// Ensure the existing hierarchy is maintained
AZ::EntityId oldParentEntityId;
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/LineSegmentSelectionManipulator.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/LineSegmentSelectionManipulator.cpp
index a8fe0e55bd..8874e0dcd9 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/LineSegmentSelectionManipulator.cpp
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/LineSegmentSelectionManipulator.cpp
@@ -31,7 +31,7 @@ namespace AzToolsFramework
rayProportion, lineSegmentProportion, worldClosestPositionRay, worldClosestPositionLineSegment);
AZ::Transform worldFromLocalNormalized = worldFromLocal;
- const AZ::Vector3 scale = worldFromLocalNormalized.ExtractScale() * nonUniformScale;
+ const AZ::Vector3 scale = worldFromLocalNormalized.ExtractUniformScale() * nonUniformScale;
const AZ::Transform localFromWorldNormalized = worldFromLocalNormalized.GetInverse();
return { (localFromWorldNormalized.TransformPoint(worldClosestPositionLineSegment)) / scale };
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/LinearManipulator.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/LinearManipulator.cpp
index 87d966fe84..aa84fc5752 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/LinearManipulator.cpp
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/LinearManipulator.cpp
@@ -59,7 +59,7 @@ namespace AzToolsFramework
? CalculateSnappedOffset(localTransform.GetTranslation(), axis, gridSize * scaleRecip)
: AZ::Vector3::CreateZero();
- const AZ::Vector3 localScale = localTransform.GetScale();
+ const AZ::Vector3 localScale = AZ::Vector3(localTransform.GetUniformScale());
const AZ::Quaternion localRotation = QuaternionFromTransformNoScaling(localTransform);
// calculate scale amount to snap, to align to round scale value
const AZ::Vector3 scaleSnapOffset = snapping && !gridSnapAction.m_localSnapping
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSnapping.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSnapping.h
index db0baa1479..e6c70079df 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSnapping.h
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSnapping.h
@@ -113,7 +113,7 @@ namespace AzToolsFramework
/// noise in the value returned when dealing with values far from the origin.
inline float ScaleReciprocal(const AZ::Transform& transform)
{
- return Round3(transform.GetScale().GetReciprocal().GetMinElement());
+ return Round3(1.0f / transform.GetUniformScale());
}
/// Find the reciprocal of the non-uniform scale.
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSpace.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSpace.cpp
index fba7e35078..cd08a95af7 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSpace.cpp
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSpace.cpp
@@ -39,7 +39,7 @@ namespace AzToolsFramework
AZ::Transform result;
result.SetRotation(m_space.GetRotation() * localTransform.GetRotation());
result.SetTranslation(m_space.TransformPoint(m_nonUniformScale * localTransform.GetTranslation()));
- result.SetScale(m_space.GetScale() * localTransform.GetScale());
+ result.SetScale(m_space.GetScale() * localTransform.GetUniformScale());
return result;
}
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ScaleManipulators.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ScaleManipulators.cpp
index 3af09f644d..caeedd834f 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ScaleManipulators.cpp
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ScaleManipulators.cpp
@@ -82,9 +82,7 @@ namespace AzToolsFramework
m_uniformScaleManipulator->SetVisualOrientationOverride(
QuaternionFromTransformNoScaling(localTransform));
- m_uniformScaleManipulator->SetLocalTransform(
- AZ::Transform::CreateTranslation(localTransform.GetTranslation()) *
- AZ::Transform::CreateScale(localTransform.GetScale()));
+ m_uniformScaleManipulator->SetLocalOrientation(AZ::Quaternion::CreateIdentity());
}
void ScaleManipulators::SetLocalPositionImpl(const AZ::Vector3& localPosition)
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Maths/TransformUtils.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Maths/TransformUtils.h
index 247be33839..a3cc12566f 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/Maths/TransformUtils.h
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Maths/TransformUtils.h
@@ -23,7 +23,7 @@ namespace AzToolsFramework
inline AZ::Transform TransformNormalizedScale(const AZ::Transform& transform)
{
AZ::Transform transformNormalizedScale = transform;
- transformNormalizedScale.SetScale(AZ::Vector3::CreateOne());
+ transformNormalizedScale.SetUniformScale(1.0f);
return transformNormalizedScale;
}
@@ -33,8 +33,7 @@ namespace AzToolsFramework
inline AZ::Transform TransformUniformScale(const AZ::Transform& transform)
{
AZ::Transform transformUniformScale = transform;
- const float maxScale = transformUniformScale.GetScale().GetMaxElement();
- transformUniformScale.SetScale(AZ::Vector3(maxScale));
+ transformUniformScale.SetUniformScale(transformUniformScale.GetUniformScale());
return transformUniformScale;
}
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Instance/InstanceToTemplatePropagator.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Instance/InstanceToTemplatePropagator.cpp
index a21c5301aa..6d3ddedd51 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Instance/InstanceToTemplatePropagator.cpp
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Instance/InstanceToTemplatePropagator.cpp
@@ -276,18 +276,14 @@ namespace AzToolsFramework
PrefabDomValueReference linkPatchesReference =
PrefabDomUtils::FindPrefabDomValue(linkDom, PrefabDomUtils::PatchesName);
- // This logic only covers addition of patches. If patches already exists, the given list of patches must be appended to them.
- if (!linkPatchesReference.has_value())
- {
- /*
- If the original allocator the patches were created with gets destroyed, then the patches would become garbage in the
- linkDom. Since we cannot guarantee the lifecycle of the patch allocators, we are doing a copy of the patches here to
- associate them with the linkDom's allocator.
- */
- PrefabDom patchesCopy;
- patchesCopy.CopyFrom(patches, linkDom.GetAllocator());
- linkDom.AddMember(rapidjson::StringRef(PrefabDomUtils::PatchesName), patchesCopy, linkDom.GetAllocator());
- }
+ /*
+ If the original allocator the patches were created with gets destroyed, then the patches would become garbage in the
+ linkDom. Since we cannot guarantee the lifecycle of the patch allocators, we are doing a copy of the patches here to
+ associate them with the linkDom's allocator.
+ */
+ PrefabDom patchesCopy;
+ patchesCopy.CopyFrom(patches, linkDom.GetAllocator());
+ linkDom.AddMember(rapidjson::StringRef(PrefabDomUtils::PatchesName), patchesCopy, linkDom.GetAllocator());
}
}
}
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Link/Link.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Link/Link.cpp
index 308749ab28..2fb22ea8e8 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Link/Link.cpp
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Link/Link.cpp
@@ -234,5 +234,10 @@ namespace AzToolsFramework
}
}
+ PrefabDomValueReference Link::GetLinkPatches()
+ {
+ return PrefabDomUtils::FindPrefabDomValue(m_linkDom, PrefabDomUtils::PatchesName);
+ }
+
} // namespace Prefab
} // namespace AzToolsFramework
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Link/Link.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Link/Link.h
index 073e619f20..c8f43b291e 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Link/Link.h
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Link/Link.h
@@ -79,6 +79,8 @@ namespace AzToolsFramework
*/
void AddLinkIdToInstanceDom(PrefabDomValue& instanceDomValue);
+ PrefabDomValueReference GetLinkPatches();
+
private:
/**
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabLoader.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabLoader.cpp
index 7b4761c39a..2965148172 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabLoader.cpp
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabLoader.cpp
@@ -41,7 +41,7 @@ namespace AzToolsFramework
[[maybe_unused]] bool result =
settingsRegistry->Get(m_projectPathWithOsSeparator.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_ProjectPath);
- AZ_Assert(result, "Couldn't retrieve project root path");
+ AZ_Warning("Prefab", result, "Couldn't retrieve project root path");
m_projectPathWithSlashSeparator = AZ::IO::Path(m_projectPathWithOsSeparator.Native(), '/').MakePreferred();
AZ::Interface::Register(this);
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp
index 579f465eb2..0181050a32 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp
@@ -10,8 +10,6 @@
*
*/
-#include
-
#include
#include
#include
@@ -28,6 +26,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -98,9 +97,13 @@ namespace AzToolsFramework
AZStd::string("Could not create a new prefab out of the entities provided - invalid selection."));
}
+ AZStd::unordered_map oldEntityAliases;
+
// Detach the retrieved entities
for (AZ::Entity* entity : entities)
{
+ AZ::EntityId entityId = entity->GetId();
+ oldEntityAliases.emplace(entityId, commonRootEntityOwningInstance->get().GetEntityAlias(entityId)->get());
commonRootEntityOwningInstance->get().DetachEntity(entity->GetId()).release();
}
@@ -110,15 +113,18 @@ namespace AzToolsFramework
{
AZStd::unique_ptr outInstance = commonRootEntityOwningInstance->get().DetachNestedInstance(nestedInstance->GetInstanceAlias());
- auto linkRef = m_prefabSystemComponentInterface->FindLink(nestedInstance->GetLinkId());
+ LinkId detachingInstanceLinkId = nestedInstance->GetLinkId();
+ auto linkRef = m_prefabSystemComponentInterface->FindLink(detachingInstanceLinkId);
+ AZ_Assert(linkRef.has_value(), "Unable to find link with id '%llu' during prefab creation.", detachingInstanceLinkId);
- if (linkRef.has_value())
- {
- PrefabDom oldLinkPatches;
- oldLinkPatches.CopyFrom(linkRef->get().GetLinkDom(), oldLinkPatches.GetAllocator());
+ PrefabDomValueReference linkPatches = linkRef->get().GetLinkPatches();
+ AZ_Assert(
+ linkPatches.has_value(), "Unable to get patches on link with id '%llu' during prefab creation.",
+ detachingInstanceLinkId);
- nestedInstanceLinkPatchesMap.emplace(nestedInstance, AZStd::move(oldLinkPatches));
- }
+ PrefabDom linkPatchesCopy;
+ linkPatchesCopy.CopyFrom(linkPatches->get(), linkPatchesCopy.GetAllocator());
+ nestedInstanceLinkPatchesMap.emplace(nestedInstance, AZStd::move(linkPatchesCopy));
RemoveLink(outInstance, commonRootEntityOwningInstance->get().GetTemplateId(), undoBatch.GetUndoBatch());
@@ -182,6 +188,24 @@ namespace AzToolsFramework
if (nestedInstanceLinkPatchesMap.contains(nestedInstance.get()))
{
previousPatch = AZStd::move(nestedInstanceLinkPatchesMap[nestedInstance.get()]);
+ rapidjson::StringBuffer buffer;
+ rapidjson::Writer writer(buffer);
+ previousPatch.Accept(writer);
+ QString previousPatchString(buffer.GetString());
+
+ for (AZ::Entity* entity : entities)
+ {
+ AZ::EntityId entityId = entity->GetId();
+ AZStd::string oldEntityAlias = oldEntityAliases[entityId];
+ EntityAliasOptionalReference newEntityAlias = instanceToCreate->get().GetEntityAlias(entityId);
+ AZ_Assert(
+ newEntityAlias.has_value(),
+ "Could not fetch entity alias for entity with id '%llu' during prefab creation.",
+ static_cast(entityId));
+ ReplaceOldAliases(previousPatchString, oldEntityAlias, newEntityAlias->get());
+ }
+
+ previousPatch.Parse(previousPatchString.toUtf8().constData());
}
// These link creations shouldn't be undone because that would put the template in a non-usable state if a user
@@ -203,36 +227,23 @@ namespace AzToolsFramework
m_instanceToTemplateInterface->GeneratePatch(reparentPatch, containerEntityDomBefore, containerEntityDomAfter);
m_instanceToTemplateInterface->AppendEntityAliasToPatchPaths(reparentPatch, nestedInstanceContainerEntityId);
- // Update the cache - this prevents these changes from being stored in the regular undo/redo nodes as a separate step
- m_prefabUndoCache.Store(nestedInstanceContainerEntityId, AZStd::move(containerEntityDomAfter));
-
- // Save these changes as patches to the link
- PrefabUndoLinkUpdate* linkUpdate = aznew PrefabUndoLinkUpdate(AZStd::to_string(static_cast(nestedInstanceContainerEntityId)));
- linkUpdate->SetParent(undoBatch.GetUndoBatch());
- linkUpdate->Capture(reparentPatch, nestedInstance->GetLinkId());
-
- linkUpdate->Redo();
+ // We won't parent this undo node to the undo batch so that the newly created template and link will remain
+ // unaffected by undo actions. This is needed so that any future instantiations of the template will work.
+ PrefabUndoLinkUpdate linkUpdate = PrefabUndoLinkUpdate(AZStd::to_string(static_cast(nestedInstanceContainerEntityId)));
+ linkUpdate.Capture(reparentPatch, nestedInstance->GetLinkId());
+ linkUpdate.Redo();
}
});
-
+
// Create a link between the templates of the newly created instance and the instance it's being parented under.
CreateLink(
instanceToCreate->get(), commonRootEntityOwningInstance->get().GetTemplateId(), undoBatch.GetUndoBatch(),
AZStd::move(patch));
- for (AZ::Entity* topLevelEntity : topLevelEntities)
- {
- AZ::EntityId topLevelEntityId = topLevelEntity->GetId();
- if (topLevelEntityId.IsValid())
- {
- m_prefabUndoCache.UpdateCache(topLevelEntity->GetId());
-
- // Parenting entities would mark entities as dirty. But we want to unmark the top level entities as dirty because
- // if we don't, the template created would be updated and cause issues with undo operation followed by instantiation.
- ToolsApplicationRequests::Bus::Broadcast(
- &ToolsApplicationRequests::Bus::Events::RemoveDirtyEntity, topLevelEntity->GetId());
- }
- }
+ // This clears any entities marked as dirty due to reparenting of entities during the process of creating a prefab.
+ // We are doing this so that the changes in those enities are not queued up twice for propagation.
+ AzToolsFramework::ToolsApplicationRequestBus::Broadcast(
+ &AzToolsFramework::ToolsApplicationRequestBus::Events::ClearDirtyEntities);
// Select Container Entity
{
@@ -824,15 +835,7 @@ namespace AzToolsFramework
// This will cover both cases where an alias could be used in a normal entity vs. an instance
for (auto aliasMapIter : oldAliasToNewAliasMap)
{
- QString oldAliasQuotes = QString("\"%1\"").arg(aliasMapIter.first.c_str());
- QString newAliasQuotes = QString("\"%1\"").arg(aliasMapIter.second.c_str());
-
- newEntityDomString.replace(oldAliasQuotes, newAliasQuotes);
-
- QString oldAliasPathRef = QString("/%1").arg(aliasMapIter.first.c_str());
- QString newAliasPathRef = QString("/%1").arg(aliasMapIter.second.c_str());
-
- newEntityDomString.replace(oldAliasPathRef, newAliasPathRef);
+ ReplaceOldAliases(newEntityDomString, aliasMapIter.first, aliasMapIter.second);
}
// Create the new Entity DOM from parsing the JSON string
@@ -1233,5 +1236,18 @@ namespace AzToolsFramework
return true;
}
+
+ void PrefabPublicHandler::ReplaceOldAliases(QString& stringToReplace, AZStd::string_view oldAlias, AZStd::string_view newAlias)
+ {
+ QString oldAliasQuotes = QString("\"%1\"").arg(oldAlias.data());
+ QString newAliasQuotes = QString("\"%1\"").arg(newAlias.data());
+
+ stringToReplace.replace(oldAliasQuotes, newAliasQuotes);
+
+ QString oldAliasPathRef = QString("/%1").arg(oldAlias.data());
+ QString newAliasPathRef = QString("/%1").arg(newAlias.data());
+
+ stringToReplace.replace(oldAliasPathRef, newAliasPathRef);
+ }
} // namespace Prefab
} // namespace AzToolsFramework
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.h
index 223a725c6c..7e2357dd44 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.h
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.h
@@ -14,12 +14,15 @@
#include
#include
+#include
#include
#include
#include
#include
+class QString;
+
namespace AzToolsFramework
{
using EntityList = AZStd::vector;
@@ -27,7 +30,6 @@ namespace AzToolsFramework
namespace Prefab
{
class Instance;
-
class InstanceEntityMapperInterface;
class InstanceToTemplateInterface;
class PrefabLoaderInterface;
@@ -130,6 +132,8 @@ namespace AzToolsFramework
bool IsCyclicalDependencyFound(
InstanceOptionalConstReference instance, const AZStd::unordered_set& templateSourcePaths);
+ void ReplaceOldAliases(QString& stringToReplace, AZStd::string_view oldAlias, AZStd::string_view newAlias);
+
static Instance* GetParentInstance(Instance* instance);
static Instance* GetAncestorOfInstanceThatIsChildOfRoot(const Instance* ancestor, Instance* descendant);
static void GenerateContainerEntityTransform(const EntityList& topLevelEntities, AZ::Vector3& translation, AZ::Quaternion& rotation);
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Slice/SliceUtilities.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Slice/SliceUtilities.cpp
index 4b73166b3d..38a6156ec5 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/Slice/SliceUtilities.cpp
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Slice/SliceUtilities.cpp
@@ -1475,10 +1475,8 @@ namespace AzToolsFramework
// to avoid pushing them to the slice.
// Only scale is preserved on the root entity of a slice.
transformComponent->SetParent(AZ::EntityId());
- AZ::Vector3 scale = transformComponent->GetLocalScale();
transformComponent->SetWorldTranslation(AZ::Vector3::CreateZero());
transformComponent->SetLocalRotation(AZ::Vector3::CreateZero());
- transformComponent->SetLocalScale(scale);
}
}
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/EditorComponentAdapter.h b/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/EditorComponentAdapter.h
index 6950717499..0ca5853adc 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/EditorComponentAdapter.h
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/EditorComponentAdapter.h
@@ -1,22 +1,22 @@
/*
-* 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.
-*
-*/
+ * 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.
+ *
+ */
#pragma once
-#include
-#include
-#include
#include
#include
+#include
+#include
+#include
namespace AzToolsFramework
{
@@ -31,7 +31,7 @@ namespace AzToolsFramework
To use the EditorComponentAdapter, 3 classes are required:
- a class that implements the functions required for TController (see below)
- a configuration struct/class which extends AZ::ComponentConfig
- - A runtime component that will be generated by the editor comoinent on export
+ - A runtime component that will be generated by the editor component on export
The concrete component extends the adapter and implements behavior which is unique to the component.
@@ -64,15 +64,15 @@ namespace AzToolsFramework
the EditContext. TController can friend itself to the editor component to make this work if required.
*/
template
- class EditorComponentAdapter
- : public EditorComponentBase
+ class EditorComponentAdapter : public EditorComponentBase
{
public:
-
- AZ_RTTI((EditorComponentAdapter, "{2F5A3669-FFE9-4CD7-B9E2-7FC8100CF1A2}", TController, TRuntimeComponent, TConfiguration), EditorComponentBase);
+ AZ_RTTI(
+ (EditorComponentAdapter, "{2F5A3669-FFE9-4CD7-B9E2-7FC8100CF1A2}", TController, TRuntimeComponent, TConfiguration),
+ EditorComponentBase);
EditorComponentAdapter() = default;
- EditorComponentAdapter(const TConfiguration& configuration);
+ explicit EditorComponentAdapter(const TConfiguration& configuration);
static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& services);
static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& services);
@@ -86,7 +86,6 @@ namespace AzToolsFramework
void BuildGameEntity(AZ::Entity* gameEntity) override;
protected:
-
static void Reflect(AZ::ReflectContext* context);
// AZ::Component overrides ...
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/EditorComponentAdapter.inl b/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/EditorComponentAdapter.inl
index 04619b079d..b8bd24589a 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/EditorComponentAdapter.inl
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/EditorComponentAdapter.inl
@@ -1,14 +1,14 @@
/*
-* 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.
-*
-*/
+ * 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.
+ *
+ */
#include
@@ -28,23 +28,21 @@ namespace AzToolsFramework
template
void EditorComponentAdapter::Reflect(AZ::ReflectContext* context)
{
- if (AZ::SerializeContext* serializeContext = azrtti_cast(context))
+ if (auto serializeContext = azrtti_cast(context))
{
- serializeContext->Class()
- ->Version(1)
- ->Field("Controller", &EditorComponentAdapter::m_controller)
- ;
+ serializeContext->Class()->Version(1)->Field(
+ "Controller", &EditorComponentAdapter::m_controller);
if (AZ::EditContext* editContext = serializeContext->GetEditContext())
{
- editContext->Class(
- "EditorComponentAdapter", "")
+ // clang-format off
+ editContext->Class("EditorComponentAdapter", "")
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
->Attribute(AZ::Edit::Attributes::AutoExpand, true)
->DataElement(AZ::Edit::UIHandlers::Default, &EditorComponentAdapter::m_controller, "Controller", "")
->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly)
- ->Attribute(AZ::Edit::Attributes::ChangeNotify, &EditorComponentAdapter::OnConfigurationChanged)
- ;
+ ->Attribute(AZ::Edit::Attributes::ChangeNotify, &EditorComponentAdapter::OnConfigurationChanged);
+ // clang-format on
}
}
}
@@ -53,27 +51,35 @@ namespace AzToolsFramework
// Get*Services functions
template
- void EditorComponentAdapter::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& services)
+ void EditorComponentAdapter::GetProvidedServices(
+ AZ::ComponentDescriptor::DependencyArrayType& services)
{
- AzFramework::Components::GetProvidedServicesHelper(services, typename AZ::HasComponentProvidedServices::type());
+ AzFramework::Components::GetProvidedServicesHelper(
+ services, typename AZ::HasComponentProvidedServices::type());
}
template
- void EditorComponentAdapter::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& services)
+ void EditorComponentAdapter::GetRequiredServices(
+ AZ::ComponentDescriptor::DependencyArrayType& services)
{
- AzFramework::Components::GetRequiredServicesHelper(services, typename AZ::HasComponentRequiredServices::type());
+ AzFramework::Components::GetRequiredServicesHelper(
+ services, typename AZ::HasComponentRequiredServices::type());
}
template
- void EditorComponentAdapter::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& services)
+ void EditorComponentAdapter::GetIncompatibleServices(
+ AZ::ComponentDescriptor::DependencyArrayType& services)
{
- AzFramework::Components::GetIncompatibleServicesHelper(services, typename AZ::HasComponentIncompatibleServices::type());
+ AzFramework::Components::GetIncompatibleServicesHelper(
+ services, typename AZ::HasComponentIncompatibleServices::type());
}
template
- void EditorComponentAdapter::GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& services)
+ void EditorComponentAdapter::GetDependentServices(
+ AZ::ComponentDescriptor::DependencyArrayType& services)
{
- AzFramework::Components::GetDependentServicesHelper(services, typename AZ::HasComponentDependentServices::type());
+ AzFramework::Components::GetDependentServicesHelper(
+ services, typename AZ::HasComponentDependentServices::type());
}
//////////////////////////////////////////////////////////////////////////
@@ -99,7 +105,8 @@ namespace AzToolsFramework
if (ShouldActivateController())
{
- m_controller.Activate(GetEntityId());
+ AzFramework::Components::ComponentActivateHelper::Activate(
+ m_controller, AZ::EntityComponentIdPair(GetEntityId(), GetId()));
}
}
@@ -122,7 +129,8 @@ namespace AzToolsFramework
}
template
- bool EditorComponentAdapter::WriteOutConfig(AZ::ComponentConfig* outBaseConfig) const
+ bool EditorComponentAdapter::WriteOutConfig(
+ AZ::ComponentConfig* outBaseConfig) const
{
if (auto config = azrtti_cast(outBaseConfig))
{
@@ -139,7 +147,8 @@ namespace AzToolsFramework
if (ShouldActivateController())
{
- m_controller.Activate(GetEntityId());
+ AzFramework::Components::ComponentActivateHelper::Activate(
+ m_controller, AZ::EntityComponentIdPair(GetEntityId(), GetId()));
}
return AZ::Edit::PropertyRefreshLevels::None;
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/EditorEntityIconComponent.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/EditorEntityIconComponent.cpp
index 48a7a37487..c46bb158c6 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/EditorEntityIconComponent.cpp
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/EditorEntityIconComponent.cpp
@@ -17,6 +17,7 @@
#include
#include
+#include