diff --git a/Assets/Editor/ObjectIcons/AreaTrigger.bmp b/Assets/Editor/ObjectIcons/AreaTrigger.bmp
deleted file mode 100644
index 779e9bd30f..0000000000
--- a/Assets/Editor/ObjectIcons/AreaTrigger.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:4cf08659d31a337ceb28de2765b0177abf404f3e671f5277dd7a280f2fd6c60d
-size 3128
diff --git a/Assets/Editor/ObjectIcons/AudioAreaAmbience.bmp b/Assets/Editor/ObjectIcons/AudioAreaAmbience.bmp
deleted file mode 100644
index 052eb463cb..0000000000
--- a/Assets/Editor/ObjectIcons/AudioAreaAmbience.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:706b12b37518596b01fc6c5cdb3aadc5fdbe76b668e9989ba2bb03ee23376dbf
-size 3126
diff --git a/Assets/Editor/ObjectIcons/AudioAreaEntity.bmp b/Assets/Editor/ObjectIcons/AudioAreaEntity.bmp
deleted file mode 100644
index b490f91bc4..0000000000
--- a/Assets/Editor/ObjectIcons/AudioAreaEntity.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:7e67540926b2d55c70ac5867266ac9688437fc139b459f165f9d52d9b351851c
-size 3128
diff --git a/Assets/Editor/ObjectIcons/AudioAreaRandom.bmp b/Assets/Editor/ObjectIcons/AudioAreaRandom.bmp
deleted file mode 100644
index 73a0a21256..0000000000
--- a/Assets/Editor/ObjectIcons/AudioAreaRandom.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:96ec04e8126bcffb7fe391dc55ea1aa6a82419825c8305117f9b0ae72b40e63e
-size 3126
diff --git a/Assets/Editor/ObjectIcons/Camera.bmp b/Assets/Editor/ObjectIcons/Camera.bmp
deleted file mode 100644
index fd89801011..0000000000
--- a/Assets/Editor/ObjectIcons/Camera.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:4168676b803b7e3b03a90fb69502204a418b6598941c75f0c36e589a31455db5
-size 3128
diff --git a/Assets/Editor/ObjectIcons/Checkpoint.bmp b/Assets/Editor/ObjectIcons/Checkpoint.bmp
deleted file mode 100644
index fd31d3c446..0000000000
--- a/Assets/Editor/ObjectIcons/Checkpoint.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:b11c94da25b704a36f2b437dae98c04a5cea54f02022567306e2cf82837bf7a1
-size 3128
diff --git a/Assets/Editor/ObjectIcons/ClipVolume.bmp b/Assets/Editor/ObjectIcons/ClipVolume.bmp
deleted file mode 100644
index dba0aa32ba..0000000000
--- a/Assets/Editor/ObjectIcons/ClipVolume.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:8ca14c966de6d392beb4d154221b622a417163fcdf92eb049638bf8495c13774
-size 3128
diff --git a/Assets/Editor/ObjectIcons/Clock.bmp b/Assets/Editor/ObjectIcons/Clock.bmp
deleted file mode 100644
index 1557a7e8dc..0000000000
--- a/Assets/Editor/ObjectIcons/Clock.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:6d11fd9413f06706bc706a97f39cc72b1ae6ff7cb6c506cf2fcda98660e2a92f
-size 3128
diff --git a/Assets/Editor/ObjectIcons/Clouds.bmp b/Assets/Editor/ObjectIcons/Clouds.bmp
deleted file mode 100644
index 4530661aac..0000000000
--- a/Assets/Editor/ObjectIcons/Clouds.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:1f5fd7032f82fbb7364cd0a96989918defd63f26a899836c61b039541cf3b3af
-size 3128
diff --git a/Assets/Editor/ObjectIcons/Comment.bmp b/Assets/Editor/ObjectIcons/Comment.bmp
deleted file mode 100644
index 78a8d8f4fa..0000000000
--- a/Assets/Editor/ObjectIcons/Comment.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:9201d97225c19b8fc2fc208ab913ab100a94328b64b026ab65be9c4cd9c4e28a
-size 3128
diff --git a/Assets/Editor/ObjectIcons/DeadBody.bmp b/Assets/Editor/ObjectIcons/DeadBody.bmp
deleted file mode 100644
index ffebc73608..0000000000
--- a/Assets/Editor/ObjectIcons/DeadBody.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:a2937837233d9f313b2500232c74952cee3f4e7497ee0e1099b301ef2fa49bf8
-size 3128
diff --git a/Assets/Editor/ObjectIcons/Decal.bmp b/Assets/Editor/ObjectIcons/Decal.bmp
deleted file mode 100644
index 4b33fe7422..0000000000
--- a/Assets/Editor/ObjectIcons/Decal.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:ffbe8438c19ac2a9b6614beb78f0d651184dbe5cf2998063257dc7272c9c2c10
-size 3128
diff --git a/Assets/Editor/ObjectIcons/Dialog.bmp b/Assets/Editor/ObjectIcons/Dialog.bmp
deleted file mode 100644
index 0722f5f1e4..0000000000
--- a/Assets/Editor/ObjectIcons/Dialog.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:63640478bd3258aa310dd639014cde714780ebaa168aa784093e74fc0da23a4c
-size 3126
diff --git a/Assets/Editor/ObjectIcons/Flash.bmp b/Assets/Editor/ObjectIcons/Flash.bmp
deleted file mode 100644
index d7f02ed44b..0000000000
--- a/Assets/Editor/ObjectIcons/Flash.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:b66daefbb3f11f527d9c10ff1dd54f87635e6561cc546a762ae2e72793ae6ef6
-size 3128
diff --git a/Assets/Editor/ObjectIcons/Fog.bmp b/Assets/Editor/ObjectIcons/Fog.bmp
deleted file mode 100644
index 2af489a79a..0000000000
--- a/Assets/Editor/ObjectIcons/Fog.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:42e0c1dc60809958d74145ae14030c22e351ef3b72ed6d820fdb19632b691c89
-size 3128
diff --git a/Assets/Editor/ObjectIcons/FogVolume.bmp b/Assets/Editor/ObjectIcons/FogVolume.bmp
deleted file mode 100644
index 78d20bff41..0000000000
--- a/Assets/Editor/ObjectIcons/FogVolume.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:2cbb23fc09d47d16b2414d622fd16b330d9f684398dcfc44e0fb44378dfd3287
-size 3128
diff --git a/Assets/Editor/ObjectIcons/GravitySphere.bmp b/Assets/Editor/ObjectIcons/GravitySphere.bmp
deleted file mode 100644
index 06168d4698..0000000000
--- a/Assets/Editor/ObjectIcons/GravitySphere.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:26b6e2f28ed72b9cdb90410351e3a22fee3c0498ac315e71d966a1ffb77742fe
-size 3128
diff --git a/Assets/Editor/ObjectIcons/Item.bmp b/Assets/Editor/ObjectIcons/Item.bmp
deleted file mode 100644
index 15c610cad2..0000000000
--- a/Assets/Editor/ObjectIcons/Item.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:bd6f39152affb52a7b3c4361032d1d7d77e7e94841613a83d7e2cdea9eaab553
-size 3128
diff --git a/Assets/Editor/ObjectIcons/Ladder.bmp b/Assets/Editor/ObjectIcons/Ladder.bmp
deleted file mode 100644
index dbd4a288e7..0000000000
--- a/Assets/Editor/ObjectIcons/Ladder.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:077502953026981b6e8cc5e40ab58722fc514947f175021508e6af8058340f32
-size 3128
diff --git a/Assets/Editor/ObjectIcons/Light.bmp b/Assets/Editor/ObjectIcons/Light.bmp
deleted file mode 100644
index 6a3347e78c..0000000000
--- a/Assets/Editor/ObjectIcons/Light.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:c9ecfc056ab66b3221be3175889d182229c0e49bf9604abd7946fe58cc7d29a9
-size 3128
diff --git a/Assets/Editor/ObjectIcons/LightPropagationVolume.bmp b/Assets/Editor/ObjectIcons/LightPropagationVolume.bmp
deleted file mode 100644
index 4ad9437883..0000000000
--- a/Assets/Editor/ObjectIcons/LightPropagationVolume.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:206820d3bb5d6a4d26bf87fc0b91a36adcbd0f154149b7cb5f5ce067f5ee4d67
-size 3128
diff --git a/Assets/Editor/ObjectIcons/Lightning.bmp b/Assets/Editor/ObjectIcons/Lightning.bmp
deleted file mode 100644
index 5c02d0368c..0000000000
--- a/Assets/Editor/ObjectIcons/Lightning.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:d7c81a8000339695f73277bcebaedb0cfeacdff547f51c1ff7f4761c75927ca4
-size 3126
diff --git a/Assets/Editor/ObjectIcons/Magnet.bmp b/Assets/Editor/ObjectIcons/Magnet.bmp
deleted file mode 100644
index 68b6e4e7e4..0000000000
--- a/Assets/Editor/ObjectIcons/Magnet.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:560c3af6e8f2fb98ddc8638b0ea4786131e75b6fe0acece964bfdb28f8c3ec9f
-size 3128
diff --git a/Assets/Editor/ObjectIcons/MultiTrigger.bmp b/Assets/Editor/ObjectIcons/MultiTrigger.bmp
deleted file mode 100644
index e96dc6f1b7..0000000000
--- a/Assets/Editor/ObjectIcons/MultiTrigger.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:8a3a64d33b65c4cd5d666c11abf03b4148acadfe69e4c80e79382b56d2906ae6
-size 3128
diff --git a/Assets/Editor/ObjectIcons/ODD.bmp b/Assets/Editor/ObjectIcons/ODD.bmp
deleted file mode 100644
index 5c5a7bbd89..0000000000
--- a/Assets/Editor/ObjectIcons/ODD.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:113d0a416da49ce24dae2c47514318b75e0ca4d7dc257a9927e0db4bdad35d91
-size 3128
diff --git a/Assets/Editor/ObjectIcons/Particles.bmp b/Assets/Editor/ObjectIcons/Particles.bmp
deleted file mode 100644
index 8f71edb74f..0000000000
--- a/Assets/Editor/ObjectIcons/Particles.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:6ca81d96a5450660f7e17f75565595368fb7c0071df9589bcbfda2ba54d5c0ae
-size 3128
diff --git a/Assets/Editor/ObjectIcons/PrecacheCamera.bmp b/Assets/Editor/ObjectIcons/PrecacheCamera.bmp
deleted file mode 100644
index 8f1dca751a..0000000000
--- a/Assets/Editor/ObjectIcons/PrecacheCamera.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:73629b1903365aa6acf35fd7846896c23c38401fac12bc23b23285e5ed9ae89d
-size 3126
diff --git a/Assets/Editor/ObjectIcons/Prefab.bmp b/Assets/Editor/ObjectIcons/Prefab.bmp
deleted file mode 100644
index 539a0f5a56..0000000000
--- a/Assets/Editor/ObjectIcons/Prefab.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:6d7fbb76f67165492a51e6b8715ee3716040d44bd5419b12481e2c9cc627c291
-size 3128
diff --git a/Assets/Editor/ObjectIcons/Prompt.bmp b/Assets/Editor/ObjectIcons/Prompt.bmp
deleted file mode 100644
index 1e9b18a97c..0000000000
--- a/Assets/Editor/ObjectIcons/Prompt.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:2482da67fbf513a9597b3919562a65d361a4c8264fcc8510ef45321b4192ce4d
-size 3128
diff --git a/Assets/Editor/ObjectIcons/SavePoint.bmp b/Assets/Editor/ObjectIcons/SavePoint.bmp
deleted file mode 100644
index ce602eeeb4..0000000000
--- a/Assets/Editor/ObjectIcons/SavePoint.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:06f866e66e0458ccf3e014a30fef2dfaab832d9b4b1179f98b7cdd716b358b48
-size 3128
diff --git a/Assets/Editor/ObjectIcons/Seed.bmp b/Assets/Editor/ObjectIcons/Seed.bmp
deleted file mode 100644
index 3a9452d982..0000000000
--- a/Assets/Editor/ObjectIcons/Seed.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:fdcea1e14d3b01b1ed6ea123767343eddc646969ee447b4bf725c233fd7946f4
-size 3128
diff --git a/Assets/Editor/ObjectIcons/Sound.bmp b/Assets/Editor/ObjectIcons/Sound.bmp
deleted file mode 100644
index 06ab261be3..0000000000
--- a/Assets/Editor/ObjectIcons/Sound.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:14a4003a9faf9a2fb3a17d2f87825c8497aeaca364c592ab75970d00e77aa203
-size 3128
diff --git a/Assets/Editor/ObjectIcons/SpawnPoint.bmp b/Assets/Editor/ObjectIcons/SpawnPoint.bmp
deleted file mode 100644
index b04a20e8c0..0000000000
--- a/Assets/Editor/ObjectIcons/SpawnPoint.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:f7e109f57e5e9bc6bcaee7176a479bb6434353bc49a8021ab96e016ce27f41a1
-size 3128
diff --git a/Assets/Editor/ObjectIcons/T.bmp b/Assets/Editor/ObjectIcons/T.bmp
deleted file mode 100644
index 767782c43d..0000000000
--- a/Assets/Editor/ObjectIcons/T.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:4c2288c239604402f7e85d753141fbd8a82fde9f18e4f95006b039ceeec41d0c
-size 3128
diff --git a/Assets/Editor/ObjectIcons/TagPoint.bmp b/Assets/Editor/ObjectIcons/TagPoint.bmp
deleted file mode 100644
index 36727d9c4a..0000000000
--- a/Assets/Editor/ObjectIcons/TagPoint.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:8f58cabe21df546914abc1e8f2604989d87b4a3471c1902956a4e1e1be9930b8
-size 3128
diff --git a/Assets/Editor/ObjectIcons/Trigger.bmp b/Assets/Editor/ObjectIcons/Trigger.bmp
deleted file mode 100644
index ef712e4b09..0000000000
--- a/Assets/Editor/ObjectIcons/Trigger.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:e9cfb325abea577e8737b837098ff3cecd564e302b2c30925b3d35a62fa6c7c3
-size 3128
diff --git a/Assets/Editor/ObjectIcons/UiCanvasRefEntity.bmp b/Assets/Editor/ObjectIcons/UiCanvasRefEntity.bmp
deleted file mode 100644
index c1ff4d3291..0000000000
--- a/Assets/Editor/ObjectIcons/UiCanvasRefEntity.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:bcd9a1efaab42cdea4557265e544f2370565872115d21cc84af6e6998bb7ad01
-size 3128
diff --git a/Assets/Editor/ObjectIcons/User.bmp b/Assets/Editor/ObjectIcons/User.bmp
deleted file mode 100644
index 780242c15c..0000000000
--- a/Assets/Editor/ObjectIcons/User.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:56a379a337a44617cb6ed5a20560286b8263c75871742ca04cc61cac49736a2a
-size 3128
diff --git a/Assets/Editor/ObjectIcons/VVVArea.bmp b/Assets/Editor/ObjectIcons/VVVArea.bmp
deleted file mode 100644
index 82712dda92..0000000000
--- a/Assets/Editor/ObjectIcons/VVVArea.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:9cab80e4ce74155a3eaf771fa9b2464c1f3b36bce6de55d3f5aa180576cabec2
-size 3128
diff --git a/Assets/Editor/ObjectIcons/W.bmp b/Assets/Editor/ObjectIcons/W.bmp
deleted file mode 100644
index 40448a6334..0000000000
--- a/Assets/Editor/ObjectIcons/W.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:6ebc8eacd6695caafd131d5c8ca29b45fea16bc2147cdb169478e391d6f13b70
-size 3128
diff --git a/Assets/Editor/ObjectIcons/Water.bmp b/Assets/Editor/ObjectIcons/Water.bmp
deleted file mode 100644
index fb7d6c7b51..0000000000
--- a/Assets/Editor/ObjectIcons/Water.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:e5d24ecf0878409dc3f7ed0f447734061bb9e313e4adb767580bd961b0038236
-size 3126
diff --git a/Assets/Editor/ObjectIcons/animobject.bmp b/Assets/Editor/ObjectIcons/animobject.bmp
deleted file mode 100644
index d28e4c016a..0000000000
--- a/Assets/Editor/ObjectIcons/animobject.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:514fb756bd23f0376a03ba7222a5a8479408eb68efbfcecac30957142580e494
-size 3128
diff --git a/Assets/Editor/ObjectIcons/bird.bmp b/Assets/Editor/ObjectIcons/bird.bmp
deleted file mode 100644
index b6431dc2cf..0000000000
--- a/Assets/Editor/ObjectIcons/bird.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:e7d72d46274c9c0863e7e34caccfdf78a7c8c77262caf1b7f4305a822ac0145c
-size 3128
diff --git a/Assets/Editor/ObjectIcons/bug.bmp b/Assets/Editor/ObjectIcons/bug.bmp
deleted file mode 100644
index 86cb76bed0..0000000000
--- a/Assets/Editor/ObjectIcons/bug.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:d238a0d17e3469c499249bd907b5aba0b924fb8539259a1b92af64e39820b619
-size 3128
diff --git a/Assets/Editor/ObjectIcons/character.bmp b/Assets/Editor/ObjectIcons/character.bmp
deleted file mode 100644
index a37997e7bf..0000000000
--- a/Assets/Editor/ObjectIcons/character.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:4b7bd2ee00f000d13ef096bd4d430fbca5cd35f3d641d44f4698c1270423b484
-size 3128
diff --git a/Assets/Editor/ObjectIcons/death.bmp b/Assets/Editor/ObjectIcons/death.bmp
deleted file mode 100644
index 98c673af1d..0000000000
--- a/Assets/Editor/ObjectIcons/death.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:9d93aa4486316a2ba269f860d64f741da15359fec6111da1049331a5a75dee02
-size 3128
diff --git a/Assets/Editor/ObjectIcons/door.bmp b/Assets/Editor/ObjectIcons/door.bmp
deleted file mode 100644
index 3c95318ef9..0000000000
--- a/Assets/Editor/ObjectIcons/door.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:4be7c244d9350a46c18161222ace0eaea1213dd1e7ed5ba02fa94ee5a98dc728
-size 3128
diff --git a/Assets/Editor/ObjectIcons/elevator.bmp b/Assets/Editor/ObjectIcons/elevator.bmp
deleted file mode 100644
index b256426aef..0000000000
--- a/Assets/Editor/ObjectIcons/elevator.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:6c1cf46f0825ecf1d3331bdca3d5f6a0d348aa6346af9fb1fdb3b75cfc5564dd
-size 3128
diff --git a/Assets/Editor/ObjectIcons/environmentProbe.bmp b/Assets/Editor/ObjectIcons/environmentProbe.bmp
deleted file mode 100644
index 0a23ebb9f4..0000000000
--- a/Assets/Editor/ObjectIcons/environmentProbe.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:27c8ae2924af50058207e7a1e1f4e35799f27abd7cb2e0778b8903ce00e99732
-size 4152
diff --git a/Assets/Editor/ObjectIcons/explosion.bmp b/Assets/Editor/ObjectIcons/explosion.bmp
deleted file mode 100644
index 27213da651..0000000000
--- a/Assets/Editor/ObjectIcons/explosion.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:a93e2e2164781ed0de1be34bbbd0c85d630a31efd3fe568ea7f3c026646209c8
-size 3128
diff --git a/Assets/Editor/ObjectIcons/fish.bmp b/Assets/Editor/ObjectIcons/fish.bmp
deleted file mode 100644
index 9c1d0b2d21..0000000000
--- a/Assets/Editor/ObjectIcons/fish.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:590e0458bbc0d528ba71cd048b6019ebb8d1764a55cc3b9b3e2b1446182cfaa9
-size 3128
diff --git a/Assets/Editor/ObjectIcons/forbiddenarea.bmp b/Assets/Editor/ObjectIcons/forbiddenarea.bmp
deleted file mode 100644
index b41c47bf72..0000000000
--- a/Assets/Editor/ObjectIcons/forbiddenarea.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:6a8eac076d5094c722513bcdb6b71def9116ae063d453017d7bb0b38068c3a7e
-size 3128
diff --git a/Assets/Editor/ObjectIcons/hazard.bmp b/Assets/Editor/ObjectIcons/hazard.bmp
deleted file mode 100644
index 4779f3730a..0000000000
--- a/Assets/Editor/ObjectIcons/hazard.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:71c3e9e9ccf404c3c17f71f806cd6ee0e4b48f6f2e172b52aeca78cc28668ac3
-size 3128
diff --git a/Assets/Editor/ObjectIcons/health.bmp b/Assets/Editor/ObjectIcons/health.bmp
deleted file mode 100644
index 01833903c3..0000000000
--- a/Assets/Editor/ObjectIcons/health.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:3ded11545905ac937fe6e28929e57c10abe55befa74b44260dee5b206cdf3d15
-size 3128
diff --git a/Assets/Editor/ObjectIcons/ledge.bmp b/Assets/Editor/ObjectIcons/ledge.bmp
deleted file mode 100644
index 3d6784fb44..0000000000
--- a/Assets/Editor/ObjectIcons/ledge.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:c43daede42eb72eca0f80454b0e70de1e03156b5f098bcc8dbc080117c34380a
-size 3128
diff --git a/Assets/Editor/ObjectIcons/mine.bmp b/Assets/Editor/ObjectIcons/mine.bmp
deleted file mode 100644
index 8f4394a2dd..0000000000
--- a/Assets/Editor/ObjectIcons/mine.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:da1bb03a55949c6dc80ac18e3cf87c962e30fe2eacfd4fac74cc93db58552ac5
-size 3128
diff --git a/Assets/Editor/ObjectIcons/physicsobject.bmp b/Assets/Editor/ObjectIcons/physicsobject.bmp
deleted file mode 100644
index 00bb3f2380..0000000000
--- a/Assets/Editor/ObjectIcons/physicsobject.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:74cdfbf6f61029fa6f1262f78c2787afb9dddc0218911b53349962c4ed548bbf
-size 3128
diff --git a/Assets/Editor/ObjectIcons/prefabbuilding.bmp b/Assets/Editor/ObjectIcons/prefabbuilding.bmp
deleted file mode 100644
index e416cbafe1..0000000000
--- a/Assets/Editor/ObjectIcons/prefabbuilding.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:98aaf6d6e532f5a3f31cdc08676432e30b4e52fd4f376331f4610379f288a191
-size 3128
diff --git a/Assets/Editor/ObjectIcons/proceduralbuilding.bmp b/Assets/Editor/ObjectIcons/proceduralbuilding.bmp
deleted file mode 100644
index e416cbafe1..0000000000
--- a/Assets/Editor/ObjectIcons/proceduralbuilding.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:98aaf6d6e532f5a3f31cdc08676432e30b4e52fd4f376331f4610379f288a191
-size 3128
diff --git a/Assets/Editor/ObjectIcons/proceduralobject.bmp b/Assets/Editor/ObjectIcons/proceduralobject.bmp
deleted file mode 100644
index e416cbafe1..0000000000
--- a/Assets/Editor/ObjectIcons/proceduralobject.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:98aaf6d6e532f5a3f31cdc08676432e30b4e52fd4f376331f4610379f288a191
-size 3128
diff --git a/Assets/Editor/ObjectIcons/proximitytrigger.bmp b/Assets/Editor/ObjectIcons/proximitytrigger.bmp
deleted file mode 100644
index a776094539..0000000000
--- a/Assets/Editor/ObjectIcons/proximitytrigger.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:ac364f478ca4dfa0186069fb69d19b8005a8d1da74cff34ced76bb85cf4402e7
-size 3128
diff --git a/Assets/Editor/ObjectIcons/river.bmp b/Assets/Editor/ObjectIcons/river.bmp
deleted file mode 100644
index bf831c356a..0000000000
--- a/Assets/Editor/ObjectIcons/river.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:910d8f788514dc2d66c58027cb841a16e7d5194ee1f1ff3ccfcf5badd86c768a
-size 3128
diff --git a/Assets/Editor/ObjectIcons/road.bmp b/Assets/Editor/ObjectIcons/road.bmp
deleted file mode 100644
index 91a8b0916f..0000000000
--- a/Assets/Editor/ObjectIcons/road.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:9e92c9792886fab49007891c38addf2f62719d6563a36cd81250de13c50fbf61
-size 3128
diff --git a/Assets/Editor/ObjectIcons/rope.bmp b/Assets/Editor/ObjectIcons/rope.bmp
deleted file mode 100644
index d7f7fddb67..0000000000
--- a/Assets/Editor/ObjectIcons/rope.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:738525640cf00402ebd807ce9a35d6d7ed67be39cde7def7930b136596977a2e
-size 3128
diff --git a/Assets/Editor/ObjectIcons/sequence.bmp b/Assets/Editor/ObjectIcons/sequence.bmp
deleted file mode 100644
index 8e76c924f1..0000000000
--- a/Assets/Editor/ObjectIcons/sequence.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:e339afca6ba8ffa2463bf6b367615e66bb953fced380d739996d52c2971feab5
-size 3128
diff --git a/Assets/Editor/ObjectIcons/shake.bmp b/Assets/Editor/ObjectIcons/shake.bmp
deleted file mode 100644
index 5275a0aac9..0000000000
--- a/Assets/Editor/ObjectIcons/shake.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:f3130dcb95136d806aff1882d3933eb3f7ee88aaa9876423b53dbf73f02c8cd3
-size 3128
diff --git a/Assets/Editor/ObjectIcons/smartobject.bmp b/Assets/Editor/ObjectIcons/smartobject.bmp
deleted file mode 100644
index 5ecf9a273e..0000000000
--- a/Assets/Editor/ObjectIcons/smartobject.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:e908579e0a62d74a1402ee786876e88eadb0ef0de0542617d02291947504078b
-size 3128
diff --git a/Assets/Editor/ObjectIcons/spawngroup.bmp b/Assets/Editor/ObjectIcons/spawngroup.bmp
deleted file mode 100644
index 00626fc17f..0000000000
--- a/Assets/Editor/ObjectIcons/spawngroup.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:28111b13e60816f31f3916131d4632ce2d0c48c1a7712421593f79dff79c99d0
-size 3128
diff --git a/Assets/Editor/ObjectIcons/spectator.bmp b/Assets/Editor/ObjectIcons/spectator.bmp
deleted file mode 100644
index 6798c841c0..0000000000
--- a/Assets/Editor/ObjectIcons/spectator.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:9a2885b3eb0845b48571f1af08d9e685b52361c78c31485c64f8e1efb38e8cc4
-size 3128
diff --git a/Assets/Editor/ObjectIcons/switch.bmp b/Assets/Editor/ObjectIcons/switch.bmp
deleted file mode 100644
index 50f4e790b2..0000000000
--- a/Assets/Editor/ObjectIcons/switch.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:9bdce356a35d214c4d806ba568d2de72af636410eb433be5c0390eae67d8478a
-size 3128
diff --git a/Assets/Editor/ObjectIcons/territory.bmp b/Assets/Editor/ObjectIcons/territory.bmp
deleted file mode 100644
index edd8b5178e..0000000000
--- a/Assets/Editor/ObjectIcons/territory.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:dc350e4d3226531a35ac810fa5ebe1894bfdcafac605334afffcdd3a14416f94
-size 3128
diff --git a/Assets/Editor/ObjectIcons/tornado.bmp b/Assets/Editor/ObjectIcons/tornado.bmp
deleted file mode 100644
index e30b642441..0000000000
--- a/Assets/Editor/ObjectIcons/tornado.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:c54df0fb1c9b8abeee30adc5e983bfd7dd524c551909b26466a9d8b6422a094a
-size 3128
diff --git a/Assets/Editor/ObjectIcons/vehicle.bmp b/Assets/Editor/ObjectIcons/vehicle.bmp
deleted file mode 100644
index f65e5bb7bf..0000000000
--- a/Assets/Editor/ObjectIcons/vehicle.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:50e0b4d6a86953c33b0c3ace60bb53d119fa5acd193f4d9aa2c0934f3074cb19
-size 3128
diff --git a/Assets/Editor/ObjectIcons/voxel.bmp b/Assets/Editor/ObjectIcons/voxel.bmp
deleted file mode 100644
index dba0aa32ba..0000000000
--- a/Assets/Editor/ObjectIcons/voxel.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:8ca14c966de6d392beb4d154221b622a417163fcdf92eb049638bf8495c13774
-size 3128
diff --git a/Assets/Editor/ObjectIcons/wave.bmp b/Assets/Editor/ObjectIcons/wave.bmp
deleted file mode 100644
index 0465b41c38..0000000000
--- a/Assets/Editor/ObjectIcons/wave.bmp
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:573d22719ad010351a58733b63315a9a0fc07545dde71f3931f37371dfe44ce3
-size 3128
diff --git a/Assets/Editor/Prefabs/Default_Level.prefab b/Assets/Editor/Prefabs/Default_Level.prefab
index 64656e1e2f..d02d669f53 100644
--- a/Assets/Editor/Prefabs/Default_Level.prefab
+++ b/Assets/Editor/Prefabs/Default_Level.prefab
@@ -212,10 +212,10 @@
"Configuration": {
"ModelAsset": {
"assetId": {
- "guid": "{935F694A-8639-515B-8133-81CDC7948E5B}",
- "subId": 277333723
+ "guid": "{0CD745C0-6AA8-569A-A68A-73A3270986C4}",
+ "subId": 277889906
},
- "assetHint": "objects/groudplane/groundplane_521x521m.azmodel"
+ "assetHint": "objects/groudplane/groundplane_512x512m.azmodel"
}
}
}
diff --git a/Assets/Editor/Scripts/Shelves/icons/Albedo.png b/Assets/Editor/Scripts/Shelves/icons/Albedo.png
deleted file mode 100644
index f3225255c7..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/Albedo.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:a91ea78d1ffd91490f20efcf76ad8790e450836240b8a77dda719da963235c85
-size 2987
diff --git a/Assets/Editor/Scripts/Shelves/icons/Diffuse_Lighting.png b/Assets/Editor/Scripts/Shelves/icons/Diffuse_Lighting.png
deleted file mode 100644
index 4709ee81d0..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/Diffuse_Lighting.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:2d8eadc0bdc63391e88936b0acfd0616c2d7bce550ea82cee1f967f971ace8a6
-size 2905
diff --git a/Assets/Editor/Scripts/Shelves/icons/Diffuse_Texture_Res_360.png b/Assets/Editor/Scripts/Shelves/icons/Diffuse_Texture_Res_360.png
deleted file mode 100644
index 25c686e46a..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/Diffuse_Texture_Res_360.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:9cdb92de995635eadfbb6dceb25f44a737dde744e09f0fcfe7016de981dce786
-size 2975
diff --git a/Assets/Editor/Scripts/Shelves/icons/Empty_Wireframe.png b/Assets/Editor/Scripts/Shelves/icons/Empty_Wireframe.png
deleted file mode 100644
index b4329c1beb..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/Empty_Wireframe.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:268a5b239b9988be0ae13a2f42a99ac39ac2db9988f92604154630b661b89999
-size 2865
diff --git a/Assets/Editor/Scripts/Shelves/icons/Exit.png b/Assets/Editor/Scripts/Shelves/icons/Exit.png
deleted file mode 100644
index 3706ddc01c..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/Exit.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:030f4dc71dac36f220cd7e7c07eb24bda2df3c1e14b054e48fc6274573734bdb
-size 2898
diff --git a/Assets/Editor/Scripts/Shelves/icons/Fuzziness.png b/Assets/Editor/Scripts/Shelves/icons/Fuzziness.png
deleted file mode 100644
index 6ca7e20209..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/Fuzziness.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:e0fa6d24bbb7f969a71b9e761f2dc4ec990a7e522201af9b13b2651d0565e1f0
-size 3607
diff --git a/Assets/Editor/Scripts/Shelves/icons/Gloss.png b/Assets/Editor/Scripts/Shelves/icons/Gloss.png
deleted file mode 100644
index 5063b7f01e..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/Gloss.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:d5b949330e86f02662bb3b25db123fd77be31c910ad7e1e21223a543820ce46a
-size 2959
diff --git a/Assets/Editor/Scripts/Shelves/icons/Normal_Texture_Res_360.png b/Assets/Editor/Scripts/Shelves/icons/Normal_Texture_Res_360.png
deleted file mode 100644
index 3ca3270344..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/Normal_Texture_Res_360.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:49086e4fa1736415d79d7d1d5ed8484b49582db8c27957148ef2a6d7f5dec189
-size 3176
diff --git a/Assets/Editor/Scripts/Shelves/icons/PrefabAddLibrary.png b/Assets/Editor/Scripts/Shelves/icons/PrefabAddLibrary.png
deleted file mode 100644
index 899b8cbc57..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/PrefabAddLibrary.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:e0d9c3f0be3c978deaa053d458a49908e99d8d0f7e87169b5b03b7f500e37f55
-size 3248
diff --git a/Assets/Editor/Scripts/Shelves/icons/PrefabAddSelection.png b/Assets/Editor/Scripts/Shelves/icons/PrefabAddSelection.png
deleted file mode 100644
index 6144e48a2b..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/PrefabAddSelection.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:5d98fa218cf0c13100584611e1c4d536bdd9cf78a4a10dd1a0a49e4265b5292d
-size 503
diff --git a/Assets/Editor/Scripts/Shelves/icons/PrefabBreak.png b/Assets/Editor/Scripts/Shelves/icons/PrefabBreak.png
deleted file mode 100644
index 9982a71078..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/PrefabBreak.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:e538188411092f7a172ef364035df77dc228bc91d43cfc35ffbbd824e716800e
-size 3231
diff --git a/Assets/Editor/Scripts/Shelves/icons/PrefabConvert.png b/Assets/Editor/Scripts/Shelves/icons/PrefabConvert.png
deleted file mode 100644
index cdbd6d2ac7..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/PrefabConvert.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:52b2c98b0f50fcfdd8334bcde259aef0a0533055f6caa1a1606536f5d2eca23f
-size 3079
diff --git a/Assets/Editor/Scripts/Shelves/icons/PrefabCreate.png b/Assets/Editor/Scripts/Shelves/icons/PrefabCreate.png
deleted file mode 100644
index 1aad8f3446..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/PrefabCreate.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:40905f7865cd5a71bfdace3943ccdd8fe532ee111419fb023befac357256eb07
-size 490
diff --git a/Assets/Editor/Scripts/Shelves/icons/PrefabIsolate.png b/Assets/Editor/Scripts/Shelves/icons/PrefabIsolate.png
deleted file mode 100644
index 4c1a1766b5..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/PrefabIsolate.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:31f8f9a5ff20b33bdf86af8da579717cda40e097db6f893ec4e2fffab720f90e
-size 3211
diff --git a/Assets/Editor/Scripts/Shelves/icons/Scattering.png b/Assets/Editor/Scripts/Shelves/icons/Scattering.png
deleted file mode 100644
index 3c2c5cff38..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/Scattering.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:9ec02e421b4e832f73576d1f1bf2b6bc60879521f3a8abbb554925982574c374
-size 3146
diff --git a/Assets/Editor/Scripts/Shelves/icons/Solid_Wireframe.png b/Assets/Editor/Scripts/Shelves/icons/Solid_Wireframe.png
deleted file mode 100644
index e439baed1b..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/Solid_Wireframe.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:bcc61dfe03d5bae6060c1fc6814b7be299705803fdb9058cabe6227f386ddeef
-size 2872
diff --git a/Assets/Editor/Scripts/Shelves/icons/Spec_Amount.png b/Assets/Editor/Scripts/Shelves/icons/Spec_Amount.png
deleted file mode 100644
index 7561feb7c0..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/Spec_Amount.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:a67c8e063331c5c6ce256892abdde113f405c60854115ba87f6798d06f57eb02
-size 2892
diff --git a/Assets/Editor/Scripts/Shelves/icons/Spec_Lighting.png b/Assets/Editor/Scripts/Shelves/icons/Spec_Lighting.png
deleted file mode 100644
index f08a036519..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/Spec_Lighting.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:927d3b2f83e6e962a492ea625240bb5f336e30aa2052d1f8699b76a86a5e475d
-size 2897
diff --git a/Assets/Editor/Scripts/Shelves/icons/Texel_Per_Meter_1024.png b/Assets/Editor/Scripts/Shelves/icons/Texel_Per_Meter_1024.png
deleted file mode 100644
index 2d4b08f5fb..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/Texel_Per_Meter_1024.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:a3861aa38f3e521127a48f08e6c24e12e61c15450bb4d10ef27a0a95c2c420c0
-size 2889
diff --git a/Assets/Editor/Scripts/Shelves/icons/Texel_Per_Meter_256.png b/Assets/Editor/Scripts/Shelves/icons/Texel_Per_Meter_256.png
deleted file mode 100644
index 4b1ceef8ab..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/Texel_Per_Meter_256.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:5ecc3596974c0c9f1703d51e60de2ca00a479012d98f11316966686cc891f982
-size 2922
diff --git a/Assets/Editor/Scripts/Shelves/icons/Texel_Per_Meter_512.png b/Assets/Editor/Scripts/Shelves/icons/Texel_Per_Meter_512.png
deleted file mode 100644
index 4f328adf91..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/Texel_Per_Meter_512.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:ce1ca5c1d89cd6d7a0cf35142be114904ec469afab2fa69a12afe6824055b67b
-size 2913
diff --git a/Assets/Editor/Scripts/Shelves/icons/all.png b/Assets/Editor/Scripts/Shelves/icons/all.png
deleted file mode 100644
index 1b6e3b12d6..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/all.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:ffcf54b92f48aa06f38e94826a76f350b425ad9d46c0e2170455730123a69a6d
-size 3693
diff --git a/Assets/Editor/Scripts/Shelves/icons/beams.png b/Assets/Editor/Scripts/Shelves/icons/beams.png
deleted file mode 100644
index 9263cc070a..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/beams.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:68c4333ba27b39baed2696fa90040cc4e669dbc5e9fab43b11abd854d5482474
-size 613
diff --git a/Assets/Editor/Scripts/Shelves/icons/blanker.png b/Assets/Editor/Scripts/Shelves/icons/blanker.png
deleted file mode 100644
index 277a067134..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/blanker.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:adac9f1fc606475d1d86ca8f5b2376570ebc70161e4b5240ede3cb8f176b8f41
-size 2810
diff --git a/Assets/Editor/Scripts/Shelves/icons/bounding_box.png b/Assets/Editor/Scripts/Shelves/icons/bounding_box.png
deleted file mode 100644
index 854a9f957c..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/bounding_box.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:f00fa9904ce4687aaf21f1553d03bf1d47390d007fd38513ad959f324a4b6ebb
-size 3618
diff --git a/Assets/Editor/Scripts/Shelves/icons/brushes.png b/Assets/Editor/Scripts/Shelves/icons/brushes.png
deleted file mode 100644
index 283af0629c..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/brushes.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:ed21a97324849633d156ec03f949a3cf21b8b682a3a6ad1dcfac6eee9df7a497
-size 734
diff --git a/Assets/Editor/Scripts/Shelves/icons/cloud.png b/Assets/Editor/Scripts/Shelves/icons/cloud.png
deleted file mode 100644
index 8f28b28613..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/cloud.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:11599538b6bc197e92f07db149ccdfee50ddea630f095865bac9782254a7c06f
-size 387
diff --git a/Assets/Editor/Scripts/Shelves/icons/cloud_dark.png b/Assets/Editor/Scripts/Shelves/icons/cloud_dark.png
deleted file mode 100644
index 28d1d0281b..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/cloud_dark.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:559ec911f9cac84de411e92d746913c3828ebf1d1f8c7bab794fb9c768c1581d
-size 387
diff --git a/Assets/Editor/Scripts/Shelves/icons/cloud_dark_rain.png b/Assets/Editor/Scripts/Shelves/icons/cloud_dark_rain.png
deleted file mode 100644
index 7119b0387f..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/cloud_dark_rain.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:88d11b32db70a437fd8ff8c845b4ff26182d28f5b7a2f6b3de4fce61dffff98d
-size 489
diff --git a/Assets/Editor/Scripts/Shelves/icons/collisions.png b/Assets/Editor/Scripts/Shelves/icons/collisions.png
deleted file mode 100644
index af947db919..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/collisions.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:0510fa11c090234a2008703917834ad0455bc6e5e9a2d2375ebd0fc279b41851
-size 3491
diff --git a/Assets/Editor/Scripts/Shelves/icons/create_ao_volume_box.png b/Assets/Editor/Scripts/Shelves/icons/create_ao_volume_box.png
deleted file mode 100644
index 558a3eba64..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/create_ao_volume_box.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:24fc2750f740f0b85ca720beedb564f2a01bbeed229cb89c6d8f395d5cf5d439
-size 844
diff --git a/Assets/Editor/Scripts/Shelves/icons/create_both_vis_box_envprobe.png b/Assets/Editor/Scripts/Shelves/icons/create_both_vis_box_envprobe.png
deleted file mode 100644
index d4b1023cdb..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/create_both_vis_box_envprobe.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:000effa8925a61313fdf420830857172bc69c38cb8a14737a389b9c9df1b36df
-size 745
diff --git a/Assets/Editor/Scripts/Shelves/icons/create_envprobe.png b/Assets/Editor/Scripts/Shelves/icons/create_envprobe.png
deleted file mode 100644
index bdaf8fdf2c..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/create_envprobe.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:9d91f30f31576dc957f57d59e2b94d6e45c9aef28f321240c31639c148f62aea
-size 803
diff --git a/Assets/Editor/Scripts/Shelves/icons/create_portal_box.png b/Assets/Editor/Scripts/Shelves/icons/create_portal_box.png
deleted file mode 100644
index 416952b279..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/create_portal_box.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:6452c7e2baef1d8d285a96e72d053a8af80430e52a149ce14795c946d55896fb
-size 807
diff --git a/Assets/Editor/Scripts/Shelves/icons/create_vis_box.png b/Assets/Editor/Scripts/Shelves/icons/create_vis_box.png
deleted file mode 100644
index 74ac6eac4d..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/create_vis_box.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:e0d5e21ccaec784d3118a2609e5f26caca4a26901a92db0821e2e0f18e555534
-size 833
diff --git a/Assets/Editor/Scripts/Shelves/icons/create_vis_box_and_portal_box.png b/Assets/Editor/Scripts/Shelves/icons/create_vis_box_and_portal_box.png
deleted file mode 100644
index 5da50020d9..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/create_vis_box_and_portal_box.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:e5717c6fde94577b831b8d83104733f86ed82f030664624d62cb4a6d26dd5646
-size 822
diff --git a/Assets/Editor/Scripts/Shelves/icons/create_vis_box_env_probe_and_portal.png b/Assets/Editor/Scripts/Shelves/icons/create_vis_box_env_probe_and_portal.png
deleted file mode 100644
index cd39aade30..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/create_vis_box_env_probe_and_portal.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:07e831e8cab5e1e222b4a4d6a64932bbb8a9a5fcb7cae020432905a7c1e53402
-size 782
diff --git a/Assets/Editor/Scripts/Shelves/icons/cubemap.png b/Assets/Editor/Scripts/Shelves/icons/cubemap.png
deleted file mode 100644
index d55d04b978..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/cubemap.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:9775b4823563dbff4c3410c1751f022e2985f91202e6d691f86172ef1f820f4b
-size 3353
diff --git a/Assets/Editor/Scripts/Shelves/icons/decals.png b/Assets/Editor/Scripts/Shelves/icons/decals.png
deleted file mode 100644
index b9e4c92bd7..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/decals.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:c12d69b2d85c339bbff06011fff7c2468a2b2e6c67726ad7fb0ab82384eb39df
-size 918
diff --git a/Assets/Editor/Scripts/Shelves/icons/default_material.png b/Assets/Editor/Scripts/Shelves/icons/default_material.png
deleted file mode 100644
index 9fda69eaab..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/default_material.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:98146b9b75602ddc8a46529fe0427303491dfe4584cadb914d3774377593c7ef
-size 3809
diff --git a/Assets/Editor/Scripts/Shelves/icons/default_material_with_normals.png b/Assets/Editor/Scripts/Shelves/icons/default_material_with_normals.png
deleted file mode 100644
index cbb0f9bbf2..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/default_material_with_normals.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:a1c7e790dad53937ed0845cb89c5651c7932a696d7d34d85df6fc8c4b09c7245
-size 3106
diff --git a/Assets/Editor/Scripts/Shelves/icons/designer.png b/Assets/Editor/Scripts/Shelves/icons/designer.png
deleted file mode 100644
index 9018385ebb..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/designer.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:e790bb52b7f7d52e79b2c5b84ee4a4587a721c7e3c70d2d7e0eb683b478b51f7
-size 1015
diff --git a/Assets/Editor/Scripts/Shelves/icons/diff_acc.png b/Assets/Editor/Scripts/Shelves/icons/diff_acc.png
deleted file mode 100644
index df3eac041c..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/diff_acc.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:b341792fb1c13db8144f74c3895942251c07e67e87ac374c09df21e3459b3610
-size 3930
diff --git a/Assets/Editor/Scripts/Shelves/icons/display_info.png b/Assets/Editor/Scripts/Shelves/icons/display_info.png
deleted file mode 100644
index 22572bc6e5..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/display_info.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:0fc2408c2f1801de3f625dcbdf960104195c1d47d7e240f4ec9391a7b645399c
-size 3623
diff --git a/Assets/Editor/Scripts/Shelves/icons/dual_layer_mask.png b/Assets/Editor/Scripts/Shelves/icons/dual_layer_mask.png
deleted file mode 100644
index c47a0f7350..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/dual_layer_mask.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:80bca215bbcec9d9e1e33abfbf0b17d6032327a175d6f9d4d76bfefd5c7f2480
-size 3517
diff --git a/Assets/Editor/Scripts/Shelves/icons/dynamiclights.png b/Assets/Editor/Scripts/Shelves/icons/dynamiclights.png
deleted file mode 100644
index 541d8f9304..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/dynamiclights.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:ef3cae03d5f38bdf9e82ff29b1a77133a44e5e859cfdb063c449ee5609902367
-size 780
diff --git a/Assets/Editor/Scripts/Shelves/icons/entities.png b/Assets/Editor/Scripts/Shelves/icons/entities.png
deleted file mode 100644
index 0bf2eda8cc..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/entities.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:42de1878f5cef5c3f80dd56e042584eeb8759cacd58a0b22115644ed38800836
-size 870
diff --git a/Assets/Editor/Scripts/Shelves/icons/eye_adaptation_speed.png b/Assets/Editor/Scripts/Shelves/icons/eye_adaptation_speed.png
deleted file mode 100644
index a485e39655..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/eye_adaptation_speed.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:f1b4a6d4cca72740f14e97239bf8490d23ccb3d9283d4ff558f0302d9fa773ad
-size 1017
diff --git a/Assets/Editor/Scripts/Shelves/icons/fog.png b/Assets/Editor/Scripts/Shelves/icons/fog.png
deleted file mode 100644
index 68137429de..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/fog.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:4dea1c985077475184c32562609e27b7919cd1c08776174a83f38f095a11f3d4
-size 394
diff --git a/Assets/Editor/Scripts/Shelves/icons/fogvolumes.png b/Assets/Editor/Scripts/Shelves/icons/fogvolumes.png
deleted file mode 100644
index 8c305abb4a..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/fogvolumes.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:bbf140c23e75f1c1035defd58ec8522230abdb5fc7538953ed88eb3bc06c9ca3
-size 349
diff --git a/Assets/Editor/Scripts/Shelves/icons/freeze_particles.png b/Assets/Editor/Scripts/Shelves/icons/freeze_particles.png
deleted file mode 100644
index 963374b096..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/freeze_particles.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:52986df9e8a866606cbfbe8a9702f15483a6f3bfa0b15563e64a5c6d208dab55
-size 4076
diff --git a/Assets/Editor/Scripts/Shelves/icons/full_shading.png b/Assets/Editor/Scripts/Shelves/icons/full_shading.png
deleted file mode 100644
index 4decb4c800..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/full_shading.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:339d6542b6a259feeb7dc8ebc536ca6fed44a91faaf021b1453a735b39d98450
-size 3021
diff --git a/Assets/Editor/Scripts/Shelves/icons/gamma.png b/Assets/Editor/Scripts/Shelves/icons/gamma.png
deleted file mode 100644
index 43b16f55a6..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/gamma.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:b93bb51dd54685b9dd1a37b535c7cb456110b45c62ae64eaaceb61a58b99f254
-size 1418
diff --git a/Assets/Editor/Scripts/Shelves/icons/gi.png b/Assets/Editor/Scripts/Shelves/icons/gi.png
deleted file mode 100644
index 51fb05190c..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/gi.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:cbc47ed9888c792af55b4e0ab5d5c7a7b8a582fdb202fa035e21b974c7df1022
-size 885
diff --git a/Assets/Editor/Scripts/Shelves/icons/lens_flare.png b/Assets/Editor/Scripts/Shelves/icons/lens_flare.png
deleted file mode 100644
index 2da269b7c7..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/lens_flare.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:e2cbf9570c227884d49ac2a702377821891d06eaa91b6bf92861088508927796
-size 670
diff --git a/Assets/Editor/Scripts/Shelves/icons/lighting_only.png b/Assets/Editor/Scripts/Shelves/icons/lighting_only.png
deleted file mode 100644
index bd4590053c..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/lighting_only.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:695dcdc3004705d1489b5b2a0a750bf6d30940d343a62bc8ff06bc103d3ae6f7
-size 2870
diff --git a/Assets/Editor/Scripts/Shelves/icons/lods.png b/Assets/Editor/Scripts/Shelves/icons/lods.png
deleted file mode 100644
index a6ad158679..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/lods.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:266450829046d2be9557c86f8061f1b50d8f55795436b608689d6c117c5b970d
-size 1156
diff --git a/Assets/Editor/Scripts/Shelves/icons/lsao.png b/Assets/Editor/Scripts/Shelves/icons/lsao.png
deleted file mode 100644
index 127b421a30..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/lsao.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:7a253c696ce28fb7699b6879c35e874d906033b59e89224d307bf029dd9257e6
-size 3926
diff --git a/Assets/Editor/Scripts/Shelves/icons/lsao_toggle.png b/Assets/Editor/Scripts/Shelves/icons/lsao_toggle.png
deleted file mode 100644
index c264be14bd..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/lsao_toggle.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:734ca55bc936d229c56abb4f141a746fe64affc570570d182308f6f0d8f21638
-size 3952
diff --git a/Assets/Editor/Scripts/Shelves/icons/lsro.png b/Assets/Editor/Scripts/Shelves/icons/lsro.png
deleted file mode 100644
index ff4099a887..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/lsro.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:a100211ce724c005cd2fadecb4ca3c36feacad4f7cb4bbccd8761ae622d59aa3
-size 1153
diff --git a/Assets/Editor/Scripts/Shelves/icons/normals.png b/Assets/Editor/Scripts/Shelves/icons/normals.png
deleted file mode 100644
index 1f723ef0d1..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/normals.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:58e65981a6b66482ac3443f644fe210d9c90d01b4a5ab381796d37bf6d5be289
-size 3215
diff --git a/Assets/Editor/Scripts/Shelves/icons/normals_x.png b/Assets/Editor/Scripts/Shelves/icons/normals_x.png
deleted file mode 100644
index 98a705b559..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/normals_x.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:1be96cc2682443b03bfc4696403d5c3d98eec709878acac0b690dbb635d04ea9
-size 3227
diff --git a/Assets/Editor/Scripts/Shelves/icons/normals_y.png b/Assets/Editor/Scripts/Shelves/icons/normals_y.png
deleted file mode 100644
index 8c109bee9b..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/normals_y.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:2eaf04f15e42ac910dc7c29fb61034dc5126a80832b6a0bc0a842b549c23eaf7
-size 3118
diff --git a/Assets/Editor/Scripts/Shelves/icons/normals_z.png b/Assets/Editor/Scripts/Shelves/icons/normals_z.png
deleted file mode 100644
index 078ceded6c..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/normals_z.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:0c8ec3131755522c3f1a4fc45cef0b9ace4641316d890d3f6f042557f220d6ba
-size 3152
diff --git a/Assets/Editor/Scripts/Shelves/icons/ocean.png b/Assets/Editor/Scripts/Shelves/icons/ocean.png
deleted file mode 100644
index 04c4fff0fc..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/ocean.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:1407119e10f378a6ae375f3951dbfe42505560f75a88687f4c03e0ac2e85a05e
-size 700
diff --git a/Assets/Editor/Scripts/Shelves/icons/particles.png b/Assets/Editor/Scripts/Shelves/icons/particles.png
deleted file mode 100644
index daecfbc256..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/particles.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:d9875276bc1b8055f306d0bf95b0ba3f6c8f9a49447a68f75334e86b360f4359
-size 713
diff --git a/Assets/Editor/Scripts/Shelves/icons/particles_bounds.png b/Assets/Editor/Scripts/Shelves/icons/particles_bounds.png
deleted file mode 100644
index 04321c8ed5..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/particles_bounds.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:231f6c7939361f71b9926f551bbf2eb93ca4ec8394318dcfed0fa413ccd58e66
-size 4073
diff --git a/Assets/Editor/Scripts/Shelves/icons/particles_off.png b/Assets/Editor/Scripts/Shelves/icons/particles_off.png
deleted file mode 100644
index ed7fe76f44..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/particles_off.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:b6e656417153394c5466a207bd6ff21072c6ef82fe6972380ceda7fa6e60c478
-size 4053
diff --git a/Assets/Editor/Scripts/Shelves/icons/particles_overdraw.png b/Assets/Editor/Scripts/Shelves/icons/particles_overdraw.png
deleted file mode 100644
index 86a8a72b52..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/particles_overdraw.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:8f021d07012f712d8ab70af609974e1cb0933d571bbe0f184e0e7479ee172834
-size 3004
diff --git a/Assets/Editor/Scripts/Shelves/icons/particles_screen_coverage.png b/Assets/Editor/Scripts/Shelves/icons/particles_screen_coverage.png
deleted file mode 100644
index fd20e416b2..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/particles_screen_coverage.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:387a799eeb739b6183f3d47186c122ea51c8998664bd0cff76e28f8de2cf49ee
-size 4024
diff --git a/Assets/Editor/Scripts/Shelves/icons/placeholder.png b/Assets/Editor/Scripts/Shelves/icons/placeholder.png
deleted file mode 100644
index f3225255c7..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/placeholder.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:a91ea78d1ffd91490f20efcf76ad8790e450836240b8a77dda719da963235c85
-size 2987
diff --git a/Assets/Editor/Scripts/Shelves/icons/prefab.png b/Assets/Editor/Scripts/Shelves/icons/prefab.png
deleted file mode 100644
index 84d2b08397..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/prefab.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:332071c8b20030de53ec194dfe853b29f45a0de04d99dcd1b1c4b32dcf2946a5
-size 683
diff --git a/Assets/Editor/Scripts/Shelves/icons/reflections.png b/Assets/Editor/Scripts/Shelves/icons/reflections.png
deleted file mode 100644
index 0fc82618b8..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/reflections.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:ee9fdf1b6ab47cfc72c3794a46b6886b9993e691a7d097b3d109127ddcde46ac
-size 640
diff --git a/Assets/Editor/Scripts/Shelves/icons/reset.png b/Assets/Editor/Scripts/Shelves/icons/reset.png
deleted file mode 100644
index 8cc13235ae..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/reset.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:120be39c58db0bab5450db22604f94cf31eb68a480f06daf3d4f76828461385b
-size 4076
diff --git a/Assets/Editor/Scripts/Shelves/icons/selfocc.png b/Assets/Editor/Scripts/Shelves/icons/selfocc.png
deleted file mode 100644
index f3a1ece6a3..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/selfocc.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:83e8233f9f0594151e734583f9fd3835250f370dac8b648554f1060d79efa43b
-size 2935
diff --git a/Assets/Editor/Scripts/Shelves/icons/shaded_wireframe.png b/Assets/Editor/Scripts/Shelves/icons/shaded_wireframe.png
deleted file mode 100644
index 79d4148d9c..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/shaded_wireframe.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:f514eebcdcd02d8195d8b51966ad84cfb8162c3811facc6da9fc0a71e10443bc
-size 3041
diff --git a/Assets/Editor/Scripts/Shelves/icons/shadows.png b/Assets/Editor/Scripts/Shelves/icons/shadows.png
deleted file mode 100644
index 06fd30ee05..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/shadows.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:281c6d85ab6d7e706f73865a7beb523bf64e505d8fd2b3c367f6ad56b008a77e
-size 818
diff --git a/Assets/Editor/Scripts/Shelves/icons/showlines.png b/Assets/Editor/Scripts/Shelves/icons/showlines.png
deleted file mode 100644
index b4329c1beb..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/showlines.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:268a5b239b9988be0ae13a2f42a99ac39ac2db9988f92604154630b661b89999
-size 2865
diff --git a/Assets/Editor/Scripts/Shelves/icons/sky.png b/Assets/Editor/Scripts/Shelves/icons/sky.png
deleted file mode 100644
index 86d018f2d8..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/sky.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:3598e1bdc4c47d6be99ad6ff10e91b307bb4a94286fff57a0c339d6aaed2e0a3
-size 620
diff --git a/Assets/Editor/Scripts/Shelves/icons/spec_acc.png b/Assets/Editor/Scripts/Shelves/icons/spec_acc.png
deleted file mode 100644
index b66acb25ca..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/spec_acc.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:ee2c46410495a75862d8f5d2e69cce11c94745680ef03b50ba7b17af9c137656
-size 3334
diff --git a/Assets/Editor/Scripts/Shelves/icons/spec_lum.png b/Assets/Editor/Scripts/Shelves/icons/spec_lum.png
deleted file mode 100644
index 7561feb7c0..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/spec_lum.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:a67c8e063331c5c6ce256892abdde113f405c60854115ba87f6798d06f57eb02
-size 2892
diff --git a/Assets/Editor/Scripts/Shelves/icons/spec_occ.png b/Assets/Editor/Scripts/Shelves/icons/spec_occ.png
deleted file mode 100644
index 624f8481ad..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/spec_occ.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:23a7074e8ced66649cc8c2f69db33559bd600658709aaf287a9d9de9c98a05f6
-size 3182
diff --git a/Assets/Editor/Scripts/Shelves/icons/ssao.png b/Assets/Editor/Scripts/Shelves/icons/ssao.png
deleted file mode 100644
index 376a0a2157..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/ssao.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:134cbfd478080236c3f5ea2ee32319e63ee21ff48f187b709ab9dc0f3688c2dd
-size 3932
diff --git a/Assets/Editor/Scripts/Shelves/icons/ssdo.png b/Assets/Editor/Scripts/Shelves/icons/ssdo.png
deleted file mode 100644
index 517658c1f5..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/ssdo.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:c200aad6ad59b7d466edc44026ffca2272ca3b20944070210db1108f21f1cb60
-size 3972
diff --git a/Assets/Editor/Scripts/Shelves/icons/ssdo_toggle.png b/Assets/Editor/Scripts/Shelves/icons/ssdo_toggle.png
deleted file mode 100644
index 881b07cb2f..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/ssdo_toggle.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:c897d61016bc32c7072273a081e624880b90beb89e90f20b25e689f5198d1f63
-size 3966
diff --git a/Assets/Editor/Scripts/Shelves/icons/sun.big.png b/Assets/Editor/Scripts/Shelves/icons/sun.big.png
deleted file mode 100644
index 0a5363ddca..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/sun.big.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:c49214e755a68e48bba8b8be9183777c24c3443aa734e4969e74bc42d5979cb7
-size 539
diff --git a/Assets/Editor/Scripts/Shelves/icons/tangents.png b/Assets/Editor/Scripts/Shelves/icons/tangents.png
deleted file mode 100644
index 7a1f5c0a3a..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/tangents.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:e8a5f21232c186fed9bd9a0d62bd4023dca1d496e151ad0fee5b593fc67645bf
-size 1115
diff --git a/Assets/Editor/Scripts/Shelves/icons/terrain.png b/Assets/Editor/Scripts/Shelves/icons/terrain.png
deleted file mode 100644
index b32c4cde98..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/terrain.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:821ef3daa0cdf246985c0bc1bd988edeceadb672dd81f4813320e8d50ca0e41c
-size 461
diff --git a/Assets/Editor/Scripts/Shelves/icons/time_scale_double.png b/Assets/Editor/Scripts/Shelves/icons/time_scale_double.png
deleted file mode 100644
index 03ae1a21ea..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/time_scale_double.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:86ebd1c792b9024662a179995ba65d181157a9887112f12571fbfe05a3dc8a79
-size 3145
diff --git a/Assets/Editor/Scripts/Shelves/icons/time_scale_frozen.png b/Assets/Editor/Scripts/Shelves/icons/time_scale_frozen.png
deleted file mode 100644
index a1756ce9fa..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/time_scale_frozen.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:4fbe9783be75404b2364726b09f9013360522d2e71f479476a715b6577def003
-size 3386
diff --git a/Assets/Editor/Scripts/Shelves/icons/time_scale_half.png b/Assets/Editor/Scripts/Shelves/icons/time_scale_half.png
deleted file mode 100644
index c3f9f03d98..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/time_scale_half.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:1a6740a0e38ea99c83c1460a33f62c3dead3ab85f05bf446426fb39a75aa76f8
-size 3137
diff --git a/Assets/Editor/Scripts/Shelves/icons/time_scale_quarter.png b/Assets/Editor/Scripts/Shelves/icons/time_scale_quarter.png
deleted file mode 100644
index a8a9b8cdd8..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/time_scale_quarter.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:4b0baf9f76bcc0bcd38fea907b79edde3bcb66e78b221094473a8abd0b222734
-size 3175
diff --git a/Assets/Editor/Scripts/Shelves/icons/time_scale_tenth.png b/Assets/Editor/Scripts/Shelves/icons/time_scale_tenth.png
deleted file mode 100644
index 0aba084827..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/time_scale_tenth.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:f71d44c06aa67ab94b190bd74516ce73c534a7d6421415437db262659b2ff32a
-size 3124
diff --git a/Assets/Editor/Scripts/Shelves/icons/tod.png b/Assets/Editor/Scripts/Shelves/icons/tod.png
deleted file mode 100644
index 0d5c4682c2..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/tod.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:6028cef57651c79f5eb83c52eb0ab63eb42dbf4014dcb0f60c4c15ab8fe3cafd
-size 977
diff --git a/Assets/Editor/Scripts/Shelves/icons/translucency.png b/Assets/Editor/Scripts/Shelves/icons/translucency.png
deleted file mode 100644
index 8487c5916f..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/translucency.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:07457d1315f4cf1bd931187d849a1e842c931640edb53abb2a4f5b2d8d65716b
-size 3110
diff --git a/Assets/Editor/Scripts/Shelves/icons/transparency.png b/Assets/Editor/Scripts/Shelves/icons/transparency.png
deleted file mode 100644
index 4f41c6491b..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/transparency.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:e59571a1490d7dd4696bc118bd4ccc8e08a663afac1ce3f2d88bb5d7d6fdb196
-size 558
diff --git a/Assets/Editor/Scripts/Shelves/icons/valid_albedo.png b/Assets/Editor/Scripts/Shelves/icons/valid_albedo.png
deleted file mode 100644
index c3a76d6dfa..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/valid_albedo.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:ce233f32949099694d4294b95252068c4486edba163a466ebdb20a54a2338f0f
-size 3120
diff --git a/Assets/Editor/Scripts/Shelves/icons/valid_spec_lum.png b/Assets/Editor/Scripts/Shelves/icons/valid_spec_lum.png
deleted file mode 100644
index 13f8404057..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/valid_spec_lum.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:f5f365970f6f9138d6e78a2053338eb1275c562fb700670ab00e800e6a43280d
-size 3199
diff --git a/Assets/Editor/Scripts/Shelves/icons/vegetation.png b/Assets/Editor/Scripts/Shelves/icons/vegetation.png
deleted file mode 100644
index 4492e38ce8..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/vegetation.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:48a435a0632d7d0a8bdfee418423d8c411c4eab9b1da0fac257f32451a233d8f
-size 747
diff --git a/Assets/Editor/Scripts/Shelves/icons/vertex_normals.png b/Assets/Editor/Scripts/Shelves/icons/vertex_normals.png
deleted file mode 100644
index 80c51660c0..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/vertex_normals.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:101e61f7e5b40aaa48bed685f854fc01c58aec66ca8becc5386f6f0c22c020ad
-size 1114
diff --git a/Assets/Editor/Scripts/Shelves/icons/vis_area.png b/Assets/Editor/Scripts/Shelves/icons/vis_area.png
deleted file mode 100644
index 0d16d4a477..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/vis_area.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:ae9997b5b999a6b66e56d6024617f718ea06fd389a98a97465a5d76780a1da75
-size 3915
diff --git a/Assets/Editor/Scripts/Shelves/icons/water_volume.png b/Assets/Editor/Scripts/Shelves/icons/water_volume.png
deleted file mode 100644
index 2be9a96264..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/water_volume.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:e88a2a6e4d14bced3d3e48c25d4bfe075d8587898cd61fbd0e3ab99e4391e663
-size 602
diff --git a/Assets/Editor/Scripts/Shelves/icons/wind.png b/Assets/Editor/Scripts/Shelves/icons/wind.png
deleted file mode 100644
index 54ed666138..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/wind.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:caa003d65336c2e2a8987122ace98e0300e5d8afe1864dffef0d1651b136ccc1
-size 720
diff --git a/Assets/Editor/Scripts/Shelves/icons/wireframe.png b/Assets/Editor/Scripts/Shelves/icons/wireframe.png
deleted file mode 100644
index 85a71daccc..0000000000
--- a/Assets/Editor/Scripts/Shelves/icons/wireframe.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:fd5356c97575c12fa7038443c0216a316c234e4e50e2e439ff8dde4504e56243
-size 2848
diff --git a/Assets/Editor/Translation/scriptcanvas_en_us.ts b/Assets/Editor/Translation/scriptcanvas_en_us.ts
index f057ba2f30..937f6a4d96 100644
--- a/Assets/Editor/Translation/scriptcanvas_en_us.ts
+++ b/Assets/Editor/Translation/scriptcanvas_en_us.ts
@@ -2771,6 +2771,80 @@
VECTOR2_CREATEONE_OUTPUT0_TOOLTIP
+
+ VECTOR2_DIRECTIONTO_NAME
+ Class/Bus: Vector2 Event/Method: DirectionTo
+ Get Direction Vector
+
+
+ VECTOR2_DIRECTIONTO_TOOLTIP
+ Returns a direction vector between two points and the distance between them, by default the direction will be normalized, it may be optionally scaled using the Scale parameter if different from 1.0
+
+
+ VECTOR2_DIRECTIONTO_CATEGORY
+
+
+
+ VECTOR2_DIRECTIONTO_OUT_NAME
+
+
+
+ VECTOR2_DIRECTIONTO_OUT_TOOLTIP
+
+
+
+ VECTOR2_DIRECTIONTOL_IN_NAME
+
+
+
+ VECTOR2_DIRECTIONTO_IN_TOOLTIP
+
+
+
+ VECTOR2_DIRECTIONTO_OUTPUT0_NAME
+ C++ Type: const Vector2
+ Direction
+
+
+ VECTOR2_DIRECTIONTO_OUTPUT0_TOOLTIP
+ The direction between To and From normalized and optionally scaled
+
+
+ VECTOR2_DIRECTIONTO_OUTPUT1_NAME
+ C++ Type: float
+ Distance
+
+
+ VECTOR2_DIRECTIONTO_OUTPUT1_TOOLTIP
+ The distance between To and From
+
+
+ VECTOR2_DIRECTIONTO_PARAM0_NAME
+ Simple Type: Vector2 C++ Type: Vector2*
+ From
+
+
+ VECTOR2_DIRECTIONTO_PARAM0_TOOLTIP
+
+
+
+ VECTOR2_DIRECTIONTO_PARAM1_NAME
+ Simple Type: Vector2 C++ Type: Vector2*
+ To
+
+
+ VECTOR2_DIRECTIONTO_PARAM1_TOOLTIP
+
+
+
+ VECTOR2_DIRECTIONTO_PARAM2_NAME
+ Simple Type: Vector2 C++ Type: Vector2*
+ Scale
+
+
+ VECTOR2_DIRECTIONTO_PARAM2_TOOLTIP
+
+
VECTOR2_GETPROJECTED_NAME
Class/Bus: Vector2 Event/Method: GetProjected
@@ -32262,6 +32336,80 @@ An Entity can be selected by using the pick button, or by dragging an Entity fro
VECTOR4_GETRECIPROCAL_PARAM0_TOOLTIP
+
+ VECTOR4_DIRECTIONTO_NAME
+ Class/Bus: Vector4 Event/Method: DirectionTo
+ Get Direction Vector
+
+
+ VECTOR4_DIRECTIONTO_TOOLTIP
+ Returns a direction vector between two points and the distance between them, by default the direction will be normalized, it may be optionally scaled using the Scale parameter if different from 1.0
+
+
+ VECTOR4_DIRECTIONTO_CATEGORY
+
+
+
+ VECTOR4_DIRECTIONTO_OUT_NAME
+
+
+
+ VECTOR4_DIRECTIONTO_OUT_TOOLTIP
+
+
+
+ VECTOR4_DIRECTIONTOL_IN_NAME
+
+
+
+ VECTOR4_DIRECTIONTO_IN_TOOLTIP
+
+
+
+ VECTOR4_DIRECTIONTO_OUTPUT0_NAME
+ C++ Type: const Vector4
+ Direction
+
+
+ VECTOR4_DIRECTIONTO_OUTPUT0_TOOLTIP
+ The direction between To and From normalized and optionally scaled
+
+
+ VECTOR4_DIRECTIONTO_OUTPUT1_NAME
+ C++ Type: float
+ Distance
+
+
+ VECTOR4_DIRECTIONTO_OUTPUT1_TOOLTIP
+ The distance between To and From
+
+
+ VECTOR4_DIRECTIONTO_PARAM0_NAME
+ Simple Type: Vector4 C++ Type: Vector4*
+ From
+
+
+ VECTOR4_DIRECTIONTO_PARAM0_TOOLTIP
+
+
+
+ VECTOR4_DIRECTIONTO_PARAM1_NAME
+ Simple Type: Vector4 C++ Type: Vector4*
+ To
+
+
+ VECTOR4_DIRECTIONTO_PARAM1_TOOLTIP
+
+
+
+ VECTOR4_DIRECTIONTO_PARAM2_NAME
+ Simple Type: Vector4 C++ Type: Vector4*
+ Scale
+
+
+ VECTOR4_DIRECTIONTO_PARAM2_TOOLTIP
+
+
VECTOR4_AXISX_NAME
Class/Bus: Vector4 Event/Method: CreateAxisX
@@ -37469,6 +37617,80 @@ An Entity can be selected by using the pick button, or by dragging an Entity fro
VECTOR3_GETRECIPROCAL_PARAM0_TOOLTIP
+
+ VECTOR3_DIRECTIONTO_NAME
+ Class/Bus: Vector3 Event/Method: DirectionTo
+ Get Direction Vector
+
+
+ VECTOR3_DIRECTIONTO_TOOLTIP
+ Returns a direction vector between two points and the distance between them, by default the direction will be normalized, it may be optionally scaled using the Scale parameter if different from 1.0
+
+
+ VECTOR3_DIRECTIONTO_CATEGORY
+
+
+
+ VECTOR3_DIRECTIONTO_OUT_NAME
+
+
+
+ VECTOR3_DIRECTIONTO_OUT_TOOLTIP
+
+
+
+ VECTOR3_DIRECTIONTOL_IN_NAME
+
+
+
+ VECTOR3_DIRECTIONTO_IN_TOOLTIP
+
+
+
+ VECTOR3_DIRECTIONTO_OUTPUT0_NAME
+ C++ Type: const Vector3
+ Direction
+
+
+ VECTOR3_DIRECTIONTO_OUTPUT0_TOOLTIP
+ The direction between To and From normalized and optionally scaled
+
+
+ VECTOR3_DIRECTIONTO_OUTPUT1_NAME
+ C++ Type: float
+ Distance
+
+
+ VECTOR3_DIRECTIONTO_OUTPUT1_TOOLTIP
+ The distance between To and From
+
+
+ VECTOR3_DIRECTIONTO_PARAM0_NAME
+ Simple Type: Vector3 C++ Type: Vector3*
+ From
+
+
+ VECTOR3_DIRECTIONTO_PARAM0_TOOLTIP
+
+
+
+ VECTOR3_DIRECTIONTO_PARAM1_NAME
+ Simple Type: Vector3 C++ Type: Vector3*
+ To
+
+
+ VECTOR3_DIRECTIONTO_PARAM1_TOOLTIP
+
+
+
+ VECTOR3_DIRECTIONTO_PARAM2_NAME
+ Simple Type: Vector3 C++ Type: Vector3*
+ Scale
+
+
+ VECTOR3_DIRECTIONTO_PARAM2_TOOLTIP
+
+
VECTOR3_PROJECT_NAME
Class/Bus: Vector3 Event/Method: Project
diff --git a/AutomatedTesting/surfacetypemateriallibrary.physmaterial b/AutomatedTesting/Assets/Physics/SurfaceTypeMaterialLibrary.physmaterial
similarity index 100%
rename from AutomatedTesting/surfacetypemateriallibrary.physmaterial
rename to AutomatedTesting/Assets/Physics/SurfaceTypeMaterialLibrary.physmaterial
diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/assetpipeline/CMakeLists.txt
index 1b42d0d871..29b30a12b4 100644
--- a/AutomatedTesting/Gem/PythonTests/assetpipeline/CMakeLists.txt
+++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/CMakeLists.txt
@@ -7,6 +7,7 @@
#
add_subdirectory(asset_processor_tests)
+add_subdirectory(fbx_tests)
if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
## AP Python Tests ##
diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/CMakeLists.txt
index 8b9de91906..0170d73af0 100644
--- a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/CMakeLists.txt
+++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/CMakeLists.txt
@@ -97,7 +97,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
PATH ${CMAKE_CURRENT_LIST_DIR}/asset_bundler_batch_tests.py
EXCLUDE_TEST_RUN_TARGET_FROM_IDE
TEST_SERIAL
- TIMEOUT 1500
+ TIMEOUT 2400
TEST_SUITE periodic
RUNTIME_DEPENDENCIES
AZ::AssetProcessor
diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_builder_tests.py b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_builder_tests.py
index 13b899dfdd..2c805f0291 100755
--- a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_builder_tests.py
+++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_builder_tests.py
@@ -113,7 +113,7 @@ class TestsAssetBuilder_WindowsAndMac(object):
if listening_port:
corrupted_slice_command.append(f'-port={listening_port}')
if workspace.project:
- corrupted_slice_command.append(f'-gamename={workspace.project}')
+ corrupted_slice_command.append(f'--project-path={workspace.project}')
corrupted_slice_output = utils.safe_subprocess(corrupted_slice_command)
# Verify corrupted slice produced error
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 768dd985fd..7f85e5e317 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
@@ -902,7 +902,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
second_input_arg = asset_lists_to_string(second_asset_list) # --secondAssetList
output_arg = asset_lists_to_string(output_file) # --output
- def generate_compare_command(platform_arg: str) -> object:
+ def generate_compare_command(platform_arg: str, project_name : str) -> object:
"""Creates a string containing a full Compare command. This string can be executed as-is."""
cmd = [helper["bundler_batch"], "compare", f"--firstassetFile={first_input_arg}", f"--output={output_arg}"]
if platform_arg is not None:
@@ -918,6 +918,8 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
if comp_type == "4":
# Extra arguments for pattern comparison
cmd.extend([f"--filePatternType={pattern_type}", f"--filePattern={pattern}"])
+ if workspace.project:
+ cmd.append(f'--project-path={project_name}')
return cmd
# End generate_compare_command()
@@ -936,6 +938,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
# End verify_asset_list_contents()
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_mac_asset_list = None
@@ -957,7 +960,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
output_mac_asset_list = helper.platform_file_name(last_output_arg, platform)
# Build execution command
- cmd = generate_compare_command(platform_arg)
+ cmd = generate_compare_command(platform_arg, workspace.project)
# Execute command
subprocess.check_call(cmd)
@@ -992,10 +995,12 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
f"--comparisonRulesFile={rule_file}",
f"--comparisonType={args[1]}",
r"--addComparison",
+ f"--project-path={workspace.project}",
]
if args[1] == "4":
# If pattern comparison, append a few extra arguments
cmd.extend(["--filePatternType=0", "--filePattern=*.dat"])
+
subprocess.check_call(cmd)
assert os.path.exists(rule_file), f"Rule file {args[0]} was not created at location: {rule_file}"
diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/fbx_tests/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/assetpipeline/fbx_tests/CMakeLists.txt
new file mode 100644
index 0000000000..4a26500ee2
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/fbx_tests/CMakeLists.txt
@@ -0,0 +1,21 @@
+#
+# Copyright (c) Contributors to the Open 3D Engine Project.
+# For complete copyright and license terms please see the LICENSE at the root of this distribution.
+#
+# SPDX-License-Identifier: Apache-2.0 OR MIT
+#
+#
+
+if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
+ ly_add_pytest(
+ NAME SceneProcessingTests.PythonAssetBuilderTests
+ TEST_SUITE main
+ PATH ${CMAKE_CURRENT_LIST_DIR}/pythonassetbuildertests.py
+ PYTEST_MARKS "not SUITE_sandbox" # don't run sandbox tests in this file
+ EXCLUDE_TEST_RUN_TARGET_FROM_IDE
+ RUNTIME_DEPENDENCIES
+ AZ::AssetProcessorBatch
+ AZ::AssetProcessor
+ )
+
+endif()
diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/fbx_tests/assets/TwoSceneFiles_OneWithPythonOneWithout_PythonOnlyRunsOnFirstScene/a_simple_box_with_script.fbx b/AutomatedTesting/Gem/PythonTests/assetpipeline/fbx_tests/assets/TwoSceneFiles_OneWithPythonOneWithout_PythonOnlyRunsOnFirstScene/a_simple_box_with_script.fbx
new file mode 100644
index 0000000000..e31b4a96f2
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/fbx_tests/assets/TwoSceneFiles_OneWithPythonOneWithout_PythonOnlyRunsOnFirstScene/a_simple_box_with_script.fbx
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f82aecb36faf5cf9f2730e5ad264db38a3a469f8f48aff9b74682d1a32b098f0
+size 11644
diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/fbx_tests/assets/TwoSceneFiles_OneWithPythonOneWithout_PythonOnlyRunsOnFirstScene/a_simple_box_with_script.fbx.assetinfo b/AutomatedTesting/Gem/PythonTests/assetpipeline/fbx_tests/assets/TwoSceneFiles_OneWithPythonOneWithout_PythonOnlyRunsOnFirstScene/a_simple_box_with_script.fbx.assetinfo
new file mode 100644
index 0000000000..07018ab521
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/fbx_tests/assets/TwoSceneFiles_OneWithPythonOneWithout_PythonOnlyRunsOnFirstScene/a_simple_box_with_script.fbx.assetinfo
@@ -0,0 +1,9 @@
+{
+ "values":
+ [
+ {
+ "$type": "ScriptProcessorRule",
+ "scriptFilename": "TwoSceneFiles_OneWithPythonOneWithout_PythonOnlyRunsOnFirstScene/python_builder.py"
+ }
+ ]
+}
diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/fbx_tests/assets/TwoSceneFiles_OneWithPythonOneWithout_PythonOnlyRunsOnFirstScene/b_simple_box_no_script.fbx b/AutomatedTesting/Gem/PythonTests/assetpipeline/fbx_tests/assets/TwoSceneFiles_OneWithPythonOneWithout_PythonOnlyRunsOnFirstScene/b_simple_box_no_script.fbx
new file mode 100644
index 0000000000..e31b4a96f2
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/fbx_tests/assets/TwoSceneFiles_OneWithPythonOneWithout_PythonOnlyRunsOnFirstScene/b_simple_box_no_script.fbx
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f82aecb36faf5cf9f2730e5ad264db38a3a469f8f48aff9b74682d1a32b098f0
+size 11644
diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/fbx_tests/assets/TwoSceneFiles_OneWithPythonOneWithout_PythonOnlyRunsOnFirstScene/b_simple_box_no_script.fbx.assetinfo b/AutomatedTesting/Gem/PythonTests/assetpipeline/fbx_tests/assets/TwoSceneFiles_OneWithPythonOneWithout_PythonOnlyRunsOnFirstScene/b_simple_box_no_script.fbx.assetinfo
new file mode 100644
index 0000000000..72d756d655
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/fbx_tests/assets/TwoSceneFiles_OneWithPythonOneWithout_PythonOnlyRunsOnFirstScene/b_simple_box_no_script.fbx.assetinfo
@@ -0,0 +1,15 @@
+{
+ "values": [
+ {
+ "$type": "{07B356B7-3635-40B5-878A-FAC4EFD5AD86} MeshGroup",
+ "name": "b_simple_box_no_script",
+ "nodeSelectionList": {
+ "selectedNodes": [
+ {},
+ "RootNode",
+ "RootNode.Cube"
+ ]
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/fbx_tests/assets/TwoSceneFiles_OneWithPythonOneWithout_PythonOnlyRunsOnFirstScene/python_builder.py b/AutomatedTesting/Gem/PythonTests/assetpipeline/fbx_tests/assets/TwoSceneFiles_OneWithPythonOneWithout_PythonOnlyRunsOnFirstScene/python_builder.py
new file mode 100644
index 0000000000..7ad5894a86
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/fbx_tests/assets/TwoSceneFiles_OneWithPythonOneWithout_PythonOnlyRunsOnFirstScene/python_builder.py
@@ -0,0 +1,45 @@
+"""
+Copyright (c) Contributors to the Open 3D Engine Project.
+For complete copyright and license terms please see the LICENSE at the root of this distribution.
+
+SPDX-License-Identifier: Apache-2.0 OR MIT
+"""
+import datetime, uuid, os
+import azlmbr.scene as sceneApi
+import azlmbr.scene.graph
+
+def output_test_data(scene):
+ source_filename = os.path.basename(scene.sourceFilename)
+ source_filename = source_filename.replace('.','_')
+
+ log_output_file_name = f"{source_filename}.log"
+
+ log_output_folder = os.path.dirname(scene.sourceFilename)
+ log_output_location = os.path.join(log_output_folder, log_output_file_name)
+
+ # Saving a file to the temp folder is the easiest way to have this test communicate
+ # with the outer python test.
+ with open(log_output_location, "w") as f:
+ # Just write something to the file, but the filename is the main information
+ # used for the test.
+ f.write(f"scene.sourceFilename: {scene.sourceFilename}\n")
+ return True
+
+mySceneJobHandler = None
+
+def on_update_manifest(args):
+ scene = args[0]
+ result = output_test_data(scene)
+ global mySceneJobHandler
+ mySceneJobHandler.disconnect()
+ mySceneJobHandler = None
+ return result
+
+def main():
+ global mySceneJobHandler
+ mySceneJobHandler = sceneApi.ScriptBuildingNotificationBusHandler()
+ mySceneJobHandler.connect()
+ mySceneJobHandler.add_callback('OnUpdateManifest', on_update_manifest)
+
+if __name__ == "__main__":
+ main()
\ No newline at end of file
diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/fbx_tests/pythonassetbuildertests.py b/AutomatedTesting/Gem/PythonTests/assetpipeline/fbx_tests/pythonassetbuildertests.py
new file mode 100644
index 0000000000..6a568349d2
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/fbx_tests/pythonassetbuildertests.py
@@ -0,0 +1,94 @@
+"""
+Copyright (c) Contributors to the Open 3D Engine Project.
+For complete copyright and license terms please see the LICENSE at the root of this distribution.
+
+SPDX-License-Identifier: Apache-2.0 OR MIT
+"""
+
+# Import builtin libraries
+import pytest
+import logging
+import os
+import stat
+
+# Import LyTestTools
+from ly_test_tools.o3de.asset_processor import AssetProcessor
+from ly_test_tools.o3de import asset_processor as asset_processor_utils
+import ly_test_tools.environment.file_system as fs
+
+# Import fixtures
+from ..ap_fixtures.asset_processor_fixture import asset_processor as asset_processor
+from ..ap_fixtures.ap_setup_fixture import ap_setup_fixture as ap_setup_fixture
+
+# Import LyShared
+from ly_test_tools.o3de.ap_log_parser import APLogParser, APOutputParser
+import ly_test_tools.o3de.pipeline_utils as utils
+
+# Use the following logging pattern to hook all test logging together:
+logger = logging.getLogger(__name__)
+# Configuring the logging is done in ly_test_tools at the following location:
+# ~/dev/Tools/LyTestTools/ly_test_tools/log/py_logging_util.py
+
+# Helper: variables we will use for parameter values in the test:
+targetProjects = ["AutomatedTesting"]
+
+@pytest.fixture
+def local_resources(request, workspace, ap_setup_fixture):
+ ap_setup_fixture["tests_dir"] = os.path.dirname(os.path.realpath(__file__))
+
+
+@pytest.mark.usefixtures("asset_processor")
+@pytest.mark.usefixtures("ap_setup_fixture")
+@pytest.mark.usefixtures("local_resources")
+@pytest.mark.parametrize("project", targetProjects)
+@pytest.mark.assetpipeline
+@pytest.mark.SUITE_main
+class TestsPythonAssetProcessing_APBatch(object):
+
+ @pytest.mark.BAT
+ @pytest.mark.assetpipeline
+ def test_ProcessAssetWithoutScriptAfterAssetWithScript_ScriptOnlyRunsOnExpectedAsset(self, workspace, ap_setup_fixture, asset_processor):
+ # This is a regression test. The situation it's testing is, the Python script to run
+ # defined in scene manifest files was persisting in a single builder. So if
+ # that builder processed file a.fbx, then b.fbx, and a.fbx has a Python script to run,
+ # it was also running that Python script on b.fbx.
+
+ asset_processor.prepare_test_environment(ap_setup_fixture["tests_dir"], "TwoSceneFiles_OneWithPythonOneWithout_PythonOnlyRunsOnFirstScene")
+
+ asset_processor_extra_params = [
+ # Disabling Atom assets disables most products, using the debugOutput flag ensures one product is output.
+ "--debugOutput",
+ # By default, if job priorities are equal, jobs run in an arbitrary order. This makes sure
+ # jobs are run by sorting on the database source name, so they run in the same order each time
+ # when this test is run.
+ "--sortJobsByDBSourceName",
+ # Disabling Atom products means this asset won't need a lot of source dependencies to be processed,
+ # keeping the scope of this test down.
+ "--regset=\"/O3DE/SceneAPI/AssetImporter/SkipAtomOutput=true\"",
+ # The bug this regression test happened when the same builder processed FBX files with and without Python.
+ # This flag ensures that only one builder is launched, so that situation can be replicated.
+ "--regset=\"/Amazon/AssetProcessor/Settings/Jobs/maxJobs=1\""]
+
+ result, _ = asset_processor.batch_process(extra_params=asset_processor_extra_params)
+ assert result, "AP Batch failed"
+
+ expected_product_list = [
+ "a_simple_box_with_script.dbgsg",
+ "b_simple_box_no_script.dbgsg"
+ ]
+
+ missing_assets, _ = utils.compare_assets_with_cache(expected_product_list,
+ asset_processor.project_test_cache_folder())
+ assert not missing_assets, f'The following assets were expected to be in, but not found in cache: {str(missing_assets)}'
+
+ # The Python script loaded in the scene manifest will write a log file with the source file's name
+ # to the temp folder. This is the easiest way to have the internal Python there communicate with this test.
+ expected_path = os.path.join(asset_processor.project_test_source_folder(), "a_simple_box_with_script_fbx.log")
+ unexpected_path = os.path.join(asset_processor.project_test_source_folder(), "b_simple_box_no_script_fbx.log")
+
+ # Simple check to make sure the Python script in the scene manifest ran on the file it should have ran on.
+ assert os.path.exists(expected_path), f"Did not find expected output test asset {expected_path}"
+ # If this test fails here, it means the Python script from the first processed FBX file is being run
+ # on the second FBX file, when it should not be.
+ assert not os.path.exists(unexpected_path), f"Found unexpected output test asset {unexpected_path}"
+
diff --git a/AutomatedTesting/Gem/PythonTests/atom_renderer/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/atom_renderer/CMakeLists.txt
index a342d95d98..d4f036faeb 100644
--- a/AutomatedTesting/Gem/PythonTests/atom_renderer/CMakeLists.txt
+++ b/AutomatedTesting/Gem/PythonTests/atom_renderer/CMakeLists.txt
@@ -17,7 +17,7 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_BUILD_TESTS_SUPPORTED AND AutomatedT
TEST_SUITE main
PATH ${CMAKE_CURRENT_LIST_DIR}/test_Atom_MainSuite.py
TEST_SERIAL
- TIMEOUT 400
+ TIMEOUT 600
RUNTIME_DEPENDENCIES
AssetProcessor
AutomatedTesting.Assets
diff --git a/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_hydra_scripts/hydra_AtomEditorComponents_LightComponent.py b/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_hydra_scripts/hydra_AtomEditorComponents_LightComponent.py
new file mode 100644
index 0000000000..ec8dc199ae
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_hydra_scripts/hydra_AtomEditorComponents_LightComponent.py
@@ -0,0 +1,217 @@
+"""
+Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
+
+SPDX-License-Identifier: Apache-2.0 OR MIT
+
+Hydra script that creates an entity, attaches the Light component to it for test verifications.
+The test verifies that each light type option is available and can be selected without errors.
+"""
+
+import os
+import sys
+
+import azlmbr.bus as bus
+import azlmbr.editor as editor
+import azlmbr.math as math
+import azlmbr.paths
+import azlmbr.legacy.general as general
+
+sys.path.append(os.path.join(azlmbr.paths.devassets, "Gem", "PythonTests"))
+
+import editor_python_test_tools.hydra_editor_utils as hydra
+from atom_renderer.atom_utils.atom_component_helper import LIGHT_TYPES
+
+LIGHT_TYPE_PROPERTY = 'Controller|Configuration|Light type'
+SPHERE_AND_SPOT_DISK_LIGHT_PROPERTIES = [
+ ("Controller|Configuration|Shadows|Enable shadow", True),
+ ("Controller|Configuration|Shadows|Shadowmap size", 0), # 256
+ ("Controller|Configuration|Shadows|Shadowmap size", 1), # 512
+ ("Controller|Configuration|Shadows|Shadowmap size", 2), # 1024
+ ("Controller|Configuration|Shadows|Shadowmap size", 3), # 2048
+ ("Controller|Configuration|Shadows|Shadow filter method", 1), # PCF
+ ("Controller|Configuration|Shadows|Filtering sample count", 4.0),
+ ("Controller|Configuration|Shadows|Filtering sample count", 64.0),
+ ("Controller|Configuration|Shadows|PCF method", 0), # Bicubic
+ ("Controller|Configuration|Shadows|PCF method", 1), # Boundary search
+ ("Controller|Configuration|Shadows|Shadow filter method", 2), # ECM
+ ("Controller|Configuration|Shadows|ESM exponent", 50),
+ ("Controller|Configuration|Shadows|ESM exponent", 5000),
+ ("Controller|Configuration|Shadows|Shadow filter method", 3), # ESM+PCF
+]
+QUAD_LIGHT_PROPERTIES = [
+ ("Controller|Configuration|Both directions", True),
+ ("Controller|Configuration|Fast approximation", True),
+]
+SIMPLE_POINT_LIGHT_PROPERTIES = [
+ ("Controller|Configuration|Attenuation radius|Mode", 0),
+ ("Controller|Configuration|Attenuation radius|Radius", 100.0),
+]
+SIMPLE_SPOT_LIGHT_PROPERTIES = [
+ ("Controller|Configuration|Shutters|Inner angle", 45.0),
+ ("Controller|Configuration|Shutters|Outer angle", 90.0),
+]
+
+
+def verify_required_component_property_value(entity_name, component, property_path, expected_property_value):
+ """
+ Compares the property value of component against the expected_property_value.
+ :param entity_name: name of the entity to use (for test verification purposes).
+ :param component: component to check on a given entity for its current property value.
+ :param property_path: the path to the property inside the component.
+ :param expected_property_value: The value expected from the value inside property_path.
+ :return: None, but prints to general.log() which the test uses to verify against.
+ """
+ property_value = editor.EditorComponentAPIBus(
+ bus.Broadcast, "GetComponentProperty", component, property_path).GetValue()
+ general.log(f"{entity_name}_test: Property value is {property_value} "
+ f"which matches {expected_property_value}")
+
+
+def run():
+ """
+ Test Case - Light Component
+ 1. Creates a "light_entity" Entity and attaches a "Light" component to it.
+ 2. Updates the Light component to each light type option from the LIGHT_TYPES constant.
+ 3. The test will check the Editor log to ensure each light type was selected.
+ 4. Prints the string "Light component test (non-GPU) completed" after completion.
+
+ Tests will fail immediately if any of these log lines are found:
+ 1. Trace::Assert
+ 2. Trace::Error
+ 3. Traceback (most recent call last):
+
+ :return: None
+ """
+ # Create a "light_entity" entity with "Light" component.
+ light_entity_name = "light_entity"
+ light_component = "Light"
+ light_entity = hydra.Entity(light_entity_name)
+ light_entity.create_entity(math.Vector3(-1.0, -2.0, 3.0), [light_component])
+ general.log(
+ f"{light_entity_name}_test: Component added to the entity: "
+ f"{hydra.has_components(light_entity.id, [light_component])}")
+
+ # Populate the light_component_id_pair value so that it can be used to select all Light component options.
+ light_component_id_pair = None
+ component_type_id_list = azlmbr.editor.EditorComponentAPIBus(
+ azlmbr.bus.Broadcast, 'FindComponentTypeIdsByEntityType', [light_component], 0)
+ if len(component_type_id_list) < 1:
+ general.log(f"ERROR: A component class with name {light_component} doesn't exist")
+ light_component_id_pair = None
+ elif len(component_type_id_list) > 1:
+ general.log(f"ERROR: Found more than one component classes with same name: {light_component}")
+ light_component_id_pair = None
+ entity_component_id_pair = azlmbr.editor.EditorComponentAPIBus(
+ azlmbr.bus.Broadcast, 'GetComponentOfType', light_entity.id, component_type_id_list[0])
+ if entity_component_id_pair.IsSuccess():
+ light_component_id_pair = entity_component_id_pair.GetValue()
+
+ # Test each Light component option can be selected and it's properties updated.
+ # Point (sphere) light type checks.
+ light_type_property_test(
+ light_type=LIGHT_TYPES['sphere'],
+ light_properties=SPHERE_AND_SPOT_DISK_LIGHT_PROPERTIES,
+ light_component_id_pair=light_component_id_pair,
+ light_entity_name=light_entity_name,
+ light_entity=light_entity
+ )
+
+ # Spot (disk) light type checks.
+ light_type_property_test(
+ light_type=LIGHT_TYPES['spot_disk'],
+ light_properties=SPHERE_AND_SPOT_DISK_LIGHT_PROPERTIES,
+ light_component_id_pair=light_component_id_pair,
+ light_entity_name=light_entity_name,
+ light_entity=light_entity
+ )
+
+ # Capsule light type checks.
+ azlmbr.editor.EditorComponentAPIBus(
+ azlmbr.bus.Broadcast,
+ 'SetComponentProperty',
+ light_component_id_pair,
+ LIGHT_TYPE_PROPERTY,
+ LIGHT_TYPES['capsule']
+ )
+ verify_required_component_property_value(
+ entity_name=light_entity_name,
+ component=light_entity.components[0],
+ property_path=LIGHT_TYPE_PROPERTY,
+ expected_property_value=LIGHT_TYPES['capsule']
+ )
+
+ # Quad light type checks.
+ light_type_property_test(
+ light_type=LIGHT_TYPES['quad'],
+ light_properties=QUAD_LIGHT_PROPERTIES,
+ light_component_id_pair=light_component_id_pair,
+ light_entity_name=light_entity_name,
+ light_entity=light_entity
+ )
+
+ # Polygon light type checks.
+ azlmbr.editor.EditorComponentAPIBus(
+ azlmbr.bus.Broadcast,
+ 'SetComponentProperty',
+ light_component_id_pair,
+ LIGHT_TYPE_PROPERTY,
+ LIGHT_TYPES['polygon']
+ )
+ verify_required_component_property_value(
+ entity_name=light_entity_name,
+ component=light_entity.components[0],
+ property_path=LIGHT_TYPE_PROPERTY,
+ expected_property_value=LIGHT_TYPES['polygon']
+ )
+
+ # Point (simple punctual) light type checks.
+ light_type_property_test(
+ light_type=LIGHT_TYPES['simple_point'],
+ light_properties=SIMPLE_POINT_LIGHT_PROPERTIES,
+ light_component_id_pair=light_component_id_pair,
+ light_entity_name=light_entity_name,
+ light_entity=light_entity
+ )
+
+ # Spot (simple punctual) light type checks.
+ light_type_property_test(
+ light_type=LIGHT_TYPES['simple_spot'],
+ light_properties=SIMPLE_SPOT_LIGHT_PROPERTIES,
+ light_component_id_pair=light_component_id_pair,
+ light_entity_name=light_entity_name,
+ light_entity=light_entity
+ )
+
+ general.log("Light component test (non-GPU) completed.")
+
+
+def light_type_property_test(light_type, light_properties, light_component_id_pair, light_entity_name, light_entity):
+ """
+ Updates the current light type and modifies its properties, then verifies they are accurate to what was set.
+ :param light_type: The type of light to update, must match a value in LIGHT_TYPES
+ :param light_properties: List of tuples detailing properties to modify with update values.
+ :param light_component_id_pair: Entity + component ID pair for updating the light component on a given entity.
+ :param light_entity_name: the name of the Entity holding the light component.
+ :param light_entity: the Entity object containing the light component.
+ :return: None
+ """
+ azlmbr.editor.EditorComponentAPIBus(
+ azlmbr.bus.Broadcast,
+ 'SetComponentProperty',
+ light_component_id_pair,
+ LIGHT_TYPE_PROPERTY,
+ light_type
+ )
+ verify_required_component_property_value(
+ entity_name=light_entity_name,
+ component=light_entity.components[0],
+ property_path=LIGHT_TYPE_PROPERTY,
+ expected_property_value=light_type
+ )
+
+ for light_property in light_properties:
+ light_entity.get_set_test(0, light_property[0], light_property[1])
+
+
+if __name__ == "__main__":
+ run()
diff --git a/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_hydra_scripts/hydra_GPUTest_AtomFeatureIntegrationBenchmark.py b/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_hydra_scripts/hydra_GPUTest_AtomFeatureIntegrationBenchmark.py
new file mode 100644
index 0000000000..b899d7dcde
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_hydra_scripts/hydra_GPUTest_AtomFeatureIntegrationBenchmark.py
@@ -0,0 +1,102 @@
+"""
+Copyright (c) Contributors to the Open 3D Engine Project.
+For complete copyright and license terms please see the LICENSE at the root of this distribution.
+
+SPDX-License-Identifier: Apache-2.0 OR MIT
+
+Hydra script that is used to create a new level with a default rendering setup.
+After the level is setup, screenshots are diffed against golden images are used to verify pass/fail results of the test.
+
+See the run() function for more in-depth test info.
+"""
+
+import os
+import sys
+
+import azlmbr.legacy.general as general
+
+sys.path.append(os.path.join(azlmbr.paths.devroot, "AutomatedTesting", "Gem", "PythonTests"))
+
+import editor_python_test_tools.hydra_editor_utils as hydra
+from editor_python_test_tools.editor_test_helper import EditorTestHelper
+from atom_renderer.atom_utils.benchmark_utils import BenchmarkHelper
+
+SCREEN_WIDTH = 1280
+SCREEN_HEIGHT = 720
+DEGREE_RADIAN_FACTOR = 0.0174533
+
+helper = EditorTestHelper(log_prefix="Test_Atom_BasicLevelSetup")
+
+
+def run():
+ """
+ 1. View -> Layouts -> Restore Default Layout, sets the viewport to ratio 16:9 @ 1280 x 720
+ 2. Runs console command r_DisplayInfo = 0
+ 3. Opens AtomFeatureIntegrationBenchmark level
+ 4. Initializes benchmark helper with benchmark name to capture benchmark metadata.
+ 5. Idles for 100 frames, then collects pass timings for 100 frames.
+ :return: None
+ """
+ def initial_viewport_setup(screen_width, screen_height):
+ general.set_viewport_size(screen_width, screen_height)
+ general.update_viewport()
+ helper.wait_for_condition(
+ function=lambda: helper.isclose(a=general.get_viewport_size().x, b=SCREEN_WIDTH, rel_tol=0.1)
+ and helper.isclose(a=general.get_viewport_size().y, b=SCREEN_HEIGHT, rel_tol=0.1),
+ timeout_in_seconds=4.0
+ )
+ result = helper.isclose(a=general.get_viewport_size().x, b=SCREEN_WIDTH, rel_tol=0.1) and helper.isclose(
+ a=general.get_viewport_size().y, b=SCREEN_HEIGHT, rel_tol=0.1)
+ general.log(general.get_viewport_size().x)
+ general.log(general.get_viewport_size().y)
+ general.log(general.get_viewport_size().z)
+ general.log(f"Viewport is set to the expected size: {result}")
+ general.run_console("r_DisplayInfo = 0")
+
+ def after_level_load():
+ """Function to call after creating/opening a level to ensure it loads."""
+ # Give everything a second to initialize.
+ general.idle_enable(True)
+ general.idle_wait(1.0)
+ general.update_viewport()
+ general.idle_wait(0.5) # half a second is more than enough for updating the viewport.
+
+ # Close out problematic windows, FPS meters, and anti-aliasing.
+ if general.is_helpers_shown(): # Turn off the helper gizmos if visible
+ general.toggle_helpers()
+ general.idle_wait(1.0)
+ if general.is_pane_visible("Error Report"): # Close Error Report windows that block focus.
+ general.close_pane("Error Report")
+ if general.is_pane_visible("Error Log"): # Close Error Log windows that block focus.
+ general.close_pane("Error Log")
+ general.idle_wait(1.0)
+ general.run_console("r_displayInfo=0")
+ general.run_console("r_antialiasingmode=0")
+ general.idle_wait(1.0)
+
+ return True
+
+ # Wait for Editor idle loop before executing Python hydra scripts.
+ general.idle_enable(True)
+
+ general.open_level_no_prompt("AtomFeatureIntegrationBenchmark")
+
+ # Basic setup after opening level.
+ after_level_load()
+ initial_viewport_setup(SCREEN_WIDTH, SCREEN_HEIGHT)
+
+ general.enter_game_mode()
+ general.idle_wait(1.0)
+ helper.wait_for_condition(function=lambda: general.is_in_game_mode(), timeout_in_seconds=2.0)
+ benchmarker = BenchmarkHelper("AtomFeatureIntegrationBenchmark")
+ benchmarker.capture_benchmark_metadata()
+ general.idle_wait_frames(100)
+ for i in range(1, 101):
+ benchmarker.capture_pass_timestamp(i)
+ general.exit_game_mode()
+ helper.wait_for_condition(function=lambda: not general.is_in_game_mode(), timeout_in_seconds=2.0)
+ general.log("Capturing complete.")
+
+
+if __name__ == "__main__":
+ run()
diff --git a/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_utils/atom_component_helper.py b/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_utils/atom_component_helper.py
new file mode 100644
index 0000000000..de4e28bb36
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_utils/atom_component_helper.py
@@ -0,0 +1,19 @@
+"""
+Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
+
+SPDX-License-Identifier: Apache-2.0 OR MIT
+
+File to assist with common hydra component functions or constants used across various Atom tests.
+"""
+
+# Light type options for the Light component.
+LIGHT_TYPES = {
+ 'unknown': 0,
+ 'sphere': 1,
+ 'spot_disk': 2,
+ 'capsule': 3,
+ 'quad': 4,
+ 'polygon': 5,
+ 'simple_point': 6,
+ 'simple_spot': 7,
+}
diff --git a/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_utils/benchmark_utils.py b/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_utils/benchmark_utils.py
new file mode 100644
index 0000000000..21c7489ed3
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_utils/benchmark_utils.py
@@ -0,0 +1,84 @@
+"""
+Copyright (c) Contributors to the Open 3D Engine Project.
+For complete copyright and license terms please see the LICENSE at the root of this distribution.
+
+SPDX-License-Identifier: Apache-2.0 OR MIT
+"""
+import azlmbr.atom
+import azlmbr.legacy.general as general
+
+FOLDER_PATH = '@user@/Scripts/PerformanceBenchmarks'
+METADATA_FILE = 'benchmark_metadata.json'
+
+class BenchmarkHelper(object):
+ """
+ A helper to capture benchmark data.
+ """
+ def __init__(self, benchmark_name):
+ super().__init__()
+ self.benchmark_name = benchmark_name
+ self.output_path = f'{FOLDER_PATH}/{benchmark_name}'
+ self.done = False
+ self.capturedData = False
+ self.max_frames_to_wait = 200
+
+ def capture_benchmark_metadata(self):
+ """
+ Capture benchmark metadata and block further execution until it has been written to the disk.
+ """
+ self.handler = azlmbr.atom.ProfilingCaptureNotificationBusHandler()
+ self.handler.connect()
+ self.handler.add_callback('OnCaptureBenchmarkMetadataFinished', self.on_data_captured)
+
+ self.done = False
+ self.capturedData = False
+ success = azlmbr.atom.ProfilingCaptureRequestBus(
+ azlmbr.bus.Broadcast, "CaptureBenchmarkMetadata", self.benchmark_name, f'{self.output_path}/{METADATA_FILE}'
+ )
+ if success:
+ self.wait_until_data()
+ general.log('Benchmark metadata captured.')
+ else:
+ general.log('Failed to capture benchmark metadata.')
+ return self.capturedData
+
+ def capture_pass_timestamp(self, frame_number):
+ """
+ Capture pass timestamps and block further execution until it has been written to the disk.
+ """
+ self.handler = azlmbr.atom.ProfilingCaptureNotificationBusHandler()
+ self.handler.connect()
+ self.handler.add_callback('OnCaptureQueryTimestampFinished', self.on_data_captured)
+
+ self.done = False
+ self.capturedData = False
+ success = azlmbr.atom.ProfilingCaptureRequestBus(
+ azlmbr.bus.Broadcast, "CapturePassTimestamp", f'{self.output_path}/frame{frame_number}_timestamps.json')
+ if success:
+ self.wait_until_data()
+ general.log('Pass timestamps captured.')
+ else:
+ general.log('Failed to capture pass timestamps.')
+ return self.capturedData
+
+ def on_data_captured(self, parameters):
+ # the parameters come in as a tuple
+ if parameters[0]:
+ general.log('Captured data successfully.')
+ self.capturedData = True
+ else:
+ general.log('Failed to capture data.')
+ self.done = True
+ self.handler.disconnect()
+
+ def wait_until_data(self):
+ frames_waited = 0
+ while self.done == False:
+ general.idle_wait_frames(1)
+ if frames_waited > self.max_frames_to_wait:
+ general.log('Timed out while waiting for the data to be captured')
+ self.handler.disconnect()
+ break
+ else:
+ frames_waited = frames_waited + 1
+ general.log(f'(waited {frames_waited} frames)')
diff --git a/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_GPUTests.py b/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_GPUTests.py
index dad92d0932..ede140c075 100644
--- a/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_GPUTests.py
+++ b/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_GPUTests.py
@@ -14,6 +14,7 @@ import pytest
import ly_test_tools.environment.file_system as file_system
from ly_test_tools.image.screenshot_compare_qssim import qssim as compare_screenshots
+from ly_test_tools.benchmark.data_aggregator import BenchmarkDataAggregator
import editor_python_test_tools.hydra_test_utils as hydra
logger = logging.getLogger(__name__)
@@ -83,3 +84,43 @@ class TestAllComponentsIndepthTests(object):
for test_screenshot, golden_screenshot in zip(test_screenshots, golden_images):
compare_screenshots(test_screenshot, golden_screenshot)
+
+@pytest.mark.parametrize('rhi', ['dx12', 'vulkan'])
+@pytest.mark.parametrize("project", ["AutomatedTesting"])
+@pytest.mark.parametrize("launcher_platform", ["windows_editor"])
+@pytest.mark.parametrize("level", ["AtomFeatureIntegrationBenchmark"])
+class TestPerformanceBenchmarkSuite(object):
+ def test_AtomFeatureIntegrationBenchmark(
+ self, request, editor, workspace, rhi, project, launcher_platform, level):
+ """
+ Please review the hydra script run by this test for more specific test info.
+ Tests the performance of the Simple level.
+ """
+ expected_lines = [
+ "Benchmark metadata captured.",
+ "Pass timestamps captured.",
+ "Capturing complete.",
+ "Captured data successfully."
+ ]
+
+ unexpected_lines = [
+ "Failed to capture data.",
+ "Failed to capture pass timestamps.",
+ "Failed to capture benchmark metadata."
+ ]
+
+ hydra.launch_and_validate_results(
+ request,
+ TEST_DIRECTORY,
+ editor,
+ "hydra_GPUTest_AtomFeatureIntegrationBenchmark.py",
+ timeout=EDITOR_TIMEOUT,
+ expected_lines=expected_lines,
+ unexpected_lines=unexpected_lines,
+ halt_on_unexpected=True,
+ cfg_args=[level],
+ null_renderer=False,
+ )
+
+ aggregator = BenchmarkDataAggregator(workspace, logger, 'periodic')
+ aggregator.upload_metrics(rhi)
diff --git a/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_MainSuite.py b/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_MainSuite.py
index ed5d057626..98d2ba0632 100644
--- a/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_MainSuite.py
+++ b/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_MainSuite.py
@@ -12,9 +12,10 @@ import os
import pytest
import editor_python_test_tools.hydra_test_utils as hydra
+from atom_renderer.atom_utils.atom_component_helper import LIGHT_TYPES
logger = logging.getLogger(__name__)
-EDITOR_TIMEOUT = 300
+EDITOR_TIMEOUT = 120
TEST_DIRECTORY = os.path.join(os.path.dirname(__file__), "atom_hydra_scripts")
@@ -180,3 +181,64 @@ class TestAtomEditorComponentsMain(object):
null_renderer=True,
cfg_args=cfg_args,
)
+
+ def test_AtomEditorComponents_LightComponent(
+ self, request, editor, workspace, project, launcher_platform, level):
+ """
+ Please review the hydra script run by this test for more specific test info.
+ Tests that the Light component has the expected property options available to it.
+ """
+ cfg_args = [level]
+
+ expected_lines = [
+ "light_entity Entity successfully created",
+ "Entity has a Light component",
+ "light_entity_test: Component added to the entity: True",
+ f"light_entity_test: Property value is {LIGHT_TYPES['sphere']} which matches {LIGHT_TYPES['sphere']}",
+ "Controller|Configuration|Shadows|Enable shadow set to True",
+ "light_entity Controller|Configuration|Shadows|Shadowmap size: SUCCESS",
+ "Controller|Configuration|Shadows|Shadow filter method set to 1", # PCF
+ "Controller|Configuration|Shadows|Filtering sample count set to 4",
+ "Controller|Configuration|Shadows|Filtering sample count set to 64",
+ "Controller|Configuration|Shadows|PCF method set to 0",
+ "Controller|Configuration|Shadows|PCF method set to 1",
+ "Controller|Configuration|Shadows|Shadow filter method set to 2", # ESM
+ "Controller|Configuration|Shadows|ESM exponent set to 50.0",
+ "Controller|Configuration|Shadows|ESM exponent set to 5000.0",
+ "Controller|Configuration|Shadows|Shadow filter method set to 3", # ESM+PCF
+ f"light_entity_test: Property value is {LIGHT_TYPES['spot_disk']} which matches {LIGHT_TYPES['spot_disk']}",
+ f"light_entity_test: Property value is {LIGHT_TYPES['capsule']} which matches {LIGHT_TYPES['capsule']}",
+ f"light_entity_test: Property value is {LIGHT_TYPES['quad']} which matches {LIGHT_TYPES['quad']}",
+ "light_entity Controller|Configuration|Fast approximation: SUCCESS",
+ "light_entity Controller|Configuration|Both directions: SUCCESS",
+ f"light_entity_test: Property value is {LIGHT_TYPES['polygon']} which matches {LIGHT_TYPES['polygon']}",
+ f"light_entity_test: Property value is {LIGHT_TYPES['simple_point']} "
+ f"which matches {LIGHT_TYPES['simple_point']}",
+ "Controller|Configuration|Attenuation radius|Mode set to 0",
+ "Controller|Configuration|Attenuation radius|Radius set to 100.0",
+ f"light_entity_test: Property value is {LIGHT_TYPES['simple_spot']} "
+ f"which matches {LIGHT_TYPES['simple_spot']}",
+ "Controller|Configuration|Shutters|Outer angle set to 45.0",
+ "Controller|Configuration|Shutters|Outer angle set to 90.0",
+ "light_entity_test: Component added to the entity: True",
+ "Light component test (non-GPU) completed.",
+ ]
+
+ unexpected_lines = [
+ "Trace::Assert",
+ "Trace::Error",
+ "Traceback (most recent call last):",
+ ]
+
+ hydra.launch_and_validate_results(
+ request,
+ TEST_DIRECTORY,
+ editor,
+ "hydra_AtomEditorComponents_LightComponent.py",
+ timeout=EDITOR_TIMEOUT,
+ expected_lines=expected_lines,
+ unexpected_lines=unexpected_lines,
+ halt_on_unexpected=True,
+ null_renderer=True,
+ cfg_args=cfg_args,
+ )
diff --git a/AutomatedTesting/Gem/PythonTests/physics/C15096740_Material_LibraryUpdatedCorrectly.py b/AutomatedTesting/Gem/PythonTests/physics/C15096740_Material_LibraryUpdatedCorrectly.py
index 060779082c..341597e36a 100755
--- a/AutomatedTesting/Gem/PythonTests/physics/C15096740_Material_LibraryUpdatedCorrectly.py
+++ b/AutomatedTesting/Gem/PythonTests/physics/C15096740_Material_LibraryUpdatedCorrectly.py
@@ -64,7 +64,8 @@ def C15096740_Material_LibraryUpdatedCorrectly():
# Constants
library_property_path = "Configuration|Physics Material|Library"
- default_material_path = "surfacetypemateriallibrary.physmaterial"
+
+ default_material_path = os.path.join("assets", "physics", "surfacetypemateriallibrary.physmaterial")
new_material_path = os.path.join("physicssurfaces", "default_phys_materials.physmaterial")
helper.init_idle()
@@ -82,7 +83,7 @@ def C15096740_Material_LibraryUpdatedCorrectly():
default_asset = Asset.find_asset_by_path(default_material_path)
test_component.set_component_property_value(library_property_path, default_asset.id)
default_asset.id = test_component.get_component_property_value(library_property_path)
- Report.result(Tests.override_default_library, default_asset.get_path() == default_material_path)
+ Report.result(Tests.override_default_library, default_asset.get_path() == default_material_path.replace(os.sep, '/'))
# 4) Switch it back again to the default material library.
test_component.set_component_property_value(library_property_path, azasset.AssetId())
diff --git a/AutomatedTesting/Gem/PythonTests/physics/Physmaterial_Editor.py b/AutomatedTesting/Gem/PythonTests/physics/Physmaterial_Editor.py
index 54ea3c7f15..cff8ae8377 100755
--- a/AutomatedTesting/Gem/PythonTests/physics/Physmaterial_Editor.py
+++ b/AutomatedTesting/Gem/PythonTests/physics/Physmaterial_Editor.py
@@ -133,7 +133,7 @@ class Physmaterial_Editor:
def _set_path(self):
# type: (str) -> str
if self.document_filename == None:
- self.document_filename = os.path.join(self.project_folder, "surfacetypemateriallibrary.physmaterial")
+ self.document_filename = os.path.join(self.project_folder, "assets", "physics", "surfacetypemateriallibrary.physmaterial")
else:
for (root, directories, root_files) in os.walk(self.project_folder):
for root_file in root_files:
diff --git a/AutomatedTesting/Levels/AtomFeatureIntegrationBenchmark/AtomFeatureIntegrationBenchmark.ly b/AutomatedTesting/Levels/AtomFeatureIntegrationBenchmark/AtomFeatureIntegrationBenchmark.ly
new file mode 100644
index 0000000000..4fc96f242b
--- /dev/null
+++ b/AutomatedTesting/Levels/AtomFeatureIntegrationBenchmark/AtomFeatureIntegrationBenchmark.ly
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5232563c3ff322669808ac4daeda3d822e4ef8c9c87db0fa245f0f9c9c34aada
+size 23379
diff --git a/AutomatedTesting/Levels/AtomFeatureIntegrationBenchmark/filelist.xml b/AutomatedTesting/Levels/AtomFeatureIntegrationBenchmark/filelist.xml
new file mode 100644
index 0000000000..15b79f5e4f
--- /dev/null
+++ b/AutomatedTesting/Levels/AtomFeatureIntegrationBenchmark/filelist.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/AutomatedTesting/Levels/AtomFeatureIntegrationBenchmark/level.pak b/AutomatedTesting/Levels/AtomFeatureIntegrationBenchmark/level.pak
new file mode 100644
index 0000000000..fecbc0b394
--- /dev/null
+++ b/AutomatedTesting/Levels/AtomFeatureIntegrationBenchmark/level.pak
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e075be2cb7cf5aa98e3503c1119b94c3098b35500c98c4db32d025c9e1afa52d
+size 5450
diff --git a/AutomatedTesting/Levels/AtomFeatureIntegrationBenchmark/tags.txt b/AutomatedTesting/Levels/AtomFeatureIntegrationBenchmark/tags.txt
new file mode 100644
index 0000000000..a5e0705349
--- /dev/null
+++ b/AutomatedTesting/Levels/AtomFeatureIntegrationBenchmark/tags.txt
@@ -0,0 +1,12 @@
+495.045,510.96,35.8437,-0.166,0,-1.82124
+4.79827,4.71364,64.7838,-1.41886,0,2.48964
+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/Passes/MainPipeline.pass b/AutomatedTesting/Passes/MainPipeline.pass
new file mode 100644
index 0000000000..aa9f3757c4
--- /dev/null
+++ b/AutomatedTesting/Passes/MainPipeline.pass
@@ -0,0 +1,483 @@
+{
+ "Type": "JsonSerialization",
+ "Version": 1,
+ "ClassName": "PassAsset",
+ "ClassData": {
+ "PassTemplate": {
+ "Name": "MainPipeline",
+ "PassClass": "ParentPass",
+ "Slots": [
+ {
+ "Name": "SwapChainOutput",
+ "SlotType": "InputOutput",
+ "ScopeAttachmentUsage": "RenderTarget"
+ }
+ ],
+ "PassRequests": [
+ {
+ "Name": "MorphTargetPass",
+ "TemplateName": "MorphTargetPassTemplate"
+ },
+ {
+ "Name": "SkinningPass",
+ "TemplateName": "SkinningPassTemplate",
+ "Connections": [
+ {
+ "LocalSlot": "SkinnedMeshOutputStream",
+ "AttachmentRef": {
+ "Pass": "MorphTargetPass",
+ "Attachment": "MorphTargetDeltaOutput"
+ }
+ }
+ ]
+ },
+ {
+ "Name": "RayTracingAccelerationStructurePass",
+ "TemplateName": "RayTracingAccelerationStructurePassTemplate"
+ },
+ {
+ "Name": "DiffuseProbeGridUpdatePass",
+ "TemplateName": "DiffuseProbeGridUpdatePassTemplate",
+ "ExecuteAfter": [
+ "RayTracingAccelerationStructurePass"
+ ]
+ },
+ {
+ "Name": "DepthPrePass",
+ "TemplateName": "DepthMSAAParentTemplate",
+ "Connections": [
+ {
+ "LocalSlot": "SkinnedMeshes",
+ "AttachmentRef": {
+ "Pass": "SkinningPass",
+ "Attachment": "SkinnedMeshOutputStream"
+ }
+ },
+ {
+ "LocalSlot": "SwapChainOutput",
+ "AttachmentRef": {
+ "Pass": "Parent",
+ "Attachment": "SwapChainOutput"
+ }
+ }
+ ]
+ },
+ {
+ "Name": "MotionVectorPass",
+ "TemplateName": "MotionVectorParentTemplate",
+ "Connections": [
+ {
+ "LocalSlot": "SkinnedMeshes",
+ "AttachmentRef": {
+ "Pass": "SkinningPass",
+ "Attachment": "SkinnedMeshOutputStream"
+ }
+ },
+ {
+ "LocalSlot": "Depth",
+ "AttachmentRef": {
+ "Pass": "DepthPrePass",
+ "Attachment": "Depth"
+ }
+ },
+ {
+ "LocalSlot": "SwapChainOutput",
+ "AttachmentRef": {
+ "Pass": "Parent",
+ "Attachment": "SwapChainOutput"
+ }
+ }
+ ]
+ },
+ {
+ "Name": "LightCullingPass",
+ "TemplateName": "LightCullingParentTemplate",
+ "Connections": [
+ {
+ "LocalSlot": "SkinnedMeshes",
+ "AttachmentRef": {
+ "Pass": "SkinningPass",
+ "Attachment": "SkinnedMeshOutputStream"
+ }
+ },
+ {
+ "LocalSlot": "DepthMSAA",
+ "AttachmentRef": {
+ "Pass": "DepthPrePass",
+ "Attachment": "DepthMSAA"
+ }
+ },
+ {
+ "LocalSlot": "SwapChainOutput",
+ "AttachmentRef": {
+ "Pass": "Parent",
+ "Attachment": "SwapChainOutput"
+ }
+ }
+ ]
+ },
+ {
+ "Name": "ShadowPass",
+ "TemplateName": "ShadowParentTemplate",
+ "Connections": [
+ {
+ "LocalSlot": "SkinnedMeshes",
+ "AttachmentRef": {
+ "Pass": "SkinningPass",
+ "Attachment": "SkinnedMeshOutputStream"
+ }
+ },
+ {
+ "LocalSlot": "SwapChainOutput",
+ "AttachmentRef": {
+ "Pass": "Parent",
+ "Attachment": "SwapChainOutput"
+ }
+ }
+ ]
+ },
+ {
+ "Name": "OpaquePass",
+ "TemplateName": "OpaqueParentTemplate",
+ "Connections": [
+ {
+ "LocalSlot": "DirectionalShadowmap",
+ "AttachmentRef": {
+ "Pass": "ShadowPass",
+ "Attachment": "DirectionalShadowmap"
+ }
+ },
+ {
+ "LocalSlot": "DirectionalESM",
+ "AttachmentRef": {
+ "Pass": "ShadowPass",
+ "Attachment": "DirectionalESM"
+ }
+ },
+ {
+ "LocalSlot": "ProjectedShadowmap",
+ "AttachmentRef": {
+ "Pass": "ShadowPass",
+ "Attachment": "ProjectedShadowmap"
+ }
+ },
+ {
+ "LocalSlot": "ProjectedESM",
+ "AttachmentRef": {
+ "Pass": "ShadowPass",
+ "Attachment": "ProjectedESM"
+ }
+ },
+ {
+ "LocalSlot": "TileLightData",
+ "AttachmentRef": {
+ "Pass": "LightCullingPass",
+ "Attachment": "TileLightData"
+ }
+ },
+ {
+ "LocalSlot": "LightListRemapped",
+ "AttachmentRef": {
+ "Pass": "LightCullingPass",
+ "Attachment": "LightListRemapped"
+ }
+ },
+ {
+ "LocalSlot": "DepthLinear",
+ "AttachmentRef": {
+ "Pass": "DepthPrePass",
+ "Attachment": "DepthLinear"
+ }
+ },
+ {
+ "LocalSlot": "DepthStencil",
+ "AttachmentRef": {
+ "Pass": "DepthPrePass",
+ "Attachment": "DepthMSAA"
+ }
+ },
+ {
+ "LocalSlot": "SwapChainOutput",
+ "AttachmentRef": {
+ "Pass": "Parent",
+ "Attachment": "SwapChainOutput"
+ }
+ }
+ ]
+ },
+ {
+ "Name": "TransparentPass",
+ "TemplateName": "TransparentParentTemplate",
+ "Connections": [
+ {
+ "LocalSlot": "DirectionalShadowmap",
+ "AttachmentRef": {
+ "Pass": "ShadowPass",
+ "Attachment": "DirectionalShadowmap"
+ }
+ },
+ {
+ "LocalSlot": "DirectionalESM",
+ "AttachmentRef": {
+ "Pass": "ShadowPass",
+ "Attachment": "DirectionalESM"
+ }
+ },
+ {
+ "LocalSlot": "ProjectedShadowmap",
+ "AttachmentRef": {
+ "Pass": "ShadowPass",
+ "Attachment": "ProjectedShadowmap"
+ }
+ },
+ {
+ "LocalSlot": "ProjectedESM",
+ "AttachmentRef": {
+ "Pass": "ShadowPass",
+ "Attachment": "ProjectedESM"
+ }
+ },
+ {
+ "LocalSlot": "TileLightData",
+ "AttachmentRef": {
+ "Pass": "LightCullingPass",
+ "Attachment": "TileLightData"
+ }
+ },
+ {
+ "LocalSlot": "LightListRemapped",
+ "AttachmentRef": {
+ "Pass": "LightCullingPass",
+ "Attachment": "LightListRemapped"
+ }
+ },
+ {
+ "LocalSlot": "InputLinearDepth",
+ "AttachmentRef": {
+ "Pass": "DepthPrePass",
+ "Attachment": "DepthLinear"
+ }
+ },
+ {
+ "LocalSlot": "DepthStencil",
+ "AttachmentRef": {
+ "Pass": "DepthPrePass",
+ "Attachment": "Depth"
+ }
+ },
+ {
+ "LocalSlot": "InputOutput",
+ "AttachmentRef": {
+ "Pass": "OpaquePass",
+ "Attachment": "Output"
+ }
+ }
+ ]
+ },
+ {
+ "Name": "DeferredFogPass",
+ "TemplateName": "DeferredFogPassTemplate",
+ "Enabled": false,
+ "Connections": [
+ {
+ "LocalSlot": "InputLinearDepth",
+ "AttachmentRef": {
+ "Pass": "DepthPrePass",
+ "Attachment": "DepthLinear"
+ }
+ },
+ {
+ "LocalSlot": "InputDepthStencil",
+ "AttachmentRef": {
+ "Pass": "DepthPrePass",
+ "Attachment": "Depth"
+ }
+ },
+ {
+ "LocalSlot": "RenderTargetInputOutput",
+ "AttachmentRef": {
+ "Pass": "TransparentPass",
+ "Attachment": "InputOutput"
+ }
+ }
+ ],
+ "PassData": {
+ "$type": "FullscreenTrianglePassData",
+ "ShaderAsset": {
+ "FilePath": "Shaders/ScreenSpace/DeferredFog.shader"
+ },
+ "PipelineViewTag": "MainCamera"
+ }
+ },
+ {
+ "Name": "ReflectionCopyFrameBufferPass",
+ "TemplateName": "ReflectionCopyFrameBufferPassTemplate",
+ "Enabled": false,
+ "Connections": [
+ {
+ "LocalSlot": "Input",
+ "AttachmentRef": {
+ "Pass": "DeferredFogPass",
+ "Attachment": "RenderTargetInputOutput"
+ }
+ }
+ ]
+ },
+ {
+ "Name": "PostProcessPass",
+ "TemplateName": "PostProcessParentTemplate",
+ "Connections": [
+ {
+ "LocalSlot": "LightingInput",
+ "AttachmentRef": {
+ "Pass": "DeferredFogPass",
+ "Attachment": "RenderTargetInputOutput"
+ }
+ },
+ {
+ "LocalSlot": "Depth",
+ "AttachmentRef": {
+ "Pass": "DepthPrePass",
+ "Attachment": "Depth"
+ }
+ },
+ {
+ "LocalSlot": "MotionVectors",
+ "AttachmentRef": {
+ "Pass": "MotionVectorPass",
+ "Attachment": "MotionVectorOutput"
+ }
+ },
+ {
+ "LocalSlot": "SwapChainOutput",
+ "AttachmentRef": {
+ "Pass": "Parent",
+ "Attachment": "SwapChainOutput"
+ }
+ }
+ ]
+ },
+ {
+ "Name": "AuxGeomPass",
+ "TemplateName": "AuxGeomPassTemplate",
+ "Enabled": true,
+ "Connections": [
+ {
+ "LocalSlot": "ColorInputOutput",
+ "AttachmentRef": {
+ "Pass": "PostProcessPass",
+ "Attachment": "Output"
+ }
+ },
+ {
+ "LocalSlot": "DepthInputOutput",
+ "AttachmentRef": {
+ "Pass": "DepthPrePass",
+ "Attachment": "Depth"
+ }
+ }
+ ],
+ "PassData": {
+ "$type": "RasterPassData",
+ "DrawListTag": "auxgeom",
+ "PipelineViewTag": "MainCamera"
+ }
+ },
+ {
+ "Name": "DebugOverlayPass",
+ "TemplateName": "DebugOverlayParentTemplate",
+ "Connections": [
+ {
+ "LocalSlot": "TileLightData",
+ "AttachmentRef": {
+ "Pass": "LightCullingPass",
+ "Attachment": "TileLightData"
+ }
+ },
+ {
+ "LocalSlot": "RawLightingInput",
+ "AttachmentRef": {
+ "Pass": "PostProcessPass",
+ "Attachment": "RawLightingOutput"
+ }
+ },
+ {
+ "LocalSlot": "LuminanceMipChainInput",
+ "AttachmentRef": {
+ "Pass": "PostProcessPass",
+ "Attachment": "LuminanceMipChainOutput"
+ }
+ },
+ {
+ "LocalSlot": "InputOutput",
+ "AttachmentRef": {
+ "Pass": "AuxGeomPass",
+ "Attachment": "ColorInputOutput"
+ }
+ }
+ ]
+ },
+ {
+ "Name": "LyShinePass",
+ "TemplateName": "LyShineParentTemplate",
+ "Connections": [
+ {
+ "LocalSlot": "ColorInputOutput",
+ "AttachmentRef": {
+ "Pass": "DebugOverlayPass",
+ "Attachment": "InputOutput"
+ }
+ },
+ {
+ "LocalSlot": "DepthInputOutput",
+ "AttachmentRef": {
+ "Pass": "DepthPrePass",
+ "Attachment": "Depth"
+ }
+ }
+ ]
+ },
+ {
+ "Name": "UIPass",
+ "TemplateName": "UIParentTemplate",
+ "Connections": [
+ {
+ "LocalSlot": "InputOutput",
+ "AttachmentRef": {
+ "Pass": "LyShinePass",
+ "Attachment": "ColorInputOutput"
+ }
+ },
+ {
+ "LocalSlot": "DepthInputOutput",
+ "AttachmentRef": {
+ "Pass": "DepthPrePass",
+ "Attachment": "Depth"
+ }
+ }
+ ]
+ },
+ {
+ "Name": "CopyToSwapChain",
+ "TemplateName": "FullscreenCopyTemplate",
+ "Connections": [
+ {
+ "LocalSlot": "Input",
+ "AttachmentRef": {
+ "Pass": "UIPass",
+ "Attachment": "InputOutput"
+ }
+ },
+ {
+ "LocalSlot": "Output",
+ "AttachmentRef": {
+ "Pass": "Parent",
+ "Attachment": "SwapChainOutput"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/AutomatedTesting/Registry/C3510644_Collider_CollisionGroups.setreg_override b/AutomatedTesting/Registry/C3510644_Collider_CollisionGroups.setreg_override
index 9fa5e26768..e4ea71f652 100644
--- a/AutomatedTesting/Registry/C3510644_Collider_CollisionGroups.setreg_override
+++ b/AutomatedTesting/Registry/C3510644_Collider_CollisionGroups.setreg_override
@@ -121,9 +121,10 @@
},
"MaterialLibrary": {
"assetId": {
- "guid": "{3A055A3F-8CB7-5FEE-B437-EB365FACD0D4}"
+ "guid": "{62446378-67F8-5E49-AC31-761DD5942695}"
},
- "assetHint": "surfacetypemateriallibrary.physmaterial"
+ "loadBehavior": "QueueLoad",
+ "assetHint": "assets/physics/surfacetypemateriallibrary.physmaterial"
}
}
}
diff --git a/AutomatedTesting/Registry/C4976227_Collider_NewGroup.setreg_override b/AutomatedTesting/Registry/C4976227_Collider_NewGroup.setreg_override
index afbe6a9d38..e53d3893f8 100644
--- a/AutomatedTesting/Registry/C4976227_Collider_NewGroup.setreg_override
+++ b/AutomatedTesting/Registry/C4976227_Collider_NewGroup.setreg_override
@@ -109,9 +109,10 @@
},
"MaterialLibrary": {
"assetId": {
- "guid": "{3A055A3F-8CB7-5FEE-B437-EB365FACD0D4}"
+ "guid": "{62446378-67F8-5E49-AC31-761DD5942695}"
},
- "assetHint": "surfacetypemateriallibrary.physmaterial"
+ "loadBehavior": "QueueLoad",
+ "assetHint": "assets/physics/surfacetypemateriallibrary.physmaterial"
}
}
}
diff --git a/AutomatedTesting/Registry/C4976244_Collider_SameGroupSameLayerCollision.setreg_override b/AutomatedTesting/Registry/C4976244_Collider_SameGroupSameLayerCollision.setreg_override
index 9fa5e26768..e4ea71f652 100644
--- a/AutomatedTesting/Registry/C4976244_Collider_SameGroupSameLayerCollision.setreg_override
+++ b/AutomatedTesting/Registry/C4976244_Collider_SameGroupSameLayerCollision.setreg_override
@@ -121,9 +121,10 @@
},
"MaterialLibrary": {
"assetId": {
- "guid": "{3A055A3F-8CB7-5FEE-B437-EB365FACD0D4}"
+ "guid": "{62446378-67F8-5E49-AC31-761DD5942695}"
},
- "assetHint": "surfacetypemateriallibrary.physmaterial"
+ "loadBehavior": "QueueLoad",
+ "assetHint": "assets/physics/surfacetypemateriallibrary.physmaterial"
}
}
}
diff --git a/AutomatedTesting/Registry/C4976245_PhysXCollider_CollisionLayerTest.setreg_override b/AutomatedTesting/Registry/C4976245_PhysXCollider_CollisionLayerTest.setreg_override
index 9fa5e26768..e4ea71f652 100644
--- a/AutomatedTesting/Registry/C4976245_PhysXCollider_CollisionLayerTest.setreg_override
+++ b/AutomatedTesting/Registry/C4976245_PhysXCollider_CollisionLayerTest.setreg_override
@@ -121,9 +121,10 @@
},
"MaterialLibrary": {
"assetId": {
- "guid": "{3A055A3F-8CB7-5FEE-B437-EB365FACD0D4}"
+ "guid": "{62446378-67F8-5E49-AC31-761DD5942695}"
},
- "assetHint": "surfacetypemateriallibrary.physmaterial"
+ "loadBehavior": "QueueLoad",
+ "assetHint": "assets/physics/surfacetypemateriallibrary.physmaterial"
}
}
}
diff --git a/AutomatedTesting/Registry/C4982593_PhysXCollider_CollisionLayer.setreg_override b/AutomatedTesting/Registry/C4982593_PhysXCollider_CollisionLayer.setreg_override
index 9fa5e26768..e4ea71f652 100644
--- a/AutomatedTesting/Registry/C4982593_PhysXCollider_CollisionLayer.setreg_override
+++ b/AutomatedTesting/Registry/C4982593_PhysXCollider_CollisionLayer.setreg_override
@@ -121,9 +121,10 @@
},
"MaterialLibrary": {
"assetId": {
- "guid": "{3A055A3F-8CB7-5FEE-B437-EB365FACD0D4}"
+ "guid": "{62446378-67F8-5E49-AC31-761DD5942695}"
},
- "assetHint": "surfacetypemateriallibrary.physmaterial"
+ "loadBehavior": "QueueLoad",
+ "assetHint": "assets/physics/surfacetypemateriallibrary.physmaterial"
}
}
}
diff --git a/AutomatedTesting/Registry/physxsystemconfiguration.setreg b/AutomatedTesting/Registry/physxsystemconfiguration.setreg
index 02f65b685b..83aad307a6 100644
--- a/AutomatedTesting/Registry/physxsystemconfiguration.setreg
+++ b/AutomatedTesting/Registry/physxsystemconfiguration.setreg
@@ -103,9 +103,10 @@
},
"MaterialLibrary": {
"assetId": {
- "guid": "{3A055A3F-8CB7-5FEE-B437-EB365FACD0D4}"
+ "guid": "{62446378-67F8-5E49-AC31-761DD5942695}"
},
- "assetHint": "surfacetypemateriallibrary.physmaterial"
+ "loadBehavior": "QueueLoad",
+ "assetHint": "assets/physics/surfacetypemateriallibrary.physmaterial"
}
}
}
diff --git a/Code/Editor/CMakeLists.txt b/Code/Editor/CMakeLists.txt
index fe694f165a..fca16a2093 100644
--- a/Code/Editor/CMakeLists.txt
+++ b/Code/Editor/CMakeLists.txt
@@ -163,6 +163,8 @@ ly_add_target(
editor_files.cmake
PLATFORM_INCLUDE_FILES
Platform/${PAL_PLATFORM_NAME}/editor_${PAL_PLATFORM_NAME_LOWERCASE}.cmake
+ TARGET_PROPERTIES
+ LY_INSTALL_GENERATE_RUN_TARGET TRUE
BUILD_DEPENDENCIES
PRIVATE
3rdParty::Qt::Core
diff --git a/Code/Editor/Controls/ConsoleSCB.cpp b/Code/Editor/Controls/ConsoleSCB.cpp
index 9f1921395c..1bc00fdc3f 100644
--- a/Code/Editor/Controls/ConsoleSCB.cpp
+++ b/Code/Editor/Controls/ConsoleSCB.cpp
@@ -338,6 +338,8 @@ CConsoleSCB::CConsoleSCB(QWidget* parent)
connect(findPreviousAction, &QAction::triggered, this, &CConsoleSCB::findPrevious);
ui->findPrevButton->addAction(findPreviousAction);
+ GetIEditor()->RegisterNotifyListener(this);
+
connect(ui->button, &QPushButton::clicked, this, &CConsoleSCB::showVariableEditor);
connect(ui->findButton, &QPushButton::clicked, this, &CConsoleSCB::toggleConsoleSearch);
connect(ui->textEdit, &ConsoleTextEdit::searchBarRequested, this, [this]
@@ -376,6 +378,8 @@ CConsoleSCB::~CConsoleSCB()
{
AzToolsFramework::EditorPreferencesNotificationBus::Handler::BusDisconnect();
+ GetIEditor()->UnregisterNotifyListener(this);
+
s_consoleSCB = nullptr;
CLogFile::AttachEditBox(nullptr);
}
@@ -1352,4 +1356,19 @@ CConsoleSCB* CConsoleSCB::GetCreatedInstance()
return s_consoleSCB;
}
+void CConsoleSCB::OnEditorNotifyEvent(EEditorNotifyEvent event)
+{
+ switch (event)
+ {
+ case eNotify_OnBeginGameMode:
+ if (gSettings.clearConsoleOnGameModeStart)
+ {
+ ui->textEdit->clear();
+ }
+ break;
+ default:
+ break;
+ }
+}
+
#include
diff --git a/Code/Editor/Controls/ConsoleSCB.h b/Code/Editor/Controls/ConsoleSCB.h
index 98bf4b391d..f51786e2a5 100644
--- a/Code/Editor/Controls/ConsoleSCB.h
+++ b/Code/Editor/Controls/ConsoleSCB.h
@@ -159,6 +159,7 @@ private:
class CConsoleSCB
: public QWidget
, private AzToolsFramework::EditorPreferencesNotificationBus::Handler
+ , public IEditorNotifyListener
{
Q_OBJECT
public:
@@ -187,6 +188,8 @@ private Q_SLOTS:
void findNext();
private:
+ void OnEditorNotifyEvent(EEditorNotifyEvent event) override;
+
QScopedPointer ui;
int m_richEditTextLength;
diff --git a/Code/Editor/Core/LevelEditorMenuHandler.cpp b/Code/Editor/Core/LevelEditorMenuHandler.cpp
index 3c27c25c9a..70ff51c3d6 100644
--- a/Code/Editor/Core/LevelEditorMenuHandler.cpp
+++ b/Code/Editor/Core/LevelEditorMenuHandler.cpp
@@ -544,12 +544,12 @@ void LevelEditorMenuHandler::PopulateEditMenu(ActionManager::MenuWrapper& editMe
auto snapMenu = modifyMenu.AddMenu(tr("Snap"));
- snapMenu.AddAction(ID_SNAPANGLE);
+ snapMenu.AddAction(AzToolsFramework::SnapAngle);
auto transformModeMenu = modifyMenu.AddMenu(tr("Transform Mode"));
- transformModeMenu.AddAction(ID_EDITMODE_MOVE);
- transformModeMenu.AddAction(ID_EDITMODE_ROTATE);
- transformModeMenu.AddAction(ID_EDITMODE_SCALE);
+ transformModeMenu.AddAction(AzToolsFramework::EditModeMove);
+ transformModeMenu.AddAction(AzToolsFramework::EditModeRotate);
+ transformModeMenu.AddAction(AzToolsFramework::EditModeScale);
editMenu.AddSeparator();
diff --git a/Code/Editor/Core/QtEditorApplication.cpp b/Code/Editor/Core/QtEditorApplication.cpp
index 46e789cd7c..5a4763d8e8 100644
--- a/Code/Editor/Core/QtEditorApplication.cpp
+++ b/Code/Editor/Core/QtEditorApplication.cpp
@@ -415,33 +415,37 @@ namespace Editor
}
// Ensure that the Windows WM_INPUT messages get passed through to the AzFramework input system.
- // These events are now consumed both in and out of game mode.
- if (msg->message == WM_INPUT)
+ // These events are only broadcast in game mode. In Editor mode, RenderViewportWidget creates synthetic
+ // keyboard and mouse events via Qt.
+ if (GetIEditor()->IsInGameMode())
{
- UINT rawInputSize;
- const UINT rawInputHeaderSize = sizeof(RAWINPUTHEADER);
- GetRawInputData((HRAWINPUT)msg->lParam, RID_INPUT, NULL, &rawInputSize, rawInputHeaderSize);
-
- AZStd::array rawInputBytesArray;
- LPBYTE rawInputBytes = rawInputBytesArray.data();
-
- const UINT bytesCopied = GetRawInputData((HRAWINPUT)msg->lParam, RID_INPUT, rawInputBytes, &rawInputSize, rawInputHeaderSize);
- CRY_ASSERT(bytesCopied == rawInputSize);
-
- RAWINPUT* rawInput = (RAWINPUT*)rawInputBytes;
- CRY_ASSERT(rawInput);
-
- AzFramework::RawInputNotificationBusWindows::Broadcast(&AzFramework::RawInputNotificationsWindows::OnRawInputEvent, *rawInput);
-
- return false;
- }
- else if (msg->message == WM_DEVICECHANGE)
- {
- if (msg->wParam == 0x0007) // DBT_DEVNODES_CHANGED
+ if (msg->message == WM_INPUT)
{
- AzFramework::RawInputNotificationBusWindows::Broadcast(&AzFramework::RawInputNotificationsWindows::OnRawInputDeviceChangeEvent);
+ UINT rawInputSize;
+ const UINT rawInputHeaderSize = sizeof(RAWINPUTHEADER);
+ GetRawInputData((HRAWINPUT)msg->lParam, RID_INPUT, NULL, &rawInputSize, rawInputHeaderSize);
+
+ AZStd::array rawInputBytesArray;
+ LPBYTE rawInputBytes = rawInputBytesArray.data();
+
+ const UINT bytesCopied = GetRawInputData((HRAWINPUT)msg->lParam, RID_INPUT, rawInputBytes, &rawInputSize, rawInputHeaderSize);
+ CRY_ASSERT(bytesCopied == rawInputSize);
+
+ RAWINPUT* rawInput = (RAWINPUT*)rawInputBytes;
+ CRY_ASSERT(rawInput);
+
+ AzFramework::RawInputNotificationBusWindows::Broadcast(&AzFramework::RawInputNotificationsWindows::OnRawInputEvent, *rawInput);
+
+ return false;
+ }
+ else if (msg->message == WM_DEVICECHANGE)
+ {
+ if (msg->wParam == 0x0007) // DBT_DEVNODES_CHANGED
+ {
+ AzFramework::RawInputNotificationBusWindows::Broadcast(&AzFramework::RawInputNotificationsWindows::OnRawInputDeviceChangeEvent);
+ }
+ return true;
}
- return true;
}
return false;
diff --git a/Code/Editor/CryEdit.cpp b/Code/Editor/CryEdit.cpp
index 4bfc6a319d..efeb7cdd19 100644
--- a/Code/Editor/CryEdit.cpp
+++ b/Code/Editor/CryEdit.cpp
@@ -375,9 +375,6 @@ void CCryEditApp::RegisterActionHandlers()
});
ON_COMMAND(ID_MOVE_OBJECT, OnMoveObject)
ON_COMMAND(ID_RENAME_OBJ, OnRenameObj)
- ON_COMMAND(ID_EDITMODE_MOVE, OnEditmodeMove)
- ON_COMMAND(ID_EDITMODE_ROTATE, OnEditmodeRotate)
- ON_COMMAND(ID_EDITMODE_SCALE, OnEditmodeScale)
ON_COMMAND(ID_UNDO, OnUndo)
ON_COMMAND(ID_TOOLBAR_WIDGET_REDO, OnUndo) // Can't use the same ID, because for the menu we can't have a QWidgetAction, while for the toolbar we want one
ON_COMMAND(ID_IMPORT_ASSET, OnOpenAssetImporter)
@@ -2579,75 +2576,6 @@ void CCryEditApp::OnRenameObj()
{
}
-//////////////////////////////////////////////////////////////////////////
-void CCryEditApp::OnEditmodeMove()
-{
- using namespace AzToolsFramework;
- EditorTransformComponentSelectionRequestBus::Event(
- GetEntityContextId(),
- &EditorTransformComponentSelectionRequests::SetTransformMode,
- EditorTransformComponentSelectionRequests::Mode::Translation);
-}
-
-//////////////////////////////////////////////////////////////////////////
-void CCryEditApp::OnEditmodeRotate()
-{
- using namespace AzToolsFramework;
- EditorTransformComponentSelectionRequestBus::Event(
- GetEntityContextId(),
- &EditorTransformComponentSelectionRequests::SetTransformMode,
- EditorTransformComponentSelectionRequests::Mode::Rotation);
-}
-
-//////////////////////////////////////////////////////////////////////////
-void CCryEditApp::OnEditmodeScale()
-{
- using namespace AzToolsFramework;
- EditorTransformComponentSelectionRequestBus::Event(
- GetEntityContextId(),
- &EditorTransformComponentSelectionRequests::SetTransformMode,
- EditorTransformComponentSelectionRequests::Mode::Scale);
-}
-
-//////////////////////////////////////////////////////////////////////////
-void CCryEditApp::OnUpdateEditmodeMove(QAction* action)
-{
- Q_ASSERT(action->isCheckable());
-
- AzToolsFramework::EditorTransformComponentSelectionRequests::Mode mode;
- AzToolsFramework::EditorTransformComponentSelectionRequestBus::EventResult(
- mode, AzToolsFramework::GetEntityContextId(),
- &AzToolsFramework::EditorTransformComponentSelectionRequests::GetTransformMode);
-
- action->setChecked(mode == AzToolsFramework::EditorTransformComponentSelectionRequests::Mode::Translation);
-}
-
-//////////////////////////////////////////////////////////////////////////
-void CCryEditApp::OnUpdateEditmodeRotate(QAction* action)
-{
- Q_ASSERT(action->isCheckable());
-
- AzToolsFramework::EditorTransformComponentSelectionRequests::Mode mode;
- AzToolsFramework::EditorTransformComponentSelectionRequestBus::EventResult(
- mode, AzToolsFramework::GetEntityContextId(),
- &AzToolsFramework::EditorTransformComponentSelectionRequests::GetTransformMode);
-
- action->setChecked(mode == AzToolsFramework::EditorTransformComponentSelectionRequests::Mode::Rotation);
-}
-
-//////////////////////////////////////////////////////////////////////////
-void CCryEditApp::OnUpdateEditmodeScale(QAction* action)
-{
- Q_ASSERT(action->isCheckable());
-
- AzToolsFramework::EditorTransformComponentSelectionRequests::Mode mode;
- AzToolsFramework::EditorTransformComponentSelectionRequestBus::EventResult(
- mode, AzToolsFramework::GetEntityContextId(),
- &AzToolsFramework::EditorTransformComponentSelectionRequests::GetTransformMode);
-
- action->setChecked(mode == AzToolsFramework::EditorTransformComponentSelectionRequests::Mode::Scale);
-}
-
void CCryEditApp::OnViewSwitchToGame()
{
if (IsInPreviewMode())
@@ -2901,7 +2829,14 @@ void CCryEditApp::OpenProjectManager(const AZStd::string& screen)
{
// provide the current project path for in case we want to update the project
AZ::IO::FixedMaxPathString projectPath = AZ::Utils::GetProjectPath();
- const AZStd::string commandLineOptions = AZStd::string::format(" --screen %s --project-path %s", screen.c_str(), projectPath.c_str());
+#if !AZ_TRAIT_OS_PLATFORM_APPLE && !AZ_TRAIT_OS_USE_WINDOWS_FILE_PATHS
+ const char* argumentQuoteString = R"(")";
+#else
+ const char* argumentQuoteString = R"(\")";
+#endif
+ const AZStd::string commandLineOptions = AZStd::string::format(R"( --screen %s --project-path %s%s%s)",
+ screen.c_str(),
+ argumentQuoteString, projectPath.c_str(), argumentQuoteString);
bool launchSuccess = AzFramework::ProjectManager::LaunchProjectManager(commandLineOptions);
if (!launchSuccess)
{
diff --git a/Code/Editor/CryEdit.h b/Code/Editor/CryEdit.h
index af0fbb0971..9406b37ea2 100644
--- a/Code/Editor/CryEdit.h
+++ b/Code/Editor/CryEdit.h
@@ -208,12 +208,6 @@ public:
void DeleteSelectedEntities(bool includeDescendants);
void OnMoveObject();
void OnRenameObj();
- void OnEditmodeMove();
- void OnEditmodeRotate();
- void OnEditmodeScale();
- void OnUpdateEditmodeMove(QAction* action);
- void OnUpdateEditmodeRotate(QAction* action);
- void OnUpdateEditmodeScale(QAction* action);
void OnUndo();
void OnOpenAssetImporter();
void OnUpdateSelected(QAction* action);
diff --git a/Code/Editor/CryEditDoc.cpp b/Code/Editor/CryEditDoc.cpp
index 43f599b191..9421198de7 100644
--- a/Code/Editor/CryEditDoc.cpp
+++ b/Code/Editor/CryEditDoc.cpp
@@ -108,21 +108,12 @@ namespace Internal
// CCryEditDoc construction/destruction
CCryEditDoc::CCryEditDoc()
- : doc_validate_surface_types(0)
+ : doc_validate_surface_types(nullptr)
, m_modifiedModuleFlags(eModifiedNothing)
- // It assumes loaded levels have already been exported. Can be a big fat lie, though.
- // The right way would require us to save to the level folder the export status of the
- // level.
- , m_boLevelExported(true)
- , m_modified(false)
- , m_envProbeHeight(200.0f)
- , m_envProbeSliceRelativePath("EngineAssets/Slices/DefaultLevelSetup.slice")
{
////////////////////////////////////////////////////////////////////////
// Set member variables to initial values
////////////////////////////////////////////////////////////////////////
- m_bLoadFailed = false;
- m_waterColor = QColor(0, 0, 255);
m_fogTemplate = GetIEditor()->FindTemplate("Fog");
m_environmentTemplate = GetIEditor()->FindTemplate("Environment");
@@ -136,7 +127,6 @@ CCryEditDoc::CCryEditDoc()
m_environmentTemplate = XmlHelpers::CreateXmlNode("Environment");
}
- m_bDocumentReady = false;
GetIEditor()->SetDocument(this);
CLogFile::WriteLine("Document created");
RegisterConsoleVariables();
@@ -195,7 +185,7 @@ CCryEditDoc::DocumentEditingMode CCryEditDoc::GetEditMode() const
QString CCryEditDoc::GetActivePathName() const
{
- return DocumentEditingMode() == CCryEditDoc::DocumentEditingMode::SliceEdit ? GetSlicePathName() : GetLevelPathName();
+ return GetEditMode() == CCryEditDoc::DocumentEditingMode::SliceEdit ? GetSlicePathName() : GetLevelPathName();
}
QString CCryEditDoc::GetTitle() const
@@ -260,9 +250,9 @@ void CCryEditDoc::DeleteContents()
GetIEditor()->FlushUndo();
// Notify listeners.
- for (std::list::iterator it = m_listeners.begin(); it != m_listeners.end(); ++it)
+ for (IDocListener* listener : m_listeners)
{
- (*it)->OnCloseDocument();
+ listener->OnCloseDocument();
}
GetIEditor()->ResetViews();
@@ -458,7 +448,7 @@ void CCryEditDoc::Load(TDocMultiArchive& arrXmlAr, const QString& szFilename)
//////////////////////////////////////////////////////////////////////////
// Load water color.
//////////////////////////////////////////////////////////////////////////
- (*arrXmlAr[DMAS_GENERAL]).root->getAttr("WaterColor", m_waterColor);
+ (*arrXmlAr[DMAS_GENERAL]).root->getAttr("WaterColor", m_waterColor);
//////////////////////////////////////////////////////////////////////////
// Load View Settings
@@ -507,9 +497,9 @@ void CCryEditDoc::Load(TDocMultiArchive& arrXmlAr, const QString& szFilename)
CAutoLogTime logtime("Post Load");
// Notify listeners.
- for (std::list::iterator it = m_listeners.begin(); it != m_listeners.end(); ++it)
+ for (IDocListener* listener : m_listeners)
{
- (*it)->OnLoadDocument();
+ listener->OnLoadDocument();
}
}
@@ -708,7 +698,8 @@ bool CCryEditDoc::SaveModified()
return true;
}
- auto button = QMessageBox::question(AzToolsFramework::GetActiveWindow(), QString(), tr("Save changes to %1?").arg(GetTitle()), QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel);
+ auto button = QMessageBox::question(AzToolsFramework::GetActiveWindow(), QString(), tr("Save changes to %1?").arg(GetTitle()),
+ QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel);
switch (button)
{
case QMessageBox::Cancel:
@@ -933,8 +924,7 @@ bool CCryEditDoc::OnSaveDocument(const QString& lpszPathName)
}
TSaveDocContext context;
- if (shouldSaveLevel &&
- BeforeSaveDocument(lpszPathName, context))
+ if (shouldSaveLevel && BeforeSaveDocument(lpszPathName, context))
{
DoSaveDocument(lpszPathName, context);
saveSuccess = AfterSaveDocument(lpszPathName, context);
@@ -972,7 +962,7 @@ bool CCryEditDoc::BeforeSaveDocument(const QString& lpszPathName, TSaveDocContex
return TRUE;
}
-bool CCryEditDoc::HasLayerNameConflicts()
+bool CCryEditDoc::HasLayerNameConflicts() const
{
AZStd::vector editorEntities;
AzToolsFramework::EditorEntityContextRequestBus::Broadcast(
@@ -1004,43 +994,42 @@ bool CCryEditDoc::HasLayerNameConflicts()
bool CCryEditDoc::DoSaveDocument(const QString& filename, TSaveDocContext& context)
{
bool& bSaved = context.bSaved;
- if (bSaved)
+ if (!bSaved)
{
- // Paranoia - we shouldn't get this far into the save routine without a level loaded (empty levelPath)
- // If nothing is loaded, we don't need to save anything
- if (filename.isEmpty())
- {
- bSaved = false;
- }
- else
- {
- // Save Tag Point locations to file if auto save of tag points disabled
- if (!gSettings.bAutoSaveTagPoints)
- {
- CCryEditApp::instance()->SaveTagLocations();
- }
-
- QString normalizedPath = Path::ToUnixPath(filename);
- if (IsSliceFile(normalizedPath))
- {
- bSaved = SaveSlice(normalizedPath);
- }
- else
- {
- bSaved = SaveLevel(normalizedPath);
- }
-
- // Changes filename for this document.
- SetPathName(normalizedPath);
- }
+ return false;
+ }
+ // Paranoia - we shouldn't get this far into the save routine without a level loaded (empty levelPath)
+ // If nothing is loaded, we don't need to save anything
+ if (filename.isEmpty())
+ {
+ bSaved = false;
+ return false;
}
+ // Save Tag Point locations to file if auto save of tag points disabled
+ if (!gSettings.bAutoSaveTagPoints)
+ {
+ CCryEditApp::instance()->SaveTagLocations();
+ }
+
+ QString normalizedPath = Path::ToUnixPath(filename);
+ if (IsSliceFile(normalizedPath))
+ {
+ bSaved = SaveSlice(normalizedPath);
+ }
+ else
+ {
+ bSaved = SaveLevel(normalizedPath);
+ }
+
+ // Changes filename for this document.
+ SetPathName(normalizedPath);
return bSaved;
}
bool CCryEditDoc::AfterSaveDocument([[maybe_unused]] const QString& lpszPathName, TSaveDocContext& context, bool bShowPrompt)
{
- bool& bSaved = context.bSaved;
+ bool bSaved = context.bSaved;
GetIEditor()->Notify(eNotify_OnEndSceneSave);
@@ -1067,8 +1056,7 @@ bool CCryEditDoc::AfterSaveDocument([[maybe_unused]] const QString& lpszPathName
static void GetUserSettingsFile(const QString& levelFolder, QString& userSettings)
{
const char* pUserName = GetISystem()->GetUserName();
- QString fileName;
- fileName = QStringLiteral("%1_usersettings.editor_xml").arg(pUserName);
+ QString fileName = QStringLiteral("%1_usersettings.editor_xml").arg(pUserName);
userSettings = Path::Make(levelFolder, fileName);
}
@@ -1182,9 +1170,9 @@ bool CCryEditDoc::SaveLevel(const QString& filename)
}
QString oldFilePath = QDir(oldLevelFolder).absoluteFilePath(sourceName);
- QString newFilePath = QDir(newLevelFolder).absoluteFilePath(sourceName);
+ QString newFilePath = QDir(newLevelFolder).absoluteFilePath(destName);
CFileUtil::CopyFile(oldFilePath, newFilePath);
- } while (findHandle = pIPak->FindNext(findHandle));
+ } while ((findHandle = pIPak->FindNext(findHandle)));
pIPak->FindClose(findHandle);
}
@@ -1506,7 +1494,7 @@ bool CCryEditDoc::LoadEntitiesFromLevel(const QString& levelPakFile)
{
AZStd::vector fileBuffer;
fileBuffer.resize(entitiesFile.GetLength());
- if (fileBuffer.size() > 0)
+ if (!fileBuffer.empty())
{
if (fileBuffer.size() == entitiesFile.ReadRaw(fileBuffer.begin(), fileBuffer.size()))
{
@@ -1910,7 +1898,7 @@ void CCryEditDoc::UnregisterListener(IDocListener* listener)
m_listeners.remove(listener);
}
-void CCryEditDoc::LogLoadTime(int time)
+void CCryEditDoc::LogLoadTime(int time) const
{
QString appFilePath = QDir::toNativeSeparators(QCoreApplication::applicationFilePath());
QString exePath = Path::GetPath(appFilePath);
@@ -1922,21 +1910,18 @@ void CCryEditDoc::LogLoadTime(int time)
SetFileAttributes(filename.toUtf8().data(), FILE_ATTRIBUTE_ARCHIVE);
#endif
- FILE* file = nullptr;
- azfopen(&file, filename.toUtf8().data(), "at");
-
- if (file)
+ QFile file(filename);
+ if (!file.open(QFile::Append | QFile::Text))
{
- char version[50];
- GetIEditor()->GetFileVersion().ToShortString(version, AZ_ARRAY_SIZE(version));
-
- QString text;
-
- time = time / 1000;
- text = QStringLiteral("\n[%1] Level %2 loaded in %3 seconds").arg(version, level).arg(time);
- fwrite(text.toUtf8().data(), text.toUtf8().length(), 1, file);
- fclose(file);
+ return;
}
+
+ char version[50];
+ GetIEditor()->GetFileVersion().ToShortString(version, AZ_ARRAY_SIZE(version));
+
+ time = time / 1000;
+ QString text = QStringLiteral("\n[%1] Level %2 loaded in %3 seconds").arg(version, level).arg(time);
+ file.write(text.toUtf8());
}
void CCryEditDoc::SetDocumentReady(bool bReady)
@@ -1944,7 +1929,7 @@ void CCryEditDoc::SetDocumentReady(bool bReady)
m_bDocumentReady = bReady;
}
-void CCryEditDoc::GetMemoryUsage(ICrySizer* pSizer)
+void CCryEditDoc::GetMemoryUsage(ICrySizer* pSizer) const
{
{
SIZER_COMPONENT_NAME(pSizer, "UndoManager(estimate)");
@@ -2068,12 +2053,9 @@ void CCryEditDoc::InitEmptyLevel(int /*resolution*/, int /*unitSize*/, bool /*bU
{
// Notify listeners.
std::list listeners = m_listeners;
- std::list::iterator it, next;
- for (it = listeners.begin(); it != listeners.end(); it = next)
+ for (IDocListener* listener : listeners)
{
- next = it;
- next++;
- (*it)->OnNewDocument();
+ listener->OnNewDocument();
}
}
@@ -2134,25 +2116,23 @@ void CCryEditDoc::OnEnvironmentPropertyChanged(IVariable* pVar)
{
return;
}
+ QString childValue;
if (pVar->GetDataType() == IVariable::DT_COLOR)
{
Vec3 value;
pVar->Get(value);
- QString buff;
QColor gammaColor = ColorLinearToGamma(ColorF(value.x, value.y, value.z));
- buff = QStringLiteral("%1,%2,%3").arg(gammaColor.red()).arg(gammaColor.green()).arg(gammaColor.blue());
- childNode->setAttr("value", buff.toUtf8().data());
+ childValue = QStringLiteral("%1,%2,%3").arg(gammaColor.red()).arg(gammaColor.green()).arg(gammaColor.blue());
}
else
{
- QString value;
- pVar->Get(value);
- childNode->setAttr("value", value.toUtf8().data());
+ pVar->Get(childValue);
}
+ childNode->setAttr("value", childValue.toUtf8().data());
}
-QString CCryEditDoc::GetCryIndexPath(const LPCTSTR levelFilePath)
+QString CCryEditDoc::GetCryIndexPath(const LPCTSTR levelFilePath) const
{
QString levelPath = Path::GetPath(levelFilePath);
QString levelName = Path::GetFileName(levelFilePath);
@@ -2183,8 +2163,7 @@ BOOL CCryEditDoc::LoadXmlArchiveArray(TDocMultiArchive& arrXmlAr, const QString&
}
CPakFile pakFile;
- bool loadFromPakSuccess;
- loadFromPakSuccess = xmlAr.LoadFromPak(levelPath, pakFile);
+ bool loadFromPakSuccess = xmlAr.LoadFromPak(levelPath, pakFile);
pIPak->ClosePack(absoluteLevelPath.toUtf8().data());
if (!loadFromPakSuccess)
{
diff --git a/Code/Editor/CryEditDoc.h b/Code/Editor/CryEditDoc.h
index 574f8eb7da..d32e8e5bb1 100644
--- a/Code/Editor/CryEditDoc.h
+++ b/Code/Editor/CryEditDoc.h
@@ -91,7 +91,7 @@ public: // Create from serialization only
// ClassWizard generated virtual function overrides
virtual bool OnOpenDocument(const QString& lpszPathName);
- const bool IsLevelLoadFailed() const { return m_bLoadFailed; }
+ bool IsLevelLoadFailed() const { return m_bLoadFailed; }
//! Marks this document as having errors.
void SetHasErrors() { m_hasErrors = true; }
@@ -121,7 +121,7 @@ public: // Create from serialization only
CClouds* GetClouds() { return m_pClouds; }
void SetWaterColor(const QColor& col) { m_waterColor = col; }
- QColor GetWaterColor() { return m_waterColor; }
+ QColor GetWaterColor() const { return m_waterColor; }
XmlNodeRef& GetFogTemplate() { return m_fogTemplate; }
XmlNodeRef& GetEnvironmentTemplate() { return m_environmentTemplate; }
void OnEnvironmentPropertyChanged(IVariable* pVar);
@@ -129,7 +129,7 @@ public: // Create from serialization only
void RegisterListener(IDocListener* listener);
void UnregisterListener(IDocListener* listener);
- void GetMemoryUsage(ICrySizer* pSizer);
+ void GetMemoryUsage(ICrySizer* pSizer) const;
static bool IsBackupOrTempLevelSubdirectory(const QString& folderName);
protected:
@@ -161,14 +161,14 @@ protected:
void SerializeFogSettings(CXmlArchive& xmlAr);
virtual void SerializeViewSettings(CXmlArchive& xmlAr);
void SerializeNameSelection(CXmlArchive& xmlAr);
- void LogLoadTime(int time);
+ void LogLoadTime(int time) const;
struct TSaveDocContext
{
bool bSaved;
};
bool BeforeSaveDocument(const QString& lpszPathName, TSaveDocContext& context);
- bool HasLayerNameConflicts();
+ bool HasLayerNameConflicts() const;
bool DoSaveDocument(const QString& lpszPathName, TSaveDocContext& context);
bool AfterSaveDocument(const QString& lpszPathName, TSaveDocContext& context, bool bShowPrompt = true);
@@ -180,7 +180,7 @@ protected:
void OnStartLevelResourceList();
static void OnValidateSurfaceTypesChanged(ICVar*);
- QString GetCryIndexPath(const LPCTSTR levelFilePath);
+ QString GetCryIndexPath(const LPCTSTR levelFilePath) const;
//////////////////////////////////////////////////////////////////////////
// SliceEditorEntityOwnershipServiceNotificationBus::Handler
@@ -188,24 +188,26 @@ protected:
void OnSliceInstantiationFailed(const AZ::Data::AssetId& sliceAssetId, const AzFramework::SliceInstantiationTicket& /*ticket*/) override;
//////////////////////////////////////////////////////////////////////////
- bool m_bLoadFailed;
- QColor m_waterColor;
+ bool m_bLoadFailed = false;
+ QColor m_waterColor = QColor(0, 0, 255);
XmlNodeRef m_fogTemplate;
XmlNodeRef m_environmentTemplate;
CClouds* m_pClouds;
std::list m_listeners;
- bool m_bDocumentReady;
- ICVar* doc_validate_surface_types;
+ bool m_bDocumentReady = false;
+ ICVar* doc_validate_surface_types = nullptr;
int m_modifiedModuleFlags;
- bool m_boLevelExported;
- bool m_modified;
+ // On construction, it assumes loaded levels have already been exported. Can be a big fat lie, though.
+ // The right way would require us to save to the level folder the export status of the level.
+ bool m_boLevelExported = true;
+ bool m_modified = false;
QString m_pathName;
QString m_slicePathName;
QString m_title;
AZ::Data::AssetId m_envProbeSliceAssetId;
float m_terrainSize;
- const char* m_envProbeSliceRelativePath;
- const float m_envProbeHeight;
+ const char* m_envProbeSliceRelativePath = "EngineAssets/Slices/DefaultLevelSetup.slice";
+ const float m_envProbeHeight = 200.0f;
bool m_hasErrors = false; ///< This is used to warn the user that they may lose work when they go to save.
};
diff --git a/Code/Editor/EditorPreferencesPageGeneral.cpp b/Code/Editor/EditorPreferencesPageGeneral.cpp
index 70ac0fd46f..79ecfbdfc7 100644
--- a/Code/Editor/EditorPreferencesPageGeneral.cpp
+++ b/Code/Editor/EditorPreferencesPageGeneral.cpp
@@ -32,6 +32,7 @@ void CEditorPreferencesPage_General::Reflect(AZ::SerializeContext& serialize)
->Field("PreviewPanel", &GeneralSettings::m_previewPanel)
->Field("ApplyConfigSpec", &GeneralSettings::m_applyConfigSpec)
->Field("EnableSourceControl", &GeneralSettings::m_enableSourceControl)
+ ->Field("ClearConsole", &GeneralSettings::m_clearConsoleOnGameModeStart)
->Field("ConsoleBackgroundColorTheme", &GeneralSettings::m_consoleBackgroundColorTheme)
->Field("AutoloadLastLevel", &GeneralSettings::m_autoLoadLastLevel)
->Field("ShowTimeInConsole", &GeneralSettings::m_bShowTimeInConsole)
@@ -77,6 +78,8 @@ void CEditorPreferencesPage_General::Reflect(AZ::SerializeContext& serialize)
->DataElement(AZ::Edit::UIHandlers::CheckBox, &GeneralSettings::m_previewPanel, "Show Geometry Preview Panel", "Show Geometry Preview Panel")
->DataElement(AZ::Edit::UIHandlers::CheckBox, &GeneralSettings::m_applyConfigSpec, "Hide objects by config spec", "Hide objects by config spec")
->DataElement(AZ::Edit::UIHandlers::CheckBox, &GeneralSettings::m_enableSourceControl, "Enable Source Control", "Enable Source Control")
+ ->DataElement(
+ AZ::Edit::UIHandlers::CheckBox, &GeneralSettings::m_clearConsoleOnGameModeStart, "Clear Console at game startup", "Clear Console when game mode starts")
->DataElement(AZ::Edit::UIHandlers::ComboBox, &GeneralSettings::m_consoleBackgroundColorTheme, "Console Background", "Console Background")
->EnumAttribute(AzToolsFramework::ConsoleColorTheme::Light, "Light")
->EnumAttribute(AzToolsFramework::ConsoleColorTheme::Dark, "Dark")
@@ -142,6 +145,7 @@ void CEditorPreferencesPage_General::OnApply()
gSettings.bPreviewGeometryWindow = m_generalSettings.m_previewPanel;
gSettings.bApplyConfigSpecInEditor = m_generalSettings.m_applyConfigSpec;
gSettings.enableSourceControl = m_generalSettings.m_enableSourceControl;
+ gSettings.clearConsoleOnGameModeStart = m_generalSettings.m_clearConsoleOnGameModeStart;
gSettings.consoleBackgroundColorTheme = m_generalSettings.m_consoleBackgroundColorTheme;
gSettings.bShowTimeInConsole = m_generalSettings.m_bShowTimeInConsole;
gSettings.bShowDashboardAtStartup = m_messaging.m_showDashboard;
@@ -176,6 +180,7 @@ void CEditorPreferencesPage_General::InitializeSettings()
m_generalSettings.m_previewPanel = gSettings.bPreviewGeometryWindow;
m_generalSettings.m_applyConfigSpec = gSettings.bApplyConfigSpecInEditor;
m_generalSettings.m_enableSourceControl = gSettings.enableSourceControl;
+ m_generalSettings.m_clearConsoleOnGameModeStart = gSettings.clearConsoleOnGameModeStart;
m_generalSettings.m_consoleBackgroundColorTheme = gSettings.consoleBackgroundColorTheme;
m_generalSettings.m_bShowTimeInConsole = gSettings.bShowTimeInConsole;
m_generalSettings.m_autoLoadLastLevel = gSettings.bAutoloadLastLevelAtStartup;
diff --git a/Code/Editor/EditorPreferencesPageGeneral.h b/Code/Editor/EditorPreferencesPageGeneral.h
index f22cfdd424..9a3a0f21e8 100644
--- a/Code/Editor/EditorPreferencesPageGeneral.h
+++ b/Code/Editor/EditorPreferencesPageGeneral.h
@@ -46,6 +46,7 @@ private:
bool m_previewPanel;
bool m_applyConfigSpec;
bool m_enableSourceControl;
+ bool m_clearConsoleOnGameModeStart;
AzToolsFramework::ConsoleColorTheme m_consoleBackgroundColorTheme;
bool m_autoLoadLastLevel;
bool m_bShowTimeInConsole;
diff --git a/Code/Editor/EditorViewportWidget.cpp b/Code/Editor/EditorViewportWidget.cpp
index 357c27fd72..4c638e1f82 100644
--- a/Code/Editor/EditorViewportWidget.cpp
+++ b/Code/Editor/EditorViewportWidget.cpp
@@ -472,6 +472,12 @@ void EditorViewportWidget::Update()
m_Camera.SetZRange(cameraState.m_nearClip, cameraState.m_farClip);
}
+ // Ensure the FOV matches our internally stored setting if we're using the Editor camera
+ if (!m_viewEntityId.IsValid() && !GetIEditor()->IsInGameMode())
+ {
+ SetFOV(GetFOV());
+ }
+
// Reset the camera update flag now that we're finished updating our viewport context
m_updateCameraPositionNextTick = false;
@@ -1234,6 +1240,13 @@ AZStd::shared_ptr CreateMod
AzFramework::ViewportId viewportId)
{
auto controller = AZStd::make_shared();
+
+ controller->SetCameraPriorityBuilderCallback(
+ [](AtomToolsFramework::CameraControllerPriorityFn& cameraControllerPriorityFn)
+ {
+ cameraControllerPriorityFn = AtomToolsFramework::DefaultCameraControllerPriority;
+ });
+
controller->SetCameraPropsBuilderCallback(
[](AzFramework::CameraProps& cameraProps)
{
@@ -2624,8 +2637,6 @@ void EditorViewportWidget::DestroyRenderContext()
//////////////////////////////////////////////////////////////////////////
void EditorViewportWidget::SetDefaultCamera()
{
- // Ensure the FOV matches our internally stored setting
- SetFOV(GetFOV());
if (IsDefaultCamera())
{
return;
diff --git a/Code/Editor/GameEngine.cpp b/Code/Editor/GameEngine.cpp
index dff6476ff9..173c13c235 100644
--- a/Code/Editor/GameEngine.cpp
+++ b/Code/Editor/GameEngine.cpp
@@ -566,7 +566,7 @@ void CGameEngine::SwitchToInGame()
streamer->QueueRequest(flush);
wait.acquire();
}
-
+
GetIEditor()->Notify(eNotify_OnBeginGameMode);
m_pISystem->GetIMovieSystem()->EnablePhysicsEvents(true);
diff --git a/Code/Editor/MainWindow.cpp b/Code/Editor/MainWindow.cpp
index ff322b79ac..8309d99691 100644
--- a/Code/Editor/MainWindow.cpp
+++ b/Code/Editor/MainWindow.cpp
@@ -46,6 +46,7 @@ AZ_POP_DISABLE_WARNING
#include
#include
#include
+#include
// AzQtComponents
#include
@@ -731,32 +732,84 @@ void MainWindow::InitActions()
.SetStatusTip(tr("Restore saved state (Fetch)"));
// Modify actions
- am->AddAction(ID_EDITMODE_MOVE, tr("Move"))
+ am->AddAction(AzToolsFramework::EditModeMove, tr("Move"))
.SetIcon(Style::icon("Move"))
.SetApplyHoverEffect()
.SetShortcut(tr("1"))
.SetToolTip(tr("Move (1)"))
.SetCheckable(true)
.SetStatusTip(tr("Select and move selected object(s)"))
- .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateEditmodeMove);
- am->AddAction(ID_EDITMODE_ROTATE, tr("Rotate"))
+ .RegisterUpdateCallback([](QAction* action)
+ {
+ Q_ASSERT(action->isCheckable());
+
+ AzToolsFramework::EditorTransformComponentSelectionRequests::Mode mode;
+ AzToolsFramework::EditorTransformComponentSelectionRequestBus::EventResult(
+ mode, AzToolsFramework::GetEntityContextId(),
+ &AzToolsFramework::EditorTransformComponentSelectionRequests::GetTransformMode);
+
+ action->setChecked(mode == AzToolsFramework::EditorTransformComponentSelectionRequests::Mode::Translation);
+ })
+ .Connect(
+ &QAction::triggered,
+ []()
+ {
+ EditorTransformComponentSelectionRequestBus::Event(
+ GetEntityContextId(), &EditorTransformComponentSelectionRequests::SetTransformMode,
+ EditorTransformComponentSelectionRequests::Mode::Translation);
+ });
+ am->AddAction(AzToolsFramework::EditModeRotate, tr("Rotate"))
.SetIcon(Style::icon("Translate"))
.SetApplyHoverEffect()
.SetShortcut(tr("2"))
.SetToolTip(tr("Rotate (2)"))
.SetCheckable(true)
.SetStatusTip(tr("Select and rotate selected object(s)"))
- .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateEditmodeRotate);
- am->AddAction(ID_EDITMODE_SCALE, tr("Scale"))
+ .RegisterUpdateCallback([](QAction* action)
+ {
+ Q_ASSERT(action->isCheckable());
+
+ AzToolsFramework::EditorTransformComponentSelectionRequests::Mode mode;
+ AzToolsFramework::EditorTransformComponentSelectionRequestBus::EventResult(
+ mode, AzToolsFramework::GetEntityContextId(),
+ &AzToolsFramework::EditorTransformComponentSelectionRequests::GetTransformMode);
+
+ action->setChecked(mode == AzToolsFramework::EditorTransformComponentSelectionRequests::Mode::Rotation);
+ })
+ .Connect(
+ &QAction::triggered,
+ []()
+ {
+ EditorTransformComponentSelectionRequestBus::Event(
+ GetEntityContextId(), &EditorTransformComponentSelectionRequests::SetTransformMode,
+ EditorTransformComponentSelectionRequests::Mode::Rotation);
+ });
+ am->AddAction(AzToolsFramework::EditModeScale, tr("Scale"))
.SetIcon(Style::icon("Scale"))
.SetApplyHoverEffect()
.SetShortcut(tr("3"))
.SetToolTip(tr("Scale (3)"))
.SetCheckable(true)
.SetStatusTip(tr("Select and scale selected object(s)"))
- .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateEditmodeScale);
+ .RegisterUpdateCallback([](QAction* action)
+ {
+ Q_ASSERT(action->isCheckable());
- am->AddAction(ID_SNAP_TO_GRID, tr("Snap to grid"))
+ AzToolsFramework::EditorTransformComponentSelectionRequests::Mode mode;
+ AzToolsFramework::EditorTransformComponentSelectionRequestBus::EventResult(
+ mode, AzToolsFramework::GetEntityContextId(),
+ &AzToolsFramework::EditorTransformComponentSelectionRequests::GetTransformMode);
+
+ action->setChecked(mode == AzToolsFramework::EditorTransformComponentSelectionRequests::Mode::Scale);
+ })
+ .Connect( &QAction::triggered,[]()
+ {
+ EditorTransformComponentSelectionRequestBus::Event(
+ GetEntityContextId(), &EditorTransformComponentSelectionRequests::SetTransformMode,
+ EditorTransformComponentSelectionRequests::Mode::Scale);
+ });
+
+ am->AddAction(AzToolsFramework::SnapToGrid, tr("Snap to grid"))
.SetIcon(Style::icon("Grid"))
.SetApplyHoverEffect()
.SetShortcut(tr("G"))
@@ -769,7 +822,7 @@ void MainWindow::InitActions()
})
.Connect(&QAction::triggered, []() { SandboxEditor::SetGridSnapping(!SandboxEditor::GridSnappingEnabled()); });
- am->AddAction(ID_SNAPANGLE, tr("Snap angle"))
+ am->AddAction(AzToolsFramework::SnapAngle, tr("Snap angle"))
.SetIcon(Style::icon("Angle"))
.SetApplyHoverEffect()
.SetStatusTip(tr("Snap angle"))
diff --git a/Code/Editor/MainWindow.h b/Code/Editor/MainWindow.h
index e70355827c..1e375b08f2 100644
--- a/Code/Editor/MainWindow.h
+++ b/Code/Editor/MainWindow.h
@@ -59,11 +59,17 @@ namespace AzQtComponents
namespace AzToolsFramework
{
class Ticker;
-}
-
-namespace AzToolsFramework
-{
class QtSourceControlNotificationHandler;
+
+ //! @name Reverse URLs.
+ //! Used to identify common actions and override them when necessary.
+ //@{
+ constexpr inline AZ::Crc32 EditModeMove = AZ_CRC_CE("com.o3de.action.editor.editmode.move");
+ constexpr inline AZ::Crc32 EditModeRotate = AZ_CRC_CE("com.o3de.action.editor.editmode.rotate");
+ constexpr inline AZ::Crc32 EditModeScale = AZ_CRC_CE("com.o3de.action.editor.editmode.scale");
+ constexpr inline AZ::Crc32 SnapToGrid = AZ_CRC_CE("com.o3de.action.editor.snaptogrid");
+ constexpr inline AZ::Crc32 SnapAngle = AZ_CRC_CE("com.o3de.action.editor.snapangle");
+ //@}
}
#define MAINFRM_LAYOUT_NORMAL "NormalLayout"
diff --git a/Code/Editor/Resource.h b/Code/Editor/Resource.h
index a6f714afa4..b3640fac70 100644
--- a/Code/Editor/Resource.h
+++ b/Code/Editor/Resource.h
@@ -82,7 +82,6 @@
#define ID_TOOLS_CUSTOMIZEKEYBOARD 32914
#define ID_EXPORT_INDOORS 32915
#define ID_VIEW_CYCLE2DVIEWPORT 32916
-#define ID_SNAPANGLE 32917
#define ID_PHYSICS_GETPHYSICSSTATE 32937
#define ID_PHYSICS_RESETPHYSICSSTATE 32938
#define ID_GAME_SYNCPLAYER 32941
@@ -108,9 +107,6 @@
#define ID_MOVE_OBJECT 33481
#define ID_RENAME_OBJ 33483
#define ID_FETCH 33496
-#define ID_EDITMODE_ROTATE 33506
-#define ID_EDITMODE_SCALE 33507
-#define ID_EDITMODE_MOVE 33508
#define ID_SELECTION_DELETE 33512
#define ID_EDIT_ESCAPE 33513
#define ID_UNDO 33524
@@ -137,7 +133,6 @@
#define ID_ADDNODE 33570
#define ID_ADDSCENETRACK 33573
#define ID_FIND 33574
-#define ID_SNAP_TO_GRID 33575
#define ID_TAG_LOC1 33576
#define ID_TAG_LOC2 33577
#define ID_TAG_LOC3 33578
diff --git a/Code/Editor/Settings.cpp b/Code/Editor/Settings.cpp
index 8f86c74b25..ad9996adcd 100644
--- a/Code/Editor/Settings.cpp
+++ b/Code/Editor/Settings.cpp
@@ -189,6 +189,7 @@ SEditorSettings::SEditorSettings()
consoleBackgroundColorTheme = AzToolsFramework::ConsoleColorTheme::Dark;
bShowTimeInConsole = false;
+ clearConsoleOnGameModeStart = false;
enableSceneInspector = false;
@@ -527,6 +528,8 @@ void SEditorSettings::Save()
SaveValue("Settings", "ConsoleBackgroundColorThemeV2", (int)consoleBackgroundColorTheme);
+ SaveValue("Settings", "ClearConsoleOnGameModeStart", clearConsoleOnGameModeStart);
+
SaveValue("Settings", "ShowTimeInConsole", bShowTimeInConsole);
SaveValue("Settings", "EnableSceneInspector", enableSceneInspector);
@@ -745,6 +748,8 @@ void SEditorSettings::Load()
consoleBackgroundColorTheme = AzToolsFramework::ConsoleColorTheme::Dark;
}
+ LoadValue("Settings", "ClearConsoleOnGameModeStart", clearConsoleOnGameModeStart);
+
LoadValue("Settings", "ShowTimeInConsole", bShowTimeInConsole);
LoadValue("Settings", "EnableSceneInspector", enableSceneInspector);
diff --git a/Code/Editor/Settings.h b/Code/Editor/Settings.h
index 979820e5e6..39a4093915 100644
--- a/Code/Editor/Settings.h
+++ b/Code/Editor/Settings.h
@@ -380,6 +380,7 @@ AZ_POP_DISABLE_DLL_EXPORT_BASECLASS_WARNING
//! Source Control Enabling.
bool enableSourceControl;
+ bool clearConsoleOnGameModeStart;
//! Text editor.
QString textEditorForScript;
diff --git a/Code/Editor/ToolBox.cpp b/Code/Editor/ToolBox.cpp
index 77cb479873..82817e1ff7 100644
--- a/Code/Editor/ToolBox.cpp
+++ b/Code/Editor/ToolBox.cpp
@@ -321,42 +321,13 @@ bool CToolBoxManager::SetMacroTitle(int index, const QString& title, bool bToolb
}
//////////////////////////////////////////////////////////////////////////
-void CToolBoxManager::Load(ActionManager* actionManager)
+void CToolBoxManager::Load([[maybe_unused]] ActionManager* actionManager)
{
Clear();
QString path;
GetSaveFilePath(path);
Load(path, nullptr, true, nullptr);
-
- if (actionManager)
- {
- auto engineSourceAssetPath = AZ::IO::FixedMaxPath(AZ::Utils::GetEnginePath()) / "Assets";
- LoadShelves((engineSourceAssetPath / "Editor" / "Scripts").c_str(),
- (engineSourceAssetPath / "Editor" / "Scripts" / "Shelves").c_str(), actionManager);
- }
-}
-
-void CToolBoxManager::LoadShelves(QString scriptPath, QString shelvesPath, ActionManager* actionManager)
-{
- IFileUtil::FileArray files;
- CFileUtil::ScanDirectory(shelvesPath, "*.xml", files);
-
- const int shelfCount = files.size();
- for (int idx = 0; idx < shelfCount; ++idx)
- {
- if (Path::GetExt(files[idx].filename) != "xml")
- {
- continue;
- }
-
- QString shelfName(PathUtil::GetFileName(files[idx].filename.toUtf8().data()));
-
- AmazonToolbar toolbar(shelfName, shelfName);
- Load(shelvesPath + QString("/") + files[idx].filename, &toolbar, false, actionManager);
-
- m_toolbars.push_back(toolbar);
- }
}
void CToolBoxManager::Load(QString xmlpath, AmazonToolbar* pToolbar, bool bToolbox, ActionManager* actionManager)
diff --git a/Code/Editor/ToolBox.h b/Code/Editor/ToolBox.h
index 691b9cd089..0c91305c79 100644
--- a/Code/Editor/ToolBox.h
+++ b/Code/Editor/ToolBox.h
@@ -129,7 +129,6 @@ public:
void Save() const;
// Load macros configuration from registry.
void Load(ActionManager* actionManager = nullptr);
- void LoadShelves(QString scriptPath, QString shelvesPath, ActionManager* actionManager);
//! Get the number of managed macros.
int GetMacroCount(bool bToolbox) const;
diff --git a/Code/Editor/ViewportTitleDlg.cpp b/Code/Editor/ViewportTitleDlg.cpp
index 4d27506929..c1e1afb908 100644
--- a/Code/Editor/ViewportTitleDlg.cpp
+++ b/Code/Editor/ViewportTitleDlg.cpp
@@ -953,13 +953,13 @@ void CViewportTitleDlg::CheckForCameraSpeedUpdate()
void CViewportTitleDlg::OnGridSnappingToggled()
{
m_gridSizeActionWidget->setEnabled(m_enableGridSnappingAction->isChecked());
- MainWindow::instance()->GetActionManager()->GetAction(ID_SNAP_TO_GRID)->trigger();
+ MainWindow::instance()->GetActionManager()->GetAction(AzToolsFramework::SnapToGrid)->trigger();
}
void CViewportTitleDlg::OnAngleSnappingToggled()
{
m_angleSizeActionWidget->setEnabled(m_enableAngleSnappingAction->isChecked());
- MainWindow::instance()->GetActionManager()->GetAction(ID_SNAPANGLE)->trigger();
+ MainWindow::instance()->GetActionManager()->GetAction(AzToolsFramework::SnapAngle)->trigger();
}
void CViewportTitleDlg::OnGridSpinBoxChanged(double value)
@@ -974,14 +974,14 @@ void CViewportTitleDlg::OnAngleSpinBoxChanged(double value)
void CViewportTitleDlg::UpdateOverFlowMenuState()
{
- bool gridSnappingActive = MainWindow::instance()->GetActionManager()->GetAction(ID_SNAP_TO_GRID)->isChecked();
+ bool gridSnappingActive = MainWindow::instance()->GetActionManager()->GetAction(AzToolsFramework::SnapToGrid)->isChecked();
{
QSignalBlocker signalBlocker(m_enableGridSnappingAction);
m_enableGridSnappingAction->setChecked(gridSnappingActive);
}
m_gridSizeActionWidget->setEnabled(gridSnappingActive);
- bool angleSnappingActive = MainWindow::instance()->GetActionManager()->GetAction(ID_SNAPANGLE)->isChecked();
+ bool angleSnappingActive = MainWindow::instance()->GetActionManager()->GetAction(AzToolsFramework::SnapAngle)->isChecked();
{
QSignalBlocker signalBlocker(m_enableAngleSnappingAction);
m_enableAngleSnappingAction->setChecked(angleSnappingActive);
diff --git a/Code/Framework/AzCore/AzCore/EBus/Internal/CallstackEntry.h b/Code/Framework/AzCore/AzCore/EBus/Internal/CallstackEntry.h
index 982040ee2f..bcda78aef8 100644
--- a/Code/Framework/AzCore/AzCore/EBus/Internal/CallstackEntry.h
+++ b/Code/Framework/AzCore/AzCore/EBus/Internal/CallstackEntry.h
@@ -84,7 +84,7 @@ namespace AZ
else
{
AZ::Debug::Trace::Instance().Assert(__FILE__, __LINE__, AZ_FUNCTION_SIGNATURE,
- "Bus has multiple threads in its callstack records. Configure MutexType on the bus, or don't send to it from multiple threads");
+ "Bus %s has multiple threads in its callstack records. Configure MutexType on the bus, or don't send to it from multiple threads", BusType::GetName());
}
}
diff --git a/Code/Framework/AzCore/AzCore/EBus/Policies.h b/Code/Framework/AzCore/AzCore/EBus/Policies.h
index 0217874416..db11043ef8 100644
--- a/Code/Framework/AzCore/AzCore/EBus/Policies.h
+++ b/Code/Framework/AzCore/AzCore/EBus/Policies.h
@@ -268,7 +268,7 @@ namespace AZ
m_messages.pop();
if (numMessages == 1)
{
- m_messages.get_container().clear(); // If it was the last message, free all memory.
+ m_messages = {};
}
}
//////////////////////////////////////////////////////////////////////////
@@ -280,7 +280,7 @@ namespace AZ
void Clear()
{
AZStd::lock_guard lock(m_messagesMutex);
- m_messages.get_container().clear();
+ m_messages = {};
}
void SetActive(bool isActive)
@@ -289,7 +289,7 @@ namespace AZ
m_isActive = isActive;
if (!m_isActive)
{
- m_messages.get_container().clear();
+ m_messages = {};
}
};
diff --git a/Code/Framework/AzCore/AzCore/Jobs/Job.cpp b/Code/Framework/AzCore/AzCore/Jobs/Job.cpp
new file mode 100644
index 0000000000..d3a2a77d92
--- /dev/null
+++ b/Code/Framework/AzCore/AzCore/Jobs/Job.cpp
@@ -0,0 +1,312 @@
+/*
+ * Copyright (c) Contributors to the Open 3D Engine Project.
+ * For complete copyright and license terms please see the LICENSE at the root of this distribution.
+ *
+ * SPDX-License-Identifier: Apache-2.0 OR MIT
+ *
+ */
+#include
+#include
+#include
+#include
+#include
+#include
+
+namespace AZ
+{
+ Job::Job(bool isAutoDelete, AZ::JobContext* context, bool isCompletion, AZ::s8 priority)
+ {
+ if (context)
+ {
+ m_context = context;
+ }
+ else
+ {
+ m_context = JobContext::GetParentContext();
+ }
+
+ unsigned int countAndFlags = 1;
+ if (isAutoDelete)
+ {
+ countAndFlags |= (unsigned int)FLAG_AUTO_DELETE;
+ }
+ if (isCompletion)
+ {
+ countAndFlags |= (unsigned int)FLAG_COMPLETION;
+ }
+ countAndFlags |= (unsigned int)((priority << FLAG_PRIORITY_START_BIT) & FLAG_PRIORITY_MASK);
+ SetDependentCountAndFlags(countAndFlags);
+ StoreDependent(NULL);
+
+ #ifdef AZ_DEBUG_JOB_STATE
+ SetState(STATE_SETUP);
+ #endif // AZ_DEBUG_JOB_STATE
+ }
+
+ void Job::Start()
+ {
+ //jobs are created with a count set to 1, we remove that count to allow the job to start
+ #ifdef AZ_DEBUG_JOB_STATE
+ AZ_Assert(m_state == STATE_SETUP, ("Jobs must be in the setup state before they can be started"));
+ SetState(STATE_STARTED);
+ #endif
+ DecrementDependentCount();
+ }
+
+ void Job::Reset(bool isClearDependent)
+ {
+ #ifdef AZ_DEBUG_JOB_STATE
+ AZ_Assert((m_state == STATE_SETUP) || (m_state == STATE_PROCESSING), "Jobs must not be running when they are reset");
+ SetState(STATE_SETUP);
+ #endif
+ unsigned int countAndFlags = GetDependentCountAndFlags();
+ AZ_Assert((countAndFlags & (unsigned int)FLAG_AUTO_DELETE) == 0, "You can't call reset on AutoDelete jobs!");
+ // Remove the FLAG_DEPENDENTCOUNT_MASK and FLAG_CHILD_JOBS flags
+ countAndFlags = (countAndFlags & (~(FLAG_DEPENDENTCOUNT_MASK) & ~(FLAG_CHILD_JOBS))) | 1;
+ SetDependentCountAndFlags(countAndFlags);
+ if (isClearDependent)
+ {
+ StoreDependent(NULL);
+ }
+ else
+ {
+ Job* dependent = GetDependent();
+ if (dependent)
+ {
+ #ifdef AZ_DEBUG_JOB_STATE
+ AZ_Assert(dependent->m_state == STATE_SETUP, ("Dependent must be in setup state before it can be re-initialized"));
+ #endif
+ dependent->IncrementDependentCount();
+ }
+ }
+ }
+
+ void Job::SetDependent(Job* dependent)
+ {
+ AZ_Assert(!GetDependent(), ("Job already has a dependent, should be cleared after the job is done"));
+ #ifdef AZ_DEBUG_JOB_STATE
+ AZ_Assert(m_state == STATE_SETUP, ("Dependent can only be set before the jobs are started"));
+ AZ_Assert(dependent->m_state == STATE_SETUP, ("Dependent must be in the setup state"));
+ #endif
+ dependent->IncrementDependentCount();
+ StoreDependent(dependent);
+ }
+
+ void Job::SetDependentStarted(Job* dependent)
+ {
+ AZ_Assert(!GetDependent(), ("Job already has a dependent, should be cleared after the job is done"));
+ #ifdef AZ_DEBUG_JOB_STATE
+ AZ_Assert(m_state == STATE_SETUP, ("Dependent can only be set before the jobs are started"));
+ //We don't require the dependent to be in STATE_SETUP, the user can call this from a context where they
+ //know the dependent has not started yet, although it is in STATE_STARTED already, e.g. if SetDependent
+ //is called from a job which the dependent is already dependent on.
+ //Note that if the user gets this wrong, the dependent may start before this job is finished, and the asserts
+ //may not even trigger due to race conditions. Hence why this function is 'experts only'.
+ AZ_Assert((dependent->m_state == STATE_SETUP) || (dependent->m_state == STATE_STARTED)
+ || (dependent->m_state == STATE_SUSPENDED), "Dependent must be in the setup, started, or suspended state");
+ #endif
+ dependent->IncrementDependentCount();
+ StoreDependent(dependent);
+ }
+
+ void Job::SetDependentChild(Job* dependent)
+ {
+ AZ_Assert(!GetDependent(), ("Job already has a dependent, should be cleared after the job is done"));
+ #ifdef AZ_DEBUG_JOB_STATE
+ AZ_Assert(m_state == STATE_SETUP, ("Dependent can only be set before the jobs are started"));
+ AZ_Assert(dependent->m_state == STATE_PROCESSING, "Dependent must be processing to add a child");
+ #endif
+ dependent->IncrementDependentCountAndSetChildFlag();
+ StoreDependent(dependent);
+ }
+
+ void Job::SetContinuation(Job* continuationJob)
+ {
+ #ifdef AZ_DEBUG_JOB_STATE
+ AZ_Assert(m_state == STATE_PROCESSING, "Continuation jobs can only be set while we are processing, otherwise a regular dependent should be used");
+ #endif
+ Job* dependent = GetDependent();
+ if (dependent) //nothing to do if there is no dependent... doesn't usually happen, except with synchronous processing and assists
+ {
+ continuationJob->SetDependentStarted(dependent);
+ }
+ }
+
+ void Job::StartAsChild(Job* childJob)
+ {
+ #ifdef AZ_DEBUG_JOB_STATE
+ AZ_Assert(m_state == STATE_PROCESSING, "Child jobs can only be added while we are processing");
+ #endif
+ childJob->SetDependentChild(this);
+ childJob->Start();
+ }
+
+ void Job::WaitForChildren()
+ {
+ #ifdef AZ_DEBUG_JOB_STATE
+ AZ_Assert(m_state == STATE_PROCESSING, "We must be currently processing in order to suspend");
+ #endif
+ if (GetDependentCount() != 0)
+ {
+ #ifdef AZ_DEBUG_JOB_STATE
+ SetState(STATE_SUSPENDED);
+ #endif // AZ_DEBUG_JOB_STATE
+ m_context->GetJobManager().SuspendJobUntilReady(this);
+ #ifdef AZ_DEBUG_JOB_STATE
+ SetState(STATE_PROCESSING);
+ #endif // AZ_DEBUG_JOB_STATE
+ }
+ AZ_Assert(GetDependentCount() == 0, "Suspended job has resumed, but still has non-zero dependent count, bug in JobManager?");
+ }
+
+ bool Job::IsCancelled() const
+ {
+ JobCancelGroup* cancelGroup = m_context->GetCancelGroup();
+ if (cancelGroup && cancelGroup->IsCancelled())
+ {
+ if (!IsCompletion()) // always run completion jobs, as they can be holding a synchronization primitive
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ bool Job::IsAutoDelete() const
+ {
+ return (GetDependentCountAndFlags() & (unsigned int)FLAG_AUTO_DELETE) ? true : false;
+ }
+
+ bool Job::IsCompletion() const
+ {
+ return (GetDependentCountAndFlags() & (unsigned int)FLAG_COMPLETION) ? true : false;
+ }
+
+ void Job::StartAndAssistUntilComplete()
+ {
+ m_context->GetJobManager().StartJobAndAssistUntilComplete(this);
+ }
+
+ void Job::StartAndWaitForCompletion()
+ {
+ //check if we are in a worker thread or a general user thread
+ Job* currentJob = m_context->GetJobManager().GetCurrentJob();
+ if (currentJob)
+ {
+ //worker thread, so just suspend this current job until the empty job completes
+ currentJob->StartAsChild(this);
+ currentJob->WaitForChildren();
+ }
+ else
+ {
+ StartAndAssistUntilComplete();
+ }
+ }
+
+ unsigned int Job::GetDependentCount() const
+ {
+ return (GetDependentCountAndFlags() & FLAG_DEPENDENTCOUNT_MASK);
+ }
+
+ void Job::IncrementDependentCount()
+ {
+ AZ_Assert(GetDependentCount() < FLAG_DEPENDENTCOUNT_MASK, "Dependent count overflow");
+ #ifdef AZCORE_JOBS_IMPL_SYNCHRONOUS
+ ++m_dependentCountAndFlags;
+ #else
+ m_dependentCountAndFlags.fetch_add(1, AZStd::memory_order_acq_rel);
+ #endif
+ }
+
+ void Job::IncrementDependentCountAndSetChildFlag()
+ {
+ AZ_Assert(GetDependentCount() < FLAG_DEPENDENTCOUNT_MASK, "Dependent count overflow");
+ #ifdef AZCORE_JOBS_IMPL_SYNCHRONOUS
+ int oldCount = m_dependentCountAndFlags & FLAG_DEPENDENTCOUNT_MASK;
+ m_dependentCountAndFlags = (m_dependentCountAndFlags & ~FLAG_DEPENDENTCOUNT_MASK) | (oldCount + 1) | FLAG_CHILD_JOBS;
+ #else
+ //use a single atomic operation to increment the count and set the child flag if possible
+ unsigned int oldCountAndFlags, newCountAndFlags;
+ do
+ {
+ oldCountAndFlags = m_dependentCountAndFlags.load(AZStd::memory_order_acquire);
+ int oldCount = oldCountAndFlags & FLAG_DEPENDENTCOUNT_MASK;
+ newCountAndFlags = (oldCountAndFlags & ~FLAG_DEPENDENTCOUNT_MASK) | (oldCount + 1) | FLAG_CHILD_JOBS;
+ } while (!m_dependentCountAndFlags.compare_exchange_weak(oldCountAndFlags, newCountAndFlags, AZStd::memory_order_acq_rel, AZStd::memory_order_acquire));
+ #endif
+ }
+
+ void Job::DecrementDependentCount()
+ {
+ #ifdef AZ_DEBUG_JOB_STATE
+ AZ_Assert((m_state == STATE_SETUP) || (m_state == STATE_STARTED)
+ || (m_state == STATE_PROCESSING) || (m_state == STATE_SUSPENDED), //child jobs
+ "Job dependent count should not be decremented after job is already pending");
+ #endif
+ AZ_Assert(GetDependentCount() > 0, ("Job dependent count is already zero"));
+ #ifdef AZCORE_JOBS_IMPL_SYNCHRONOUS
+ unsigned int countAndFlags = m_dependentCountAndFlags--;
+ #else
+ unsigned int countAndFlags = m_dependentCountAndFlags.fetch_sub(1, AZStd::memory_order_acq_rel);
+ #endif
+ unsigned int count = countAndFlags & FLAG_DEPENDENTCOUNT_MASK;
+ if (count == 1)
+ {
+ if (!(countAndFlags & FLAG_CHILD_JOBS))
+ {
+ #ifdef AZ_DEBUG_JOB_STATE
+ AZ_Assert(m_state == STATE_STARTED, "Job has not been started but the dependent count is zero, must be a dependency error");
+ SetState(STATE_PENDING);
+ #endif
+ m_context->GetJobManager().AddPendingJob(this);
+ }
+ }
+ }
+
+ AZ::s8 Job::GetPriority() const
+ {
+ return (GetDependentCountAndFlags() >> FLAG_PRIORITY_START_BIT) & 0xff;
+ }
+
+#ifdef AZCORE_JOBS_IMPL_SYNCHRONOUS
+ void Job::StoreDependent(Job* job)
+ {
+ m_dependent = job;
+ }
+
+ Job* Job::GetDependent() const
+ {
+ return m_dependent;
+ }
+
+ void Job::SetDependentCountAndFlags(unsigned int countAndFlags)
+ {
+ m_dependentCountAndFlags = countAndFlags;
+ }
+
+ unsigned int Job::GetDependentCountAndFlags() const
+ {
+ return m_dependentCountAndFlags;
+ }
+#else
+ void Job::StoreDependent(Job* job)
+ {
+ m_dependent.store(job, AZStd::memory_order_release);
+ }
+
+ Job* Job::GetDependent() const
+ {
+ return m_dependent.load(AZStd::memory_order_acquire);
+ }
+
+ void Job::SetDependentCountAndFlags(unsigned int countAndFlags)
+ {
+ m_dependentCountAndFlags.store(countAndFlags, AZStd::memory_order_release);
+ }
+
+ unsigned int Job::GetDependentCountAndFlags() const
+ {
+ return m_dependentCountAndFlags.load(AZStd::memory_order_acquire);
+ }
+#endif
+}
diff --git a/Code/Framework/AzCore/AzCore/Jobs/Job.h b/Code/Framework/AzCore/AzCore/Jobs/Job.h
index 18c639e2c2..b6632dd063 100644
--- a/Code/Framework/AzCore/AzCore/Jobs/Job.h
+++ b/Code/Framework/AzCore/AzCore/Jobs/Job.h
@@ -5,15 +5,14 @@
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
-#ifndef AZCORE_JOBS_JOB_H
-#define AZCORE_JOBS_JOB_H 1
-
-#include
-#include
-#include
-#include
-#include
+#pragma once
+#include
+#include
+#include
+#include
+#include
+
#include
#if defined(_DEBUG)
@@ -234,319 +233,22 @@ namespace AZ
//would require atomic ops to set/read it, so not really worth it.
int m_state;
};
-
- //============================================================================================================
- //============================================================================================================
- //============================================================================================================
-
- inline Job::Job(bool isAutoDelete, JobContext* context, bool isCompletion, AZ::s8 priority)
- {
- if (context)
- {
- m_context = context;
- }
- else
- {
- m_context = JobContext::GetParentContext();
- }
-
- unsigned int countAndFlags = 1;
- if (isAutoDelete)
- {
- countAndFlags |= (unsigned int)FLAG_AUTO_DELETE;
- }
- if (isCompletion)
- {
- countAndFlags |= (unsigned int)FLAG_COMPLETION;
- }
- countAndFlags |= (unsigned int)((priority << FLAG_PRIORITY_START_BIT) & FLAG_PRIORITY_MASK);
- SetDependentCountAndFlags(countAndFlags);
- StoreDependent(NULL);
-
-#ifdef AZ_DEBUG_JOB_STATE
- SetState(STATE_SETUP);
-#endif // AZ_DEBUG_JOB_STATE
- }
-
- AZ_FORCE_INLINE void Job::Start()
- {
- //jobs are created with a count set to 1, we remove that count to allow the job to start
-#ifdef AZ_DEBUG_JOB_STATE
- AZ_Assert(m_state == STATE_SETUP, ("Jobs must be in the setup state before they can be started"));
- SetState(STATE_STARTED);
-#endif
- DecrementDependentCount();
- }
-
- inline void Job::Reset(bool isClearDependent)
- {
-#ifdef AZ_DEBUG_JOB_STATE
- AZ_Assert((m_state == STATE_SETUP) || (m_state == STATE_PROCESSING), "Jobs must not be running when they are reset");
- SetState(STATE_SETUP);
-#endif
- unsigned int countAndFlags = GetDependentCountAndFlags();
- AZ_Assert((countAndFlags & (unsigned int)FLAG_AUTO_DELETE) == 0, "You can't call reset on AutoDelete jobs!");
- // Remove the FLAG_DEPENDENTCOUNT_MASK and FLAG_CHILD_JOBS flags
- countAndFlags = (countAndFlags & (~(FLAG_DEPENDENTCOUNT_MASK) & ~(FLAG_CHILD_JOBS))) | 1;
- SetDependentCountAndFlags(countAndFlags);
- if (isClearDependent)
- {
- StoreDependent(NULL);
- }
- else
- {
- Job* dependent = GetDependent();
- if (dependent)
- {
-#ifdef AZ_DEBUG_JOB_STATE
- AZ_Assert(dependent->m_state == STATE_SETUP, ("Dependent must be in setup state before it can be re-initialized"));
-#endif
- dependent->IncrementDependentCount();
- }
- }
- }
-
- AZ_FORCE_INLINE void Job::SetDependent(Job* dependent)
- {
- AZ_Assert(!GetDependent(), ("Job already has a dependent, should be cleared after the job is done"));
-#ifdef AZ_DEBUG_JOB_STATE
- AZ_Assert(m_state == STATE_SETUP, ("Dependent can only be set before the jobs are started"));
- AZ_Assert(dependent->m_state == STATE_SETUP, ("Dependent must be in the setup state"));
-#endif
- dependent->IncrementDependentCount();
- StoreDependent(dependent);
- }
-
- AZ_FORCE_INLINE void Job::SetDependentStarted(Job* dependent)
- {
- AZ_Assert(!GetDependent(), ("Job already has a dependent, should be cleared after the job is done"));
-#ifdef AZ_DEBUG_JOB_STATE
- AZ_Assert(m_state == STATE_SETUP, ("Dependent can only be set before the jobs are started"));
- //We don't require the dependent to be in STATE_SETUP, the user can call this from a context where they
- //know the dependent has not started yet, although it is in STATE_STARTED already, e.g. if SetDependent
- //is called from a job which the dependent is already dependent on.
- //Note that if the user gets this wrong, the dependent may start before this job is finished, and the asserts
- //may not even trigger due to race conditions. Hence why this function is 'experts only'.
- AZ_Assert((dependent->m_state == STATE_SETUP) || (dependent->m_state == STATE_STARTED)
- || (dependent->m_state == STATE_SUSPENDED), "Dependent must be in the setup, started, or suspended state");
-#endif
- dependent->IncrementDependentCount();
- StoreDependent(dependent);
- }
-
- AZ_FORCE_INLINE void Job::SetDependentChild(Job* dependent)
- {
- AZ_Assert(!GetDependent(), ("Job already has a dependent, should be cleared after the job is done"));
-#ifdef AZ_DEBUG_JOB_STATE
- AZ_Assert(m_state == STATE_SETUP, ("Dependent can only be set before the jobs are started"));
- AZ_Assert(dependent->m_state == STATE_PROCESSING, "Dependent must be processing to add a child");
-#endif
- dependent->IncrementDependentCountAndSetChildFlag();
- StoreDependent(dependent);
- }
-
- AZ_FORCE_INLINE void Job::SetContinuation(Job* continuationJob)
- {
-#ifdef AZ_DEBUG_JOB_STATE
- AZ_Assert(m_state == STATE_PROCESSING, "Continuation jobs can only be set while we are processing, otherwise a regular dependent should be used");
-#endif
- Job* dependent = GetDependent();
- if (dependent) //nothing to do if there is no dependent... doesn't usually happen, except with synchronous processing and assists
- {
- continuationJob->SetDependentStarted(dependent);
- }
- }
-
- AZ_FORCE_INLINE void Job::StartAsChild(Job* childJob)
- {
-#ifdef AZ_DEBUG_JOB_STATE
- AZ_Assert(m_state == STATE_PROCESSING, "Child jobs can only be added while we are processing");
-#endif
- childJob->SetDependentChild(this);
- childJob->Start();
- }
-
- AZ_FORCE_INLINE void Job::WaitForChildren()
- {
-#ifdef AZ_DEBUG_JOB_STATE
- AZ_Assert(m_state == STATE_PROCESSING, "We must be currently processing in order to suspend");
-#endif
- if (GetDependentCount() != 0)
- {
-#ifdef AZ_DEBUG_JOB_STATE
- SetState(STATE_SUSPENDED);
-#endif // AZ_DEBUG_JOB_STATE
- m_context->GetJobManager().SuspendJobUntilReady(this);
-#ifdef AZ_DEBUG_JOB_STATE
- SetState(STATE_PROCESSING);
-#endif // AZ_DEBUG_JOB_STATE
- }
- AZ_Assert(GetDependentCount() == 0, "Suspended job has resumed, but still has non-zero dependent count, bug in JobManager?");
- }
-
- AZ_FORCE_INLINE bool Job::IsCancelled() const
- {
- JobCancelGroup* cancelGroup = m_context->GetCancelGroup();
- if (cancelGroup && cancelGroup->IsCancelled())
- {
- if (!IsCompletion()) // always run completion jobs, as they can be holding a synchronization primitive
- {
- return true;
- }
- }
- return false;
- }
-
- AZ_FORCE_INLINE bool Job::IsAutoDelete() const
- {
- return (GetDependentCountAndFlags() & (unsigned int)FLAG_AUTO_DELETE) ? true : false;
- }
-
- AZ_FORCE_INLINE bool Job::IsCompletion() const
- {
- return (GetDependentCountAndFlags() & (unsigned int)FLAG_COMPLETION) ? true : false;
- }
-
- AZ_FORCE_INLINE void Job::StartAndAssistUntilComplete()
- {
- m_context->GetJobManager().StartJobAndAssistUntilComplete(this);
- }
-
- inline void Job::StartAndWaitForCompletion()
- {
- //check if we are in a worker thread or a general user thread
- Job* currentJob = m_context->GetJobManager().GetCurrentJob();
- if (currentJob)
- {
- //worker thread, so just suspend this current job until the empty job completes
- currentJob->StartAsChild(this);
- currentJob->WaitForChildren();
- }
- else
- {
- StartAndAssistUntilComplete();
- }
- }
-
- AZ_FORCE_INLINE JobContext* Job::GetContext() const
+
+ //////////////////////////////////////////////////////////////////////////////////////////////////////
+ // Inline implementations
+ inline JobContext* Job::GetContext() const
{
return m_context;
}
- AZ_FORCE_INLINE unsigned int Job::GetDependentCount() const
- {
- return (GetDependentCountAndFlags() & FLAG_DEPENDENTCOUNT_MASK);
- }
-
- AZ_FORCE_INLINE void Job::IncrementDependentCount()
- {
- AZ_Assert(GetDependentCount() < FLAG_DEPENDENTCOUNT_MASK, "Dependent count overflow");
-#ifdef AZCORE_JOBS_IMPL_SYNCHRONOUS
- ++m_dependentCountAndFlags;
-#else
- m_dependentCountAndFlags.fetch_add(1, AZStd::memory_order_acq_rel);
-#endif
- }
-
- inline void Job::IncrementDependentCountAndSetChildFlag()
- {
- AZ_Assert(GetDependentCount() < FLAG_DEPENDENTCOUNT_MASK, "Dependent count overflow");
-#ifdef AZCORE_JOBS_IMPL_SYNCHRONOUS
- int oldCount = m_dependentCountAndFlags & FLAG_DEPENDENTCOUNT_MASK;
- m_dependentCountAndFlags = (m_dependentCountAndFlags & ~FLAG_DEPENDENTCOUNT_MASK) | (oldCount + 1) | FLAG_CHILD_JOBS;
-#else
- //use a single atomic operation to increment the count and set the child flag if possible
- unsigned int oldCountAndFlags, newCountAndFlags;
- do
- {
- oldCountAndFlags = m_dependentCountAndFlags.load(AZStd::memory_order_acquire);
- int oldCount = oldCountAndFlags & FLAG_DEPENDENTCOUNT_MASK;
- newCountAndFlags = (oldCountAndFlags & ~FLAG_DEPENDENTCOUNT_MASK) | (oldCount + 1) | FLAG_CHILD_JOBS;
- } while (!m_dependentCountAndFlags.compare_exchange_weak(oldCountAndFlags, newCountAndFlags, AZStd::memory_order_acq_rel, AZStd::memory_order_acquire));
-#endif
- }
-
- inline void Job::DecrementDependentCount()
- {
#ifdef AZ_DEBUG_JOB_STATE
- AZ_Assert((m_state == STATE_SETUP) || (m_state == STATE_STARTED)
- || (m_state == STATE_PROCESSING) || (m_state == STATE_SUSPENDED), //child jobs
- "Job dependent count should not be decremented after job is already pending");
-#endif
- AZ_Assert(GetDependentCount() > 0, ("Job dependent count is already zero"));
-#ifdef AZCORE_JOBS_IMPL_SYNCHRONOUS
- unsigned int countAndFlags = m_dependentCountAndFlags--;
-#else
- unsigned int countAndFlags = m_dependentCountAndFlags.fetch_sub(1, AZStd::memory_order_acq_rel);
-#endif
- unsigned int count = countAndFlags & FLAG_DEPENDENTCOUNT_MASK;
- if (count == 1)
- {
- if (!(countAndFlags & FLAG_CHILD_JOBS))
- {
-#ifdef AZ_DEBUG_JOB_STATE
- AZ_Assert(m_state == STATE_STARTED, "Job has not been started but the dependent count is zero, must be a dependency error");
- SetState(STATE_PENDING);
-#endif
- m_context->GetJobManager().AddPendingJob(this);
- }
- }
- }
-
- inline AZ::s8 Job::GetPriority() const
- {
- return (GetDependentCountAndFlags() >> FLAG_PRIORITY_START_BIT) & 0xff;
- }
-
-#ifdef AZ_DEBUG_JOB_STATE
- AZ_FORCE_INLINE void Job::SetState(int state)
+ inline void Job::SetState(int state)
{
m_state = state;
}
#endif
-#ifdef AZCORE_JOBS_IMPL_SYNCHRONOUS
- AZ_FORCE_INLINE void Job::StoreDependent(Job* job)
- {
- m_dependent = job;
- }
- AZ_FORCE_INLINE Job* Job::GetDependent() const
- {
- return m_dependent;
- }
-
- AZ_FORCE_INLINE void Job::SetDependentCountAndFlags(unsigned int countAndFlags)
- {
- m_dependentCountAndFlags = countAndFlags;
- }
-
- AZ_FORCE_INLINE unsigned int Job::GetDependentCountAndFlags() const
- {
- return m_dependentCountAndFlags;
- }
-#else
- AZ_FORCE_INLINE void Job::StoreDependent(Job* job)
- {
- m_dependent.store(job, AZStd::memory_order_release);
- }
-
- AZ_FORCE_INLINE Job* Job::GetDependent() const
- {
- return m_dependent.load(AZStd::memory_order_acquire);
- }
-
- AZ_FORCE_INLINE void Job::SetDependentCountAndFlags(unsigned int countAndFlags)
- {
- m_dependentCountAndFlags.store(countAndFlags, AZStd::memory_order_release);
- }
-
- AZ_FORCE_INLINE unsigned int Job::GetDependentCountAndFlags() const
- {
- return m_dependentCountAndFlags.load(AZStd::memory_order_acquire);
- }
-#endif
}
-#endif
-#pragma once
+
diff --git a/Code/Framework/AzCore/AzCore/Serialization/AZStdContainers.inl b/Code/Framework/AzCore/AzCore/Serialization/AZStdContainers.inl
index 35a2d64c0d..9eb65dec76 100644
--- a/Code/Framework/AzCore/AzCore/Serialization/AZStdContainers.inl
+++ b/Code/Framework/AzCore/AzCore/Serialization/AZStdContainers.inl
@@ -42,8 +42,6 @@ namespace AZStd
class unordered_multiset;
template
class bitset;
- template*/ >
- class stack;
template
class intrusive_ptr;
diff --git a/Code/Framework/AzCore/AzCore/Serialization/EditContext.h b/Code/Framework/AzCore/AzCore/Serialization/EditContext.h
index 019683ee81..492550f266 100644
--- a/Code/Framework/AzCore/AzCore/Serialization/EditContext.h
+++ b/Code/Framework/AzCore/AzCore/Serialization/EditContext.h
@@ -236,6 +236,17 @@ namespace AZ
*/
ClassBuilder* ClassElement(Crc32 elementIdCrc, const char* description);
+
+ /**
+ * Declare element with attributes that belong to the class SerializeContext::Class, this is a logical structure, you can have one or more GroupElementToggles.
+ * T must be a boolean variable that will enable and disable each DataElement attached to this structure.
+ * \param description - Descriptive name of the field that will typically appear in a tooltip.
+ * \param memberVariable - reference to the member variable so we can bind to serialization data.
+ */
+ template
+ ClassBuilder* GroupElementToggle(const char* description, T memberVariable);
+
+
/**
* Declare element with an associated UI handler that does not represent a specific class member variable.
* \param uiId - name of a UI handler used to display the element
@@ -515,6 +526,15 @@ namespace AZ
return this;
}
+ //=========================================================================
+ // ClassElement
+ //=========================================================================
+ template
+ inline EditContext::ClassBuilder* EditContext::ClassBuilder::GroupElementToggle(const char* name, T memberVariable)
+ {
+ return DataElement(AZ::Edit::ClassElements::Group, memberVariable, name, name, "");
+ }
+
//=========================================================================
// UIElement
//=========================================================================
diff --git a/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryMergeUtils.cpp b/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryMergeUtils.cpp
index 74038c8aed..6b89b8c044 100644
--- a/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryMergeUtils.cpp
+++ b/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryMergeUtils.cpp
@@ -57,6 +57,7 @@ namespace AZ::Internal
// and avoid all this logic.
using namespace AZ::SettingsRegistryMergeUtils;
+ using FixedValueString = AZ::SettingsRegistryInterface::FixedValueString;
AZ::IO::FixedMaxPath engineRoot;
if (auto engineManifestPath = AZ::Utils::GetEngineManifestPath(); !engineManifestPath.empty())
@@ -72,45 +73,16 @@ namespace AZ::Internal
struct EngineInfo
{
AZ::IO::FixedMaxPath m_path;
- AZ::SettingsRegistryInterface::FixedValueString m_moniker;
+ FixedValueString m_moniker;
};
struct EnginePathsVisitor : public AZ::SettingsRegistryInterface::Visitor
{
void Visit(
- [[maybe_unused]] AZStd::string_view path, [[maybe_unused]] AZStd::string_view valueName,
+ [[maybe_unused]] AZStd::string_view path, AZStd::string_view valueName,
[[maybe_unused]] AZ::SettingsRegistryInterface::Type type, AZStd::string_view value) override
{
- m_enginePaths.emplace_back(EngineInfo{AZ::IO::FixedMaxPath{value}.LexicallyNormal(), {}});
- }
-
- AZ::SettingsRegistryInterface::VisitResponse Traverse(
- [[maybe_unused]] AZStd::string_view path, AZStd::string_view valueName,
- AZ::SettingsRegistryInterface::VisitAction action, AZ::SettingsRegistryInterface::Type type) override
- {
- auto response = AZ::SettingsRegistryInterface::VisitResponse::Continue;
- if (action == AZ::SettingsRegistryInterface::VisitAction::Begin)
- {
- if (type == AZ::SettingsRegistryInterface::Type::Array)
- {
- if (valueName.compare("engines") != 0)
- {
- response = AZ::SettingsRegistryInterface::VisitResponse::Skip;
- }
- }
- }
- else if (action == AZ::SettingsRegistryInterface::VisitAction::Value)
- {
- if (type == AZ::SettingsRegistryInterface::Type::String)
- {
- if (valueName.compare("path") != 0)
- {
- response = AZ::SettingsRegistryInterface::VisitResponse::Skip;
- }
- }
- }
-
- return response;
+ m_enginePaths.emplace_back(EngineInfo{ AZ::IO::FixedMaxPath{value}.LexicallyNormal(), FixedValueString{valueName} });
}
AZStd::vector m_enginePaths{};
@@ -119,11 +91,11 @@ namespace AZ::Internal
EnginePathsVisitor pathVisitor;
if (manifestLoaded)
{
- auto enginePathsKey = AZ::SettingsRegistryInterface::FixedValueString::format("%s/engines", EngineManifestRootKey);
+ auto enginePathsKey = FixedValueString::format("%s/engines_path", EngineManifestRootKey);
settingsRegistry.Visit(pathVisitor, enginePathsKey);
}
- const auto engineMonikerKey = AZ::SettingsRegistryInterface::FixedValueString::format("%s/engine_name", EngineSettingsRootKey);
+ const auto engineMonikerKey = FixedValueString::format("%s/engine_name", EngineSettingsRootKey);
AZStd::set projectPathsNotFound;
@@ -135,7 +107,15 @@ namespace AZ::Internal
if (settingsRegistry.MergeSettingsFile(
engineSettingsPath.Native(), AZ::SettingsRegistryInterface::Format::JsonMergePatch, EngineSettingsRootKey))
{
- settingsRegistry.Get(engineInfo.m_moniker, engineMonikerKey);
+ FixedValueString engineName;
+ settingsRegistry.Get(engineName, engineMonikerKey);
+ AZ_Warning("SettingsRegistryMergeUtils",engineInfo.m_moniker == engineName,
+ R"(The engine name key "%s" mapped to engine path "%s" within the global manifest of "%s")"
+ R"( does not match the "engine_name" field "%s" in the engine.json)" "\n"
+ "This engine should be re-registered.",
+ engineInfo.m_moniker.c_str(), engineInfo.m_path.c_str(), engineManifestPath.c_str(),
+ engineName.c_str())
+ engineInfo.m_moniker = engineName;
}
}
diff --git a/Code/Framework/AzCore/AzCore/azcore_files.cmake b/Code/Framework/AzCore/AzCore/azcore_files.cmake
index 667ae49387..e3d2987a3c 100644
--- a/Code/Framework/AzCore/AzCore/azcore_files.cmake
+++ b/Code/Framework/AzCore/AzCore/azcore_files.cmake
@@ -221,6 +221,7 @@ set(FILES
Jobs/Internal/JobManagerWorkStealing.cpp
Jobs/Internal/JobManagerWorkStealing.h
Jobs/Internal/JobNotify.h
+ Jobs/Job.cpp
Jobs/Job.h
Jobs/JobCancelGroup.h
Jobs/JobCompletion.h
diff --git a/Code/Framework/AzCore/AzCore/std/containers/queue.h b/Code/Framework/AzCore/AzCore/std/containers/queue.h
index f1df1dd787..8026ebe943 100644
--- a/Code/Framework/AzCore/AzCore/std/containers/queue.h
+++ b/Code/Framework/AzCore/AzCore/std/containers/queue.h
@@ -5,206 +5,17 @@
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
-#ifndef AZSTD_QUEUE_H
-#define AZSTD_QUEUE_H 1
+#pragma once
#include
#include
#include
+#include
namespace AZStd
{
- /**
- * FIFO queue complaint with \ref CStd (23.2.3.1)
- * The only extension we have is that we allow access
- * to the underlying container via: get_container function.
- * Check the queue \ref AZStdExamples.
- */
- template >
- class queue
- {
- enum
- {
- CONTAINER_VERSION = 1
- };
- public:
- typedef queue this_type;
- typedef Container container_type;
- typedef typename Container::value_type value_type;
- typedef typename Container::size_type size_type;
- typedef typename Container::reference reference;
- typedef typename Container::const_reference const_reference;
-
- AZ_FORCE_INLINE queue() {}
-
- AZ_FORCE_INLINE explicit queue(const container_type& container)
- : m_container(container) {}
- AZ_FORCE_INLINE bool empty() const { return m_container.empty(); }
- AZ_FORCE_INLINE size_type size() const { return m_container.size(); }
- AZ_FORCE_INLINE reference front() { return m_container.front(); }
- AZ_FORCE_INLINE const_reference front() const { return m_container.front(); }
- AZ_FORCE_INLINE reference back() { return m_container.back(); }
- AZ_FORCE_INLINE const_reference back() const { return m_container.back(); }
- AZ_FORCE_INLINE void push(const value_type& value) { m_container.push_back(value); }
- AZ_FORCE_INLINE void pop() { m_container.pop_front(); }
-
- AZ_FORCE_INLINE void push() { m_container.push_back(); }
-
- AZ_FORCE_INLINE queue(this_type&& rhs)
- : m_container(AZStd::move(rhs.m_container)) {}
- AZ_FORCE_INLINE explicit queue(Container&& container)
- : m_container(AZStd::move(container)) {}
- this_type& operator=(this_type&& rhs)
- {
- m_container = AZStd::move(rhs.m_container);
- return (*this);
- }
- void push(value_type&& value) { m_container.push_back(AZStd::move(value)); }
- template
- void emplace(Args&&... args) { m_container.emplace_back(AZStd::forward(args)...); }
- void swap(this_type& rhs) { AZStd::swap(m_container, rhs.m_container); }
-
- AZ_FORCE_INLINE Container& get_container() { return m_container; }
- AZ_FORCE_INLINE const Container& get_container() const { return m_container; }
-
- protected:
- Container m_container;
- };
-
- // queue TEMPLATE FUNCTIONS
- template
- AZ_FORCE_INLINE bool operator==(const AZStd::queue& left, const AZStd::queue& right)
- {
- return left.get_container() == right.get_container();
- }
-
- template
- AZ_FORCE_INLINE bool operator!=(const AZStd::queue& left, const AZStd::queue& right)
- {
- return left.get_container() != right.get_container();
- }
-
- /* template
- AZ_FORCE_INLINE bool operator<(const queue& left, const queue& right)
- {
- return left.get_container() < right.get_container();
- }
-
- template
- AZ_FORCE_INLINE bool operator>(const queue& left, const queue& right)
- {
- return left.get_container() > right.get_container();
- }
-
- template
- AZ_FORCE_INLINE operator<=(const queue& left, const queue& right)
- {
- return left.get_container() <= right.get_container();
- }
-
- template
- AZ_FORCE_INLINE bool operator>=(const queue& left, const queue& right)
- {
- return left.get_container() >= right.get_container();
- }*/
-
- /**
- * Priority queue is complaint with \ref CStd (23.2.3.2)
- * The only extension we have is that we allow access
- * to the underlying container via: get_container function.
- * Check the priority_queue \ref AZStdExamples.
- */
- template, class Predicate = AZStd::less >
- class priority_queue
- {
- enum
- {
- CONTAINER_VERSION = 1
- };
- public:
- typedef priority_queue this_type;
- typedef Container container_type;
- typedef typename Container::value_type value_type;
- typedef typename Container::size_type size_type;
- typedef typename Container::reference reference;
- typedef typename Container::const_reference const_reference;
-
- AZ_FORCE_INLINE priority_queue() {}
- AZ_FORCE_INLINE explicit priority_queue(const Predicate& comp)
- : m_comp(comp) {}
- AZ_FORCE_INLINE priority_queue(const Predicate& comp, const container_type& container)
- : m_container(container)
- , m_comp(comp)
- {
- // construct by copying specified container, comparator
- AZStd::make_heap(m_container.begin(), m_container.end(), comp);
- }
- template
- AZ_FORCE_INLINE priority_queue(InputIterator first, InputIterator last)
- : m_container(first, last)
- , m_comp()
- {
- AZStd::make_heap(m_container.begin(), m_container.end(), m_comp);
- }
-
- template
- AZ_FORCE_INLINE priority_queue(InputIterator first, InputIterator last, const Predicate& comp)
- : m_container(first, last)
- , m_comp(comp)
- { // construct by copying [_First, _Last), specified comparator
- AZStd::make_heap(m_container.begin(), m_container.end(), m_comp);
- }
-
- template
- AZ_FORCE_INLINE priority_queue(InputIterator first, InputIterator last, const Predicate& comp, const container_type& container)
- : m_container(container)
- , m_comp(comp)
- { // construct by copying [_First, _Last), container, and comparator
- m_container.insert(m_container.end(), first, last);
- AZStd::make_heap(m_container.begin(), m_container.end(), m_comp);
- }
-
- AZ_FORCE_INLINE bool empty() const { return m_container.empty(); }
- AZ_FORCE_INLINE size_type size() const { return m_container.size(); }
- AZ_FORCE_INLINE const_reference top() const { return m_container.front(); }
- AZ_FORCE_INLINE reference top() { return m_container.front(); }
- AZ_FORCE_INLINE void push(const value_type& value)
- {
- m_container.push_back(value);
- AZStd::push_heap(m_container.begin(), m_container.end(), m_comp);
- }
-
- AZ_FORCE_INLINE void pop()
- {
- AZStd::pop_heap(m_container.begin(), m_container.end(), m_comp);
- m_container.pop_back();
- }
-
- AZ_FORCE_INLINE priority_queue(this_type&& rhs)
- : m_container(AZStd::move(rhs.m_container))
- , m_comp(AZStd::move(rhs.m_comp)) {}
- AZ_FORCE_INLINE explicit priority_queue(const Predicate& pred, Container&& container)
- : m_container(AZStd::move(container))
- , m_comp(pred) {}
- this_type& operator=(this_type&& rhs)
- {
- m_container = AZStd::move(rhs.m_container);
- m_comp = AZStd::move(rhs.m_comp);
- return (*this);
- }
- void push(value_type&& value) { m_container.push_back(AZStd::move(value)); AZStd::push_heap(m_container.begin(), m_container.end(), m_comp); }
- template
- void emplace(Args&& args) { m_container.emplace_back(AZStd::forward(args)); AZStd::push_heap(m_container.begin(), m_container.end(), m_comp); }
- void swap(this_type& rhs) { AZStd::swap(m_container, rhs.m_container); AZStd::swap(m_comp, rhs.m_comp); }
-
- AZ_FORCE_INLINE Container& get_container() { return m_container; }
- AZ_FORCE_INLINE const Container& get_container() const { return m_container; }
-
- protected:
- Container m_container;
- Predicate m_comp;
- };
+ template>
+ using queue = std::queue;
+ template, class Compare = AZStd::less>
+ using priority_queue = std::priority_queue;
}
-
-#endif // AZSTD_QUEUE_H
-#pragma once
diff --git a/Code/Framework/AzCore/AzCore/std/containers/stack.h b/Code/Framework/AzCore/AzCore/std/containers/stack.h
index 715d46c933..aa0d62d105 100644
--- a/Code/Framework/AzCore/AzCore/std/containers/stack.h
+++ b/Code/Framework/AzCore/AzCore/std/containers/stack.h
@@ -5,103 +5,13 @@
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
-#ifndef AZSTD_STACK_H
-#define AZSTD_STACK_H 1
+#pragma once
#include
+#include
namespace AZStd
{
- /**
- * Stack container is complaint with \ref CStd (23.2.3.3)
- * The only extension we have is that we allow access
- * to the underlying container via: get_container function.
- * Check the stack \ref AZStdExamples.
- */
- template >
- class stack
- {
- enum
- {
- CONTAINER_VERSION = 1
- };
- public:
- typedef stack this_type;
- typedef Container container_type;
- typedef typename Container::value_type value_type;
- typedef typename Container::size_type size_type;
- typedef typename Container::reference reference;
- typedef typename Container::const_reference const_reference;
-
- AZ_FORCE_INLINE stack() {}
- AZ_FORCE_INLINE explicit stack(const container_type& container)
- : m_container(container) {}
- AZ_FORCE_INLINE bool empty() const { return m_container.empty(); }
- AZ_FORCE_INLINE size_type size() const { return m_container.size(); }
- AZ_FORCE_INLINE reference top() { return m_container.back(); }
- AZ_FORCE_INLINE const_reference top() const { return m_container.back(); }
- AZ_FORCE_INLINE reference back() { return m_container.back(); }
- AZ_FORCE_INLINE const_reference back() const { return m_container.back(); }
- AZ_FORCE_INLINE void push(const value_type& value) { m_container.push_back(value); }
- AZ_FORCE_INLINE void pop() { m_container.pop_back(); }
- AZ_FORCE_INLINE void push() { m_container.push_back(); }
-
- AZ_FORCE_INLINE stack(this_type&& rhs)
- : m_container(AZStd::move(rhs.m_container)) {}
- AZ_FORCE_INLINE explicit stack(Container&& container)
- : m_container(AZStd::move(container)) {}
- this_type& operator=(this_type&& rhs) { m_container = AZStd::move(rhs.m_container); return *this; }
- void push(value_type&& value) { m_container.push_back(AZStd::move(value)); }
- template
- void emplace(Args&& args) { m_container.emplace_back(AZStd::forward(args)); }
- void swap(this_type&& rhs) { m_container.swap(AZStd::move(rhs.m_container)); }
-
- void swap(this_type& rhs) { AZStd::swap(m_container, rhs.m_container); }
-
- AZ_FORCE_INLINE Container& get_container() { return m_container; }
- AZ_FORCE_INLINE const Container& get_container() const { return m_container; }
-
- protected:
- Container m_container;
- };
-
- // queue TEMPLATE FUNCTIONS
- template
- AZ_FORCE_INLINE bool operator==(const AZStd::stack& left, const AZStd::stack& right)
- {
- return left.get_container() == right.get_container();
- }
-
- template
- AZ_FORCE_INLINE bool operator!=(const AZStd::stack& left, const AZStd::stack& right)
- {
- return left.get_container() != right.get_container();
- }
-
- /* template
- AZ_FORCE_INLINE bool operator<(const queue& left, const queue& right)
- {
- return left.get_container() < right.get_container();
- }
-
- template
- AZ_FORCE_INLINE bool operator>(const queue& left, const queue& right)
- {
- return left.get_container() > right.get_container();
- }
-
- template
- AZ_FORCE_INLINE operator<=(const queue& left, const queue& right)
- {
- return left.get_container() <= right.get_container();
- }
-
- template
- AZ_FORCE_INLINE bool operator>=(const queue& left, const queue& right)
- {
- return left.get_container() >= right.get_container();
- }*/
+ template>
+ using stack = std::stack;
}
-
-#endif // AZSTD_STACK_H
-#pragma once
diff --git a/Code/Framework/AzCore/AzCore/std/hash.cpp b/Code/Framework/AzCore/AzCore/std/hash.cpp
index c2f7a104d4..b5277de2f4 100644
--- a/Code/Framework/AzCore/AzCore/std/hash.cpp
+++ b/Code/Framework/AzCore/AzCore/std/hash.cpp
@@ -21,6 +21,7 @@ namespace AZStd
1610612741ul, 3221225473ul, 4294967291ul
};
+ // Bucket size suitable to hold n elements.
AZStd::size_t hash_next_bucket_size(AZStd::size_t n)
{
const AZStd::size_t* first = prime_list;
diff --git a/Code/Framework/AzCore/AzCore/std/hash_table.h b/Code/Framework/AzCore/AzCore/std/hash_table.h
index 5b76b6cb82..c364720b3b 100644
--- a/Code/Framework/AzCore/AzCore/std/hash_table.h
+++ b/Code/Framework/AzCore/AzCore/std/hash_table.h
@@ -134,6 +134,7 @@ namespace AZStd
void rehash(HashTable* table, size_type numBucketsMin)
{
size_type num_buckets = 0;
+
numBucketsMin = (AZStd::max)(numBucketsMin, (size_type)ceilf((float)m_list.size() / m_max_load_factor));
if (numBucketsMin != 0)
@@ -143,7 +144,7 @@ namespace AZStd
if (num_buckets == m_numBuckets)
{
- return; // no point
+ return; // no need yet to rehash
}
m_numBuckets = num_buckets;
@@ -165,32 +166,43 @@ namespace AZStd
while (!m_list.empty())
{
cur = m_list.begin();
+ typename list_type::iterator insertIter, curEnd(cur);
+ const typename HashTable::key_type& valueKey = Traits::key_from_value(*cur);
- typename list_type::iterator newIter, iter(cur);
size_type numValues = 1;
- for (++iter; iter != last && table->m_keyEqual(Traits::key_from_value(*cur), Traits::key_from_value(*iter)); ++iter, ++numValues)
+ // Get the number of same consecutive elements in the table with same key,
+ // this allows range insertion of elements at once
+ for (++curEnd; curEnd != last && table->m_keyEqual(valueKey, Traits::key_from_value(*curEnd)); ++curEnd, ++numValues)
{
}
- ;
- const typename HashTable::key_type& valueKey = Traits::key_from_value(*cur);
size_type newBucketIndex = table->bucket_from_hash(table->m_hasher(valueKey));
+
+ // newBucket.first holds the total number of elements in the bucket
+ // newBucket.second contains the pointer to the first element in the bucket
vector_value_type& newBucket = newBuckets[newBucketIndex];
size_type numElements = newBucket.first;
- newIter = newBucket.second;
+ insertIter = newBucket.second;
+
+ // If we don't have elements in the bucket yet, transfer the elements directly
if (numElements == 0)
{
- newList.splice(newList.begin(), m_list, cur, iter);
+ newList.splice(newList.begin(), m_list, cur, curEnd);
newBucket.second = newList.begin();
}
else
{
- if (!table->find_insert_position(valueKey, table->m_keyEqual, newIter, numElements, integral_constant()))
+ // Since there are elements already in the bucket, update `insertIter` to where the elements will need to be inserted.
+ if (!table->find_insert_position(valueKey, table->m_keyEqual, insertIter, numElements, integral_constant()))
{
- continue;
+ // An element was found but we don't allow for duplicate elements in this table.
+ // This happens when there was an insertion of two elements that are equal but have different hashes,
+ // which is undefined behavior for a hash table: ISO C++ N4713, section 23.14.15 - 5.3
+ AZ_Assert(false, "Found a duplicate element when rehashing. "
+ "Review the hashing function for this type and make sure two equal elements always have the same hash");
}
- newList.splice(newIter, m_list, cur, iter);
+ newList.splice(insertIter, m_list, cur, curEnd);
}
newBucket.first += numValues;
@@ -251,15 +263,15 @@ namespace AZStd
m_vector.set_allocator(typename vector_type::allocator_type(&m_allocator));
}
- allocator_type m_allocator; ///< The single instance of the allocator shared between list and vector containers.
- list_type m_list; ///< List with elements.
- vector_type m_vector; ///< Buckets with list iterators.
+ allocator_type m_allocator; //!< The single instance of the allocator shared between list and vector containers.
+ list_type m_list; //!< List with elements.
+ vector_type m_vector; //!< Buckets with list iterators.
private:
- vector_value_type* m_buckets; ///< Current buckets array. (can point to the m_vector or m_startBucket).
- size_type m_numBuckets; ///< Current number of buckets.
- float m_max_load_factor;
- vector_value_type m_startBucket; ///< Start bucket used for before we start dynamically allocate memory from m_vector.
+ vector_value_type* m_buckets; //!< Current buckets array. (can point to the m_vector or m_startBucket).
+ size_type m_numBuckets; //!< Current number of buckets.
+ float m_max_load_factor; //!< Maximum load (elements/buckets) before rehashing.
+ vector_value_type m_startBucket; //!< Start bucket used for before we start dynamically allocate memory from m_vector.
};
/**
@@ -321,8 +333,8 @@ namespace AZStd
template
AZ_FORCE_INLINE void rehash(HashTable*, size_type) {}
- vector_type m_vector; ///< Buckets with list iterators.
- list_type m_list; ///< List with elements.
+ vector_type m_vector; //!< Buckets with list iterators.
+ list_type m_list; //!< List with elements.
};
}
@@ -972,28 +984,32 @@ namespace AZStd
rhs.clear();
}
+ // find_insert_position sets insertIter to where the element should be inserted
+ // and returns true if the element should be inserted, otherwise false
template
- bool find_insert_position(const ComparableToKey& keyCmp, const KeyEq& keyEq, iterator& iter, size_type numElements, const true_type& /* is multi elements */)
+ bool find_insert_position(const ComparableToKey& keyCmp, const KeyEq& keyEq, iterator& insertIter, size_type numElements, const true_type& /* is multi elements */)
{
- for (size_type i = 0; i < numElements; ++i, ++iter)
+ for (size_type i = 0; i < numElements; ++i, ++insertIter)
{
- if (keyEq(keyCmp, Traits::key_from_value(*iter)))
+ if (keyEq(keyCmp, Traits::key_from_value(*insertIter)))
{
- ++iter;
+ ++insertIter;
break;
}
}
+ // always return true since multi elements (like multiset) allow repeated elements
return true;
}
template
- bool find_insert_position(const ComparableToKey& keyCmp, const KeyEq& keyEq, iterator& iter, size_type numElements, const false_type& /* !is multi elements */)
+ bool find_insert_position(const ComparableToKey& keyCmp, const KeyEq& keyEq, iterator& insertIter, size_type numElements, const false_type& /* !is multi elements */)
{
- for (size_type i = 0; i < numElements; ++i, ++iter)
+ for (size_type i = 0; i < numElements; ++i, ++insertIter)
{
- if (keyEq(keyCmp, Traits::key_from_value(*iter)))
+ if (keyEq(keyCmp, Traits::key_from_value(*insertIter)))
{
+ // Element already exists, it shouldn't be inserted as we don't allow more than one repeated element for this specialization
return false;
}
}
diff --git a/Code/Framework/AzCore/Tests/AZStd/DequeAndSimilar.cpp b/Code/Framework/AzCore/Tests/AZStd/DequeAndSimilar.cpp
index 587d900b90..33a5d29b4f 100644
--- a/Code/Framework/AzCore/Tests/AZStd/DequeAndSimilar.cpp
+++ b/Code/Framework/AzCore/Tests/AZStd/DequeAndSimilar.cpp
@@ -298,7 +298,7 @@ namespace UnitTest
AZ_TEST_ASSERT(int_queue.empty());
AZ_TEST_ASSERT(int_queue.size() == 0);
- // Queue uses deque as default container, so try to contruct to queue from a deque.
+ // Queue uses deque as default container, so try to construct to queue from a deque.
deque container(40, 10);
int_queue_type int_queue2(container);
AZ_TEST_ASSERT(!int_queue2.empty());
@@ -324,7 +324,7 @@ namespace UnitTest
AZ_TEST_ASSERT(int_queue2.size() == 40);
AZ_TEST_ASSERT(int_queue2.back() == 20);
- int_queue.push();
+ int_queue.emplace();
AZ_TEST_ASSERT(!int_queue.empty());
AZ_TEST_ASSERT(int_queue.size() == 1);
@@ -423,7 +423,7 @@ namespace UnitTest
AZ_TEST_ASSERT(int_stack2.size() == 40);
AZ_TEST_ASSERT(int_stack2.top() == 10);
- int_stack.push();
+ int_stack.emplace();
AZ_TEST_ASSERT(!int_stack.empty());
AZ_TEST_ASSERT(int_stack.size() == 1);
// StackContainerTest-End
@@ -669,4 +669,19 @@ namespace UnitTest
++iteration;
}
}
+
+ using StackContainerTestFixture = ScopedAllocatorSetupFixture;
+
+ TEST_F(StackContainerTestFixture, StackEmplaceOperator_SupportsZeroOrMoreArguments)
+ {
+ using TestPairType = AZStd::pair;
+ AZStd::stack testStack;
+ testStack.emplace();
+ testStack.emplace(1);
+ testStack.emplace(2, 3);
+
+ using ContainerType = typename AZStd::stack::container_type;
+ AZStd::stack expectedStack(ContainerType{ TestPairType{ 0, 0 }, TestPairType{ 1, 0 }, TestPairType{ 2, 3 } });
+ EXPECT_EQ(expectedStack, testStack);
+ }
}
diff --git a/Code/Framework/AzCore/Tests/AZStd/Hashed.cpp b/Code/Framework/AzCore/Tests/AZStd/Hashed.cpp
index f2558289ea..4e4dfc1f89 100644
--- a/Code/Framework/AzCore/Tests/AZStd/Hashed.cpp
+++ b/Code/Framework/AzCore/Tests/AZStd/Hashed.cpp
@@ -287,6 +287,55 @@ namespace UnitTest
}
}
+ TEST_F(HashedContainers, HashTable_InsertionDuplicateOnRehash)
+ {
+ struct TwoPtrs
+ {
+ void* m_ptr1;
+ void* m_ptr2;
+
+ bool operator==(const TwoPtrs& other) const
+ {
+ if (m_ptr1 == other.m_ptr1)
+ {
+ return m_ptr2 == other.m_ptr2;
+ }
+ else if (m_ptr1 == other.m_ptr2)
+ {
+ return m_ptr2 == other.m_ptr1;
+ }
+ return false;
+ }
+ };
+
+ // This hashing function produces different hashes for two equal values,
+ // which violates the requirement for hashing functions.
+ // The test makes sure that this does not reproduce an issue that caused the insert() function to loop infinitely.
+ struct TwoPtrsHasher
+ {
+ size_t operator()(const TwoPtrs& p) const
+ {
+ size_t hash{ 0 };
+ AZStd::hash_combine(hash, p.m_ptr1, p.m_ptr2);
+ return hash;
+ }
+ };
+ using PairSet = AZStd::unordered_set;
+ PairSet set;
+ set.insert({ (void*)1, (void*)2 });
+ set.insert({ (void*)3, (void*)4 });
+ set.insert({ (void*)5, (void*)6 });
+ set.insert({ (void*)7, (void*)8 });
+ // Elements with different hashes, but equal
+ set.insert({ (void*)0x000001ceddd9ca20, (void*)0x000001ceddd9cba0 }); // hash(148335135725641)
+ set.insert({ (void*)0x000001ceddd9cba0, (void*)0x000001ceddd9ca20 }); // hash(148335135764189)
+ AZ_TEST_START_TRACE_SUPPRESSION;
+ // This will trigger the assertion of duplicated elements found
+ // A bucket size of 23 since is where the collision between different hashes happens
+ set.rehash(23);
+ AZ_TEST_STOP_TRACE_SUPPRESSION(1); // 1 assertion
+ }
+
TEST_F(HashedContainers, HashTable_Fixed)
{
array elements = {
diff --git a/Code/Framework/AzCore/Tests/Asset/AssetManagerLoadingTests.cpp b/Code/Framework/AzCore/Tests/Asset/AssetManagerLoadingTests.cpp
index 156719b8a7..e25c3dbcf7 100644
--- a/Code/Framework/AzCore/Tests/Asset/AssetManagerLoadingTests.cpp
+++ b/Code/Framework/AzCore/Tests/Asset/AssetManagerLoadingTests.cpp
@@ -1150,7 +1150,7 @@ namespace UnitTest
#if AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS
TEST_F(AssetJobsFloodTest, DISABLED_ContainerFilterTest_ContainersWithAndWithoutFiltering_Success)
#else
- TEST_F(AssetJobsFloodTest, ContainerFilterTest_ContainersWithAndWithoutFiltering_Success)
+ TEST_F(AssetJobsFloodTest, DISABLED_ContainerFilterTest_ContainersWithAndWithoutFiltering_Success)
#endif // !AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS
{
m_assetHandlerAndCatalog->AssetCatalogRequestBus::Handler::BusConnect();
diff --git a/Code/Framework/AzFramework/AzFramework/Physics/Configuration/RigidBodyConfiguration.cpp b/Code/Framework/AzFramework/AzFramework/Physics/Configuration/RigidBodyConfiguration.cpp
index a61f6a4845..cfea76f1d7 100644
--- a/Code/Framework/AzFramework/AzFramework/Physics/Configuration/RigidBodyConfiguration.cpp
+++ b/Code/Framework/AzFramework/AzFramework/Physics/Configuration/RigidBodyConfiguration.cpp
@@ -123,6 +123,12 @@ namespace AzPhysics
->Field("Kinematic", &RigidBodyConfiguration::m_kinematic)
->Field("CCD Enabled", &RigidBodyConfiguration::m_ccdEnabled)
->Field("Compute Mass", &RigidBodyConfiguration::m_computeMass)
+ ->Field("Lock Linear X", &RigidBodyConfiguration::m_lockLinearX)
+ ->Field("Lock Linear Y", &RigidBodyConfiguration::m_lockLinearY)
+ ->Field("Lock Linear Z", &RigidBodyConfiguration::m_lockLinearZ)
+ ->Field("Lock Angular X", &RigidBodyConfiguration::m_lockAngularX)
+ ->Field("Lock Angular Y", &RigidBodyConfiguration::m_lockAngularY)
+ ->Field("Lock Angular Z", &RigidBodyConfiguration::m_lockAngularZ)
->Field("Mass", &RigidBodyConfiguration::m_mass)
->Field("Compute COM", &RigidBodyConfiguration::m_computeCenterOfMass)
->Field("Centre of mass offset", &RigidBodyConfiguration::m_centerOfMassOffset)
diff --git a/Code/Framework/AzFramework/AzFramework/Physics/Configuration/RigidBodyConfiguration.h b/Code/Framework/AzFramework/AzFramework/Physics/Configuration/RigidBodyConfiguration.h
index 59829e740c..51dcce842d 100644
--- a/Code/Framework/AzFramework/AzFramework/Physics/Configuration/RigidBodyConfiguration.h
+++ b/Code/Framework/AzFramework/AzFramework/Physics/Configuration/RigidBodyConfiguration.h
@@ -62,6 +62,16 @@ namespace AzPhysics
bool m_computeInertiaTensor = true;
bool m_computeMass = true;
+ // Flags to restrict motion along specific world-space axes.
+ bool m_lockLinearX = false;
+ bool m_lockLinearY = false;
+ bool m_lockLinearZ = false;
+
+ // Flags to restrict rotation around specific world-space axes.
+ bool m_lockAngularX = false;
+ bool m_lockAngularY = false;
+ bool m_lockAngularZ = false;
+
//! If set, non-simulated shapes will also be included in the mass properties calculation.
bool m_includeAllShapesInMassCalculation = false;
diff --git a/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesInterface.cpp b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesInterface.cpp
index 87353c5807..617eb3a0b9 100644
--- a/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesInterface.cpp
+++ b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesInterface.cpp
@@ -227,8 +227,10 @@ namespace AzFramework
EntitySpawnTicket::EntitySpawnTicket(EntitySpawnTicket&& rhs)
: m_payload(rhs.m_payload)
+ , m_id(rhs.m_id)
{
rhs.m_payload = nullptr;
+ rhs.m_id = 0;
}
EntitySpawnTicket::EntitySpawnTicket(AZ::Data::Asset spawnable)
diff --git a/Code/Framework/AzFramework/AzFramework/UnitTest/TestDebugDisplayRequests.cpp b/Code/Framework/AzFramework/AzFramework/UnitTest/TestDebugDisplayRequests.cpp
index cc663f36b8..ecbacd125b 100644
--- a/Code/Framework/AzFramework/AzFramework/UnitTest/TestDebugDisplayRequests.cpp
+++ b/Code/Framework/AzFramework/AzFramework/UnitTest/TestDebugDisplayRequests.cpp
@@ -32,7 +32,7 @@ namespace UnitTest
void TestDebugDisplayRequests::DrawWireBox(const AZ::Vector3& min, const AZ::Vector3& max)
{
- const AZ::Transform& tm = m_transforms.back();
+ const AZ::Transform& tm = m_transforms.top();
m_points.push_back(tm.TransformPoint(AZ::Vector3(min.GetX(), min.GetY(), min.GetZ())));
m_points.push_back(tm.TransformPoint(AZ::Vector3(min.GetX(), min.GetY(), max.GetZ())));
m_points.push_back(tm.TransformPoint(AZ::Vector3(min.GetX(), max.GetY(), min.GetZ())));
@@ -50,7 +50,7 @@ namespace UnitTest
void TestDebugDisplayRequests::DrawWireQuad(float width, float height)
{
- const AZ::Transform& tm = m_transforms.back();
+ const AZ::Transform& tm = m_transforms.top();
m_points.push_back(tm.TransformPoint(AZ::Vector3(-0.5f * width, 0.0f, -0.5f * height)));
m_points.push_back(tm.TransformPoint(AZ::Vector3(-0.5f * width, 0.0f, 0.5f * height)));
m_points.push_back(tm.TransformPoint(AZ::Vector3(0.5f * width, 0.0f, -0.5f * height)));
@@ -64,7 +64,7 @@ namespace UnitTest
void TestDebugDisplayRequests::DrawPoints(const AZStd::vector& points)
{
- const AZ::Transform& tm = m_transforms.back();
+ const AZ::Transform& tm = m_transforms.top();
for (const auto& point : points)
{
m_points.push_back(tm.TransformPoint(point));
@@ -100,7 +100,7 @@ namespace UnitTest
void TestDebugDisplayRequests::PushMatrix(const AZ::Transform& tm)
{
- m_transforms.push(m_transforms.back() * tm);
+ m_transforms.push(m_transforms.top() * tm);
}
void TestDebugDisplayRequests::PopMatrix()
diff --git a/Code/Framework/AzFramework/AzFramework/Visibility/OctreeSystemComponent.cpp b/Code/Framework/AzFramework/AzFramework/Visibility/OctreeSystemComponent.cpp
index 5ef1cda30e..b4cad8511f 100644
--- a/Code/Framework/AzFramework/AzFramework/Visibility/OctreeSystemComponent.cpp
+++ b/Code/Framework/AzFramework/AzFramework/Visibility/OctreeSystemComponent.cpp
@@ -481,7 +481,7 @@ namespace AzFramework
if (!m_freeOctreeNodes.empty())
{
// Take a free block of child nodes from our free list
- ExtractPageAndOffsetFromIndex(m_freeOctreeNodes.back(), nextChildPage, nextChildOffset);
+ ExtractPageAndOffsetFromIndex(m_freeOctreeNodes.top(), nextChildPage, nextChildOffset);
m_freeOctreeNodes.pop();
}
else
diff --git a/Code/Framework/AzFramework/Platform/Linux/AzFramework/API/ApplicationAPI_Linux.h b/Code/Framework/AzFramework/Platform/Linux/AzFramework/API/ApplicationAPI_Linux.h
index 03c65ce0c3..9b57d1d49e 100644
--- a/Code/Framework/AzFramework/Platform/Linux/AzFramework/API/ApplicationAPI_Linux.h
+++ b/Code/Framework/AzFramework/Platform/Linux/AzFramework/API/ApplicationAPI_Linux.h
@@ -35,7 +35,7 @@ namespace AzFramework
class LinuxXcbConnectionManager
{
public:
- AZ_RTTI(LinuxXcbConnectionManager, "{649951316-3626-4C9D-9DCA-2E7ABF84C0A9}");
+ AZ_RTTI(LinuxXcbConnectionManager, "{1F756E14-8D74-42FD-843C-4863307710DB}");
virtual ~LinuxXcbConnectionManager() = default;
diff --git a/Code/Framework/AzFramework/Tests/Spawnable/SpawnableEntitiesManagerTests.cpp b/Code/Framework/AzFramework/Tests/Spawnable/SpawnableEntitiesManagerTests.cpp
index 7eff4b5eeb..f68af08f4a 100644
--- a/Code/Framework/AzFramework/Tests/Spawnable/SpawnableEntitiesManagerTests.cpp
+++ b/Code/Framework/AzFramework/Tests/Spawnable/SpawnableEntitiesManagerTests.cpp
@@ -366,6 +366,24 @@ namespace UnitTest
}
}
+ TEST_F(SpawnableEntitiesManagerTest, EntitySpawnTicket_Move_Works)
+ {
+ AzFramework::EntitySpawnTicket ticket1(*m_spawnableAsset);
+ AzFramework::EntitySpawnTicket ticket2(*m_spawnableAsset);
+
+ const AzFramework::EntitySpawnTicket::Id ticket1Id = ticket1.GetId();
+ const AzFramework::EntitySpawnTicket::Id ticket2Id = ticket2.GetId();
+
+ AzFramework::EntitySpawnTicket ticketMoveConstructor(AZStd::move(ticket1));
+ EXPECT_TRUE(ticketMoveConstructor.IsValid());
+ EXPECT_EQ(ticketMoveConstructor.GetId(), ticket1Id);
+
+ AzFramework::EntitySpawnTicket ticketMoveOperator;
+ ticketMoveOperator = AZStd::move(ticket2);
+ EXPECT_TRUE(ticketMoveOperator.IsValid());
+ EXPECT_EQ(ticketMoveOperator.GetId(), ticket2Id);
+ }
+
TEST_F(SpawnableEntitiesManagerTest, SpawnAllEntities_DeleteTicketBeforeCall_NoCrash)
{
{
diff --git a/Code/Framework/AzNetworking/AzNetworking/Framework/INetworkInterface.h b/Code/Framework/AzNetworking/AzNetworking/Framework/INetworkInterface.h
index d47f76ceb8..09aa62f7d7 100644
--- a/Code/Framework/AzNetworking/AzNetworking/Framework/INetworkInterface.h
+++ b/Code/Framework/AzNetworking/AzNetworking/Framework/INetworkInterface.h
@@ -103,6 +103,14 @@ namespace AzNetworking
//! @return boolean true on success
virtual bool Disconnect(ConnectionId connectionId, DisconnectReason reason) = 0;
+ //! Sets whether this connection interface can disconnect by virtue of a timeout
+ //! @param timeoutEnabled If this connection interface will automatically disconnect due to a timeout
+ virtual void SetTimeoutEnabled(bool timeoutEnabled) = 0;
+
+ //! Whether this connection interface will disconnect by virtue of a time out (does not account for cvars affecting all connections)
+ //! @return boolean true if this connection will not disconnect on timeout (does not account for cvars affecting all connections)
+ virtual bool IsTimeoutEnabled() const = 0;
+
//! Const access to the metrics tracked by this network interface.
//! @return const reference to the metrics tracked by this network interface
const NetworkInterfaceMetrics& GetMetrics() const;
diff --git a/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpNetworkInterface.cpp b/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpNetworkInterface.cpp
index f9569b5c7e..62335a9b39 100644
--- a/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpNetworkInterface.cpp
+++ b/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpNetworkInterface.cpp
@@ -174,6 +174,16 @@ namespace AzNetworking
return connection->Disconnect(reason, TerminationEndpoint::Local);
}
+ void TcpNetworkInterface::SetTimeoutEnabled(bool timeoutEnabled)
+ {
+ m_timeoutEnabled = timeoutEnabled;
+ }
+
+ bool TcpNetworkInterface::IsTimeoutEnabled() const
+ {
+ return m_timeoutEnabled;
+ }
+
void TcpNetworkInterface::QueueNewConnection(const PendingConnection& pendingConnection)
{
m_pendingConnections.PushBackItem(pendingConnection);
@@ -306,7 +316,7 @@ namespace AzNetworking
{
tcpConnection->SendReliablePacket(CorePackets::HeartbeatPacket());
}
- else if (net_TcpTimeoutConnections)
+ else if (net_TcpTimeoutConnections && m_networkInterface.IsTimeoutEnabled())
{
tcpConnection->Disconnect(DisconnectReason::Timeout, TerminationEndpoint::Local);
return TimeoutResult::Delete;
diff --git a/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpNetworkInterface.h b/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpNetworkInterface.h
index 1d590da2aa..b9ea88974d 100644
--- a/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpNetworkInterface.h
+++ b/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpNetworkInterface.h
@@ -99,6 +99,8 @@ namespace AzNetworking
bool WasPacketAcked(ConnectionId connectionId, PacketId packetId) override;
bool StopListening() override;
bool Disconnect(ConnectionId connectionId, DisconnectReason reason) override;
+ void SetTimeoutEnabled(bool timeoutEnabled) override;
+ bool IsTimeoutEnabled() const override;
//! @}
//! Queues a new incoming connection for this network interface.
@@ -154,6 +156,7 @@ namespace AzNetworking
AZ::Name m_name;
TrustZone m_trustZone;
uint16_t m_port = 0;
+ bool m_timeoutEnabled = true;
IConnectionListener& m_connectionListener;
TcpConnectionSet m_connectionSet;
TcpSocketManager m_tcpSocketManager;
diff --git a/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpNetworkInterface.cpp b/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpNetworkInterface.cpp
index a3ddb856d2..48b3ad57e1 100644
--- a/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpNetworkInterface.cpp
+++ b/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpNetworkInterface.cpp
@@ -397,6 +397,16 @@ namespace AzNetworking
return connection->Disconnect(reason, TerminationEndpoint::Local);
}
+ void UdpNetworkInterface::SetTimeoutEnabled(bool timeoutEnabled)
+ {
+ m_timeoutEnabled = timeoutEnabled;
+ }
+
+ bool UdpNetworkInterface::IsTimeoutEnabled() const
+ {
+ return m_timeoutEnabled;
+ }
+
bool UdpNetworkInterface::IsEncrypted() const
{
return m_socket->IsEncrypted();
@@ -729,7 +739,7 @@ namespace AzNetworking
{
udpConnection->SendUnreliablePacket(CorePackets::HeartbeatPacket());
}
- else if (net_UdpTimeoutConnections)
+ else if (net_UdpTimeoutConnections && m_networkInterface.IsTimeoutEnabled())
{
udpConnection->Disconnect(DisconnectReason::Timeout, TerminationEndpoint::Local);
return TimeoutResult::Delete;
diff --git a/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpNetworkInterface.h b/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpNetworkInterface.h
index 7a391c152e..949914da91 100644
--- a/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpNetworkInterface.h
+++ b/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpNetworkInterface.h
@@ -104,6 +104,8 @@ namespace AzNetworking
bool WasPacketAcked(ConnectionId connectionId, PacketId packetId) override;
bool StopListening() override;
bool Disconnect(ConnectionId connectionId, DisconnectReason reason) override;
+ void SetTimeoutEnabled(bool timeoutEnabled) override;
+ bool IsTimeoutEnabled() const override;
//! @}
//! Returns true if this is an encrypted socket, false if not.
@@ -179,6 +181,7 @@ namespace AzNetworking
TrustZone m_trustZone;
uint16_t m_port = 0;
bool m_allowIncomingConnections = false;
+ bool m_timeoutEnabled = true;
IConnectionListener& m_connectionListener;
UdpConnectionSet m_connectionSet;
TimeoutQueue m_connectionTimeoutQueue;
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipService.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipService.cpp
index 2d97689610..b5cf5fb878 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipService.cpp
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipService.cpp
@@ -72,15 +72,8 @@ namespace AzToolsFramework
if (m_rootInstance != nullptr)
{
- // Need to save off the template id to remove the template after the instance is deleted.
- Prefab::TemplateId templateId = m_rootInstance->GetTemplateId();
m_rootInstance.reset();
- if (templateId != Prefab::InvalidTemplateId)
- {
- // Remove the template here so that if we're in a Deactivate/Activate cycle, it can recreate the template/rootInstance
- // correctly
- m_prefabSystemComponent->RemoveTemplate(templateId);
- }
+ m_prefabSystemComponent->RemoveAllTemplates();
}
}
@@ -95,7 +88,7 @@ namespace AzToolsFramework
if (templateId != Prefab::InvalidTemplateId)
{
m_rootInstance->SetTemplateId(Prefab::InvalidTemplateId);
- m_prefabSystemComponent->RemoveTemplate(templateId);
+ m_prefabSystemComponent->RemoveAllTemplates();
}
m_rootInstance->SetContainerEntityName("Level");
}
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Instance/InstanceToTemplatePropagator.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Instance/InstanceToTemplatePropagator.cpp
index c7bf72ff7b..8f93ebb6df 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Instance/InstanceToTemplatePropagator.cpp
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Instance/InstanceToTemplatePropagator.cpp
@@ -177,7 +177,7 @@ namespace AzToolsFramework
PrefabDomUtils::ApplyPatches(templateDomReference, templateDomReference.GetAllocator(), providedPatch);
//trigger propagation
- if (result.GetOutcome() != AZ::JsonSerializationResult::Outcomes::Success)
+ if (result.GetProcessing() != AZ::JsonSerializationResult::Processing::Completed)
{
AZ_Error("Prefab", false, "Patch was not successfully applied.");
return false;
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp
index 16db933192..a03e48062c 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp
@@ -90,10 +90,11 @@ namespace AzToolsFramework
AZStd::unordered_map nestedInstanceLinkPatchesMap;
// Retrieve all entities affected and identify Instances
- if (!RetrieveAndSortPrefabEntitiesAndInstances(inputEntityList, commonRootEntityOwningInstance->get(), entities, instances))
+ PrefabOperationResult retrieveEntitiesAndInstancesOutcome = RetrieveAndSortPrefabEntitiesAndInstances(
+ inputEntityList, commonRootEntityOwningInstance->get(), entities, instances);
+ if (!retrieveEntitiesAndInstancesOutcome.IsSuccess())
{
- return AZ::Failure(
- AZStd::string("Could not create a new prefab out of the entities provided - invalid selection."));
+ return retrieveEntitiesAndInstancesOutcome;
}
AZStd::unordered_map oldEntityAliases;
@@ -646,7 +647,12 @@ namespace AzToolsFramework
{
// Retrieve all nested instances that are part of the subtree under the current entity.
EntityList entities;
- RetrieveAndSortPrefabEntitiesAndInstances({ entity }, beforeOwningInstance->get(), entities, instancesInvolved);
+ PrefabOperationResult retrieveEntitiesAndInstancesOutcome = RetrieveAndSortPrefabEntitiesAndInstances(
+ { entity }, beforeOwningInstance->get(), entities, instancesInvolved);
+ if (!retrieveEntitiesAndInstancesOutcome.IsSuccess())
+ {
+ return retrieveEntitiesAndInstancesOutcome;
+ }
}
for (Instance* instance : instancesInvolved)
@@ -748,7 +754,9 @@ namespace AzToolsFramework
AZStd::vector instances;
// Retrieve all descendant entities and instances of this entity that belonged to the same owning instance.
- RetrieveAndSortPrefabEntitiesAndInstances({ entity }, beforeOwningInstance->get(), entities, instances);
+ PrefabOperationResult retrieveEntitiesAndInstancesOutcome = RetrieveAndSortPrefabEntitiesAndInstances(
+ { entity }, beforeOwningInstance->get(), entities, instances);
+ AZ_Error("Prefab", retrieveEntitiesAndInstancesOutcome.IsSuccess(), retrieveEntitiesAndInstancesOutcome.GetError().data());
AZStd::vector> instanceUniquePtrs;
AZStd::vector> instancePatches;
@@ -981,11 +989,12 @@ namespace AzToolsFramework
AZStd::vector instances;
EntityList inputEntityList = EntityIdSetToEntityList(duplicationSet);
- bool success = RetrieveAndSortPrefabEntitiesAndInstances(inputEntityList, commonOwningInstance->get(), entities, instances);
+ PrefabOperationResult retrieveEntitiesAndInstancesOutcome =
+ RetrieveAndSortPrefabEntitiesAndInstances(inputEntityList, commonOwningInstance->get(), entities, instances);
- if (!success)
+ if (!retrieveEntitiesAndInstancesOutcome.IsSuccess())
{
- return AZ::Failure(AZStd::string("Failed to retrieve entities and instances from the given list of entity ids for duplication"));
+ return AZStd::move(retrieveEntitiesAndInstancesOutcome);
}
// Take a snapshot of the instance DOM before we manipulate it
@@ -1128,11 +1137,12 @@ namespace AzToolsFramework
AZStd::vector entities;
AZStd::vector instances;
- bool success = RetrieveAndSortPrefabEntitiesAndInstances(inputEntityList, commonOwningInstance->get(), entities, instances);
+ PrefabOperationResult retrieveEntitiesAndInstancesOutcome =
+ RetrieveAndSortPrefabEntitiesAndInstances(inputEntityList, commonOwningInstance->get(), entities, instances);
- if (!success)
+ if (!retrieveEntitiesAndInstancesOutcome.IsSuccess())
{
- return AZ::Failure(AZStd::string("DeleteEntitiesAndAllDescendantsInInstance"));
+ return AZStd::move(retrieveEntitiesAndInstancesOutcome);
}
for (AZ::Entity* entity : entities)
@@ -1405,13 +1415,16 @@ namespace AzToolsFramework
return nullptr;
}
- bool PrefabPublicHandler::RetrieveAndSortPrefabEntitiesAndInstances(
- const EntityList& inputEntities, Instance& commonRootEntityOwningInstance,
- EntityList& outEntities, AZStd::vector& outInstances) const
+ PrefabOperationResult PrefabPublicHandler::RetrieveAndSortPrefabEntitiesAndInstances(
+ const EntityList& inputEntities,
+ Instance& commonRootEntityOwningInstance,
+ EntityList& outEntities,
+ AZStd::vector& outInstances) const
{
if (inputEntities.size() == 0)
{
- return false;
+ return AZ::Failure(
+ AZStd::string("An empty list of input entities is provided to retrieve the prefab entities and instances."));
}
AZStd::queue entityQueue;
@@ -1438,8 +1451,8 @@ namespace AzToolsFramework
AZ_Assert(
owningInstance.has_value(),
"An error occurred while retrieving entities and prefab instances : "
- "Owning instance of entity with id '%llu' couldn't be found",
- entity->GetId());
+ "Owning instance of entity with name '%s' and id '%llu' couldn't be found",
+ entity->GetName().c_str(), static_cast(entity->GetId()));
// Check if this entity is owned by the same instance owning the root.
if (&owningInstance->get() == &commonRootEntityOwningInstance)
@@ -1480,7 +1493,10 @@ namespace AzToolsFramework
else
{
// This can only happen if one entity does not share the common root!
- return false;
+ return AZ::Failure(AZStd::string::format(
+ "Entity with name '%s' and id '%llu' has an owning instance that doesn't belong to the instance "
+ "hierarchy of the selected entities.",
+ entity->GetName().c_str(), static_cast(entity->GetId())));
}
}
}
@@ -1501,7 +1517,12 @@ namespace AzToolsFramework
outInstances.push_back(instancePtr);
}
- return (outEntities.size() + outInstances.size()) > 0;
+ if ((outEntities.size() + outInstances.size()) == 0)
+ {
+ return AZ::Failure(
+ AZStd::string("An empty list of entities and prefab instances were retrieved from the selected entities"));
+ }
+ return AZ::Success();
}
EntityIdList PrefabPublicHandler::GenerateEntityIdListWithoutLevelInstance(
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.h
index f0c88a7a79..0e24b0841d 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.h
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.h
@@ -64,8 +64,11 @@ namespace AzToolsFramework
private:
PrefabOperationResult DeleteFromInstance(const EntityIdList& entityIds, bool deleteDescendants);
- bool RetrieveAndSortPrefabEntitiesAndInstances(const EntityList& inputEntities, Instance& commonRootEntityOwningInstance,
- EntityList& outEntities, AZStd::vector& outInstances) const;
+ PrefabOperationResult RetrieveAndSortPrefabEntitiesAndInstances(
+ const EntityList& inputEntities,
+ Instance& commonRootEntityOwningInstance,
+ EntityList& outEntities,
+ AZStd::vector& outInstances) const;
EntityIdList GenerateEntityIdListWithoutLevelInstance(const EntityIdList& entityIds) const;
InstanceOptionalReference GetOwnerInstanceByEntityId(AZ::EntityId entityId) const;
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/InstanceDataHierarchy.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/InstanceDataHierarchy.cpp
index 39faf06f08..2e697a7398 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/InstanceDataHierarchy.cpp
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/InstanceDataHierarchy.cpp
@@ -546,7 +546,7 @@ namespace AzToolsFramework
for (auto& element : nodeEditData->m_elements)
{
- if (element.IsClassElement() && element.m_elementId == AZ::Edit::ClassElements::Group)
+ if (element.m_elementId == AZ::Edit::ClassElements::Group)
{
groupData = (element.m_description && element.m_description[0]) ? &element : nullptr;
continue;
@@ -1112,13 +1112,14 @@ namespace AzToolsFramework
const AZ::Edit::ElementData* groupData = nullptr;
for (const AZ::Edit::ElementData& elementData : parentEditData->m_elements)
{
- if (node->m_elementEditData == &elementData) // this element matches this node
+ // this element matches this node
+ if ((node->m_elementEditData == &elementData) && (elementData.m_elementId != AZ::Edit::ClassElements::Group))
{
// Record the last found group data
node->m_groupElementData = groupData;
break;
}
- else if (elementData.IsClassElement() && elementData.m_elementId == AZ::Edit::ClassElements::Group)
+ else if (elementData.m_elementId == AZ::Edit::ClassElements::Group)
{
if (!elementData.m_description || !elementData.m_description[0])
{ // close the group
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyRowWidget.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyRowWidget.cpp
index b9578d4e3a..5ea36bb30e 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyRowWidget.cpp
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyRowWidget.cpp
@@ -12,6 +12,7 @@
#include
#include
+#include
AZ_PUSH_DISABLE_WARNING(4244 4251 4800, "-Wunknown-warning-option") // 4244: conversion from 'int' to 'float', possible loss of data
// 4251: class '...' needs to have dll-interface to be used by clients of class 'QInputEvent'
@@ -141,6 +142,11 @@ namespace AzToolsFramework
m_treeDepth = 0;
delete m_dropDownArrow;
+ if (m_toggleSwitch != nullptr)
+ {
+ m_handler->DestroyGUI(m_toggleSwitch);
+ m_toggleSwitch = nullptr;
+ }
if (m_childWidget)
{
@@ -387,6 +393,13 @@ namespace AzToolsFramework
setUpdatesEnabled(true);
}
+ void PropertyRowWidget::InitializeToggleGroup(const char* groupName, PropertyRowWidget* pParent, int depth, InstanceDataNode* node, int labelWidth)
+ {
+ Initialize(groupName, pParent, depth, labelWidth);
+ ChangeSourceNode(node);
+ CreateGroupToggleSwitch();
+ }
+
void PropertyRowWidget::Initialize(const char* groupName, PropertyRowWidget* pParent, int depth, int labelWidth)
{
Initialize(pParent, nullptr, depth, labelWidth);
@@ -1102,6 +1115,19 @@ namespace AzToolsFramework
}
}
+ void PropertyRowWidget::CreateGroupToggleSwitch()
+ {
+ if (m_toggleSwitch == nullptr)
+ {
+ m_handlerName = AZ::Edit::UIHandlers::CheckBox;
+ PropertyTypeRegistrationMessages::Bus::BroadcastResult(m_handler, &PropertyTypeRegistrationMessages::Bus::Events::ResolvePropertyHandler, m_handlerName, azrtti_typeid());
+ m_toggleSwitch = m_handler->CreateGUI(this);
+ m_middleLayout->insertWidget(0, m_toggleSwitch, 1);
+ auto checkBoxCtrl = static_cast(m_toggleSwitch);
+ QObject::connect(checkBoxCtrl, &AzToolsFramework::PropertyCheckBoxCtrl::valueChanged, this, &PropertyRowWidget::OnClickedToggleButton);
+ }
+ }
+
void PropertyRowWidget::SetIndentSize(int w)
{
m_indent->changeSize(w, 1, QSizePolicy::Fixed, QSizePolicy::Fixed);
@@ -1110,6 +1136,18 @@ namespace AzToolsFramework
m_leftHandSideLayout->activate();
}
+ void PropertyRowWidget::OnClickedToggleButton(bool checked)
+ {
+ if (m_expanded != checked)
+ {
+ DoExpandOrContract(!IsExpanded(), 0 != (QGuiApplication::keyboardModifiers() & Qt::ControlModifier));
+ }
+ }
+
+ void PropertyRowWidget::ChangeSourceNode(InstanceDataNode* node)
+ {
+ m_sourceNode = node;
+ }
void PropertyRowWidget::SetExpanded(bool expanded)
{
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyRowWidget.hxx b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyRowWidget.hxx
index 8248eb4b86..ebf7c67b21 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyRowWidget.hxx
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyRowWidget.hxx
@@ -50,6 +50,7 @@ namespace AzToolsFramework
virtual void Initialize(PropertyRowWidget* pParent, InstanceDataNode* dataNode, int depth, int labelWidth = 200);
virtual void Initialize(const char* groupName, PropertyRowWidget* pParent, int depth, int labelWidth = 200);
+ virtual void InitializeToggleGroup(const char* groupName, PropertyRowWidget* pParent, int depth, InstanceDataNode* node, int labelWidth = 200);
virtual void Clear(); // for pooling
// --- NOT A UNIQUE IDENTIFIER ---
@@ -143,11 +144,14 @@ namespace AzToolsFramework
QVBoxLayout* GetLeftHandSideLayoutParent() { return m_leftHandSideLayoutParent; }
QToolButton* GetIndicatorButton() { return m_indicatorButton; }
QLabel* GetNameLabel() { return m_nameLabel; }
+ QWidget* GetToggle() { return m_toggleSwitch; }
+ const QWidget* GetToggle() const { return m_toggleSwitch; }
void SetIndentSize(int w);
void SetAsCustom(bool custom) { m_custom = custom; }
bool CanChildrenBeReordered() const;
bool CanBeReordered() const;
+
protected:
int CalculateLabelWidth() const;
@@ -177,6 +181,8 @@ namespace AzToolsFramework
QLabel* m_defaultLabel; // if there is no handler, we use a m_defaultLabel label
InstanceDataNode* m_sourceNode;
+ QWidget* m_toggleSwitch = nullptr;
+
QString m_currentFilterString;
struct ChangeNotification
@@ -241,6 +247,8 @@ namespace AzToolsFramework
void mouseDoubleClickEvent(QMouseEvent* event) override;
void UpdateDropDownArrow();
+ void CreateGroupToggleSwitch();
+ void ChangeSourceNode(InstanceDataNode* node);
void UpdateDefaultLabel(InstanceDataNode* node);
void createContainerButtons();
@@ -259,6 +267,7 @@ namespace AzToolsFramework
private slots:
void OnClickedExpansionButton();
+ void OnClickedToggleButton(bool checked);
void OnClickedAddElementButton();
void OnClickedRemoveElementButton();
void OnClickedClearContainerButton();
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/ReflectedPropertyEditor.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/ReflectedPropertyEditor.cpp
index ae3bcd6849..36462bca66 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/ReflectedPropertyEditor.cpp
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/ReflectedPropertyEditor.cpp
@@ -169,6 +169,8 @@ namespace AzToolsFramework
InstanceDataHierarchyList m_instances; ///< List of instance sets to display, other one can aggregate other instances.
InstanceDataHierarchy::ValueComparisonFunction m_valueComparisonFunction;
ReflectedPropertyEditor::WidgetList m_widgets;
+ ReflectedPropertyEditor::WidgetList m_specialGroupWidgets;
+ InstanceDataNode* groupSourceNode = nullptr;
RowContainerType m_widgetsInDisplayOrder;
UserWidgetToDataMap m_userWidgetsToData;
VisibilityCallback m_visibilityCallback;
@@ -501,6 +503,7 @@ namespace AzToolsFramework
// if the node is in a group then create the widget for the group
if (groupElementData)
{
+ bool isToggleGroup = false;
const char* groupName = groupElementData->m_description;
PropertyRowWidget*& widgetEntry = m_groupWidgets[{parent, groupName}];
@@ -509,14 +512,34 @@ namespace AzToolsFramework
{
widgetEntry = CreateOrPullFromPool();
widgetEntry->SetFilterString(m_editor->GetFilterString());
- widgetEntry->Initialize(groupName, parent, depth, m_propertyLabelWidth);
+
+ // Initialized normally if the group does not have a member variable attached to it,
+ // otherwise initialize it as a group that will have a toggle switch.
+ if (groupElementData->IsClassElement())
+ {
+ widgetEntry->Initialize(groupName, parent, depth, m_propertyLabelWidth);
+ }
+ else
+ {
+ widgetEntry->InitializeToggleGroup(groupName, parent, depth, groupSourceNode, m_propertyLabelWidth);
+ QWidget* toggleSwitch = widgetEntry->GetToggle();
+ PropertyHandlerBase* pHandler = widgetEntry->GetHandler();
+ m_userWidgetsToData[toggleSwitch] = groupSourceNode;
+ m_specialGroupWidgets[groupSourceNode] = widgetEntry;
+ pHandler->ConsumeAttributes_Internal(toggleSwitch, groupSourceNode);
+ pHandler->ReadValuesIntoGUI_Internal(toggleSwitch, groupSourceNode);
+ widgetEntry->OnValuesUpdated();
+ isToggleGroup = true;
+ }
+
widgetEntry->SetLeafIndentation(m_leafIndentation);
widgetEntry->SetTreeIndentation(m_treeIndentation);
widgetEntry->setObjectName(groupName);
for (const AZ::Edit::AttributePair& attribute : groupElementData->m_attributes)
{
- PropertyAttributeReader reader(node->GetParent()->FirstInstance(), attribute.second);
+ InstanceDataNode* readerNode = (isToggleGroup) ? groupSourceNode : node;
+ PropertyAttributeReader reader(readerNode->GetParent()->FirstInstance(), attribute.second);
QString descriptionOut;
bool foundDescription = false;
widgetEntry->ConsumeAttribute(attribute.first, reader, true, &descriptionOut, &foundDescription);
@@ -608,7 +631,7 @@ namespace AzToolsFramework
// creates and populates the GUI to edit the property if not already created
void ReflectedPropertyEditor::Impl::CreateEditorWidget(PropertyRowWidget* pWidget)
{
- if (!pWidget->HasChildWidgetAlready())
+ if (!pWidget->HasChildWidgetAlready() && !pWidget->GetToggle())
{
PropertyHandlerBase* pHandler = pWidget->GetHandler();
if (pHandler)
@@ -735,36 +758,44 @@ namespace AzToolsFramework
}
}
}
-
- pWidget = CreateOrPullFromPool();
- pWidget->show();
-
- pWidget->SetFilterString(m_editor->GetFilterString());
- pWidget->Initialize(pParent, node, depth, m_propertyLabelWidth);
-
- if (labelOverride != "")
+ if (!node->GetElementEditMetadata() || (node->GetElementEditMetadata()->m_elementId != AZ::Edit::ClassElements::Group))
{
- pWidget->SetNameLabel(labelOverride.data());
+ pWidget = CreateOrPullFromPool();
+ pWidget->show();
+
+ pWidget->SetFilterString(m_editor->GetFilterString());
+ pWidget->Initialize(pParent, node, depth, m_propertyLabelWidth);
+
+ if (labelOverride != "")
+ {
+ pWidget->SetNameLabel(labelOverride.data());
+ }
+
+ pWidget->setObjectName(pWidget->label());
+ pWidget->SetSelectionEnabled(m_selectionEnabled);
+ pWidget->SetLeafIndentation(m_leafIndentation);
+ pWidget->SetTreeIndentation(m_treeIndentation);
+
+ m_widgets[node] = pWidget;
+ m_widgetsInDisplayOrder.insert(widgetDisplayOrder, pWidget);
+
+ if (pParent)
+ {
+ pParent->AddedChild(pWidget);
+ }
+
+ if (pParent || !m_hideRootProperties)
+ {
+ depth += 1;
+ }
+ pParent = pWidget;
}
- pWidget->setObjectName(pWidget->label());
- pWidget->SetSelectionEnabled(m_selectionEnabled);
- pWidget->SetLeafIndentation(m_leafIndentation);
- pWidget->SetTreeIndentation(m_treeIndentation);
-
- m_widgets[node] = pWidget;
- m_widgetsInDisplayOrder.insert(widgetDisplayOrder, pWidget);
-
- if (pParent)
+ // Save the last InstanceDataNode that is a Group ClassElement so that we can use it as the source node for its widget.
+ if (node->GetElementEditMetadata() && (node->GetElementEditMetadata()->m_elementId == AZ::Edit::ClassElements::Group))
{
- pParent->AddedChild(pWidget);
+ groupSourceNode = node;
}
-
- if (pParent || !m_hideRootProperties)
- {
- depth += 1;
- }
- pParent = pWidget;
}
}
@@ -1356,9 +1387,13 @@ namespace AzToolsFramework
return;
}
- // get the property editor
+ // Get the property editor from either the widget map or the special toggle group widgets
auto rowWidget = m_widgets.find(it->second);
- if (rowWidget != m_widgets.end())
+ if (rowWidget == m_widgets.end())
+ {
+ rowWidget = m_specialGroupWidgets.find(it->second);
+ }
+ if (rowWidget != m_widgets.end() || rowWidget != m_specialGroupWidgets.end())
{
InstanceDataNode* node = rowWidget->first;
PropertyRowWidget* widget = rowWidget->second;
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/ReflectedPropertyEditor.hxx b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/ReflectedPropertyEditor.hxx
index b95c2b927a..b10e153162 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/ReflectedPropertyEditor.hxx
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/ReflectedPropertyEditor.hxx
@@ -51,6 +51,8 @@ namespace AzToolsFramework
typedef AZStd::unordered_map WidgetList;
+ ReflectedPropertyEditor::WidgetList m_specialGroupWidgets;
+
ReflectedPropertyEditor(QWidget* pParent);
virtual ~ReflectedPropertyEditor();
@@ -62,6 +64,7 @@ namespace AzToolsFramework
bool AddInstance(void* instance, const AZ::Uuid& classId, void* aggregateInstance = nullptr, void* compareInstance = nullptr);
void SetCompareInstance(void* instance, const AZ::Uuid& classId);
void ClearInstances();
+ void ReadValuesIntoGui(QWidget* widget, InstanceDataNode* node);
template
bool AddInstance(T* instance, void* aggregateInstance = nullptr, void* compareInstance = nullptr)
{
diff --git a/Code/Framework/AzToolsFramework/Tests/InstanceDataHierarchy.cpp b/Code/Framework/AzToolsFramework/Tests/InstanceDataHierarchy.cpp
index 61b512abb6..1b11479bff 100644
--- a/Code/Framework/AzToolsFramework/Tests/InstanceDataHierarchy.cpp
+++ b/Code/Framework/AzToolsFramework/Tests/InstanceDataHierarchy.cpp
@@ -21,6 +21,7 @@
#include
#include
#include
+#include
using namespace AZ;
@@ -727,6 +728,153 @@ namespace UnitTest
};
+ class GroupTestComponent : public AZ::Component
+ {
+ public:
+ AZ_COMPONENT(GroupTestComponent, "{C088C81D-D59D-43F1-85F8-B2E591BABA36}")
+
+ GroupTestComponent() = default;
+
+ struct SubData
+ {
+ AZ_TYPE_INFO(SubData, "{983316B5-17C0-476E-9CEB-CA749B3ABE5D}");
+ AZ_CLASS_ALLOCATOR(SubData, AZ::SystemAllocator, 0);
+
+ SubData() {}
+ explicit SubData(int v) : m_int(v) {}
+ explicit SubData(bool b) : m_bool(b) {}
+ explicit SubData(float f) : m_float(f) {}
+ ~SubData() = default;
+
+ float m_float = 0.f;
+ int m_int = 0;
+ bool m_bool = true;
+ };
+
+ static void Reflect(AZ::ReflectContext* context)
+ {
+ if (auto* serializeContext = azrtti_cast(context))
+ {
+ serializeContext->Class()
+ ->Version(1)
+ ->Field("SubInt", &SubData::m_int)
+ ->Field("SubToggle", &SubData::m_bool)
+ ->Field("SubFloat", &SubData::m_float)
+ ;
+
+ serializeContext->Class()
+ ->Version(1)
+ ->Field("Float", &GroupTestComponent::m_float)
+ ->Field("GroupToggle", &GroupTestComponent::m_groupToggle)
+ ->Field("GroupFloat", &GroupTestComponent::m_groupFloat)
+ ->Field("ToggleGroupInt", &GroupTestComponent::m_toggleGroupInt)
+ ->Field("SubDataNormal", &GroupTestComponent::m_subGroupForNormal)
+ ->Field("SubDataToggle", &GroupTestComponent::m_subGroupForToggle)
+ ;
+
+ if (AZ::EditContext* edit = serializeContext->GetEditContext())
+ {
+ edit->Class("Group Test Component", "Testing normal groups and toggle groups")
+ ->ClassElement(AZ::Edit::ClassElements::EditorData, "")
+ ->DataElement(0, &GroupTestComponent::m_float, "Float Field", "A float field")
+ ->ClassElement(AZ::Edit::ClassElements::Group, "Normal Group")
+ ->DataElement(0, &GroupTestComponent::m_groupFloat, "Float Field", "A float field")
+ ->DataElement(0, &GroupTestComponent::m_subGroupForNormal, "Struct Field", "A sub data type")
+ ->GroupElementToggle("Group Toggle", &GroupTestComponent::m_groupToggle)
+ ->DataElement(0, &GroupTestComponent::m_toggleGroupInt, "Normal Integer", "An Integer")
+ ->DataElement(0, &GroupTestComponent::m_subGroupForToggle, "Struct Field", "A sub data type")
+ ;
+
+ edit->Class("SubGroup Test Component", "Testing nested normal groups and toggle groups")
+ ->ClassElement(AZ::Edit::ClassElements::EditorData, "")
+ ->ClassElement(AZ::Edit::ClassElements::Group, "Normal SubGroup")
+ ->DataElement(0, &SubData::m_int, "SubGroup Int Field", "An int")
+ ->GroupElementToggle("SubGroup Toggle", &SubData::m_bool)
+ ->DataElement(0, &SubData::m_float, "SubGroup Float Field", "An int")
+ ;
+ }
+ }
+ }
+
+ void Activate() override
+ {
+ }
+
+ void Deactivate() override
+ {
+ }
+
+ float m_float = 0.f;
+ float m_groupFloat = 0.f;
+ int m_toggleGroupInt = 0;
+ AZStd::string m_string;
+ bool m_groupToggle = false;
+
+ SubData m_subGroupForNormal;
+ SubData m_subGroupForToggle;
+ };
+
+ class InstanceDataHierarchyGroupTestFixture : public AllocatorsFixture
+ {
+ public:
+ InstanceDataHierarchyGroupTestFixture() = default;
+
+ AZStd::unique_ptr m_serializeContext;
+ AZStd::unique_ptr testEntity1;
+ AzToolsFramework::InstanceDataHierarchy* instanceDataHierarchy;
+ AzToolsFramework::InstanceDataNode* componentNode1 = nullptr;
+
+ void SetUp() override
+ {
+ AllocatorsFixture::SetUp();
+
+ using AzToolsFramework::InstanceDataHierarchy;
+ using AzToolsFramework::InstanceDataNode;
+
+ AZ::AllocatorInstance::Create();
+
+ m_serializeContext.reset(aznew AZ::SerializeContext());
+ m_serializeContext.get()->CreateEditContext();
+ Entity::Reflect(m_serializeContext.get());
+ GroupTestComponent::Reflect(m_serializeContext.get());
+
+ testEntity1.reset(new AZ::Entity());
+ testEntity1->CreateComponent();
+
+ instanceDataHierarchy = aznew InstanceDataHierarchy();
+ instanceDataHierarchy->AddRootInstance(testEntity1.get());
+ instanceDataHierarchy->Build(m_serializeContext.get(), 0);
+
+ // Adding the nodes to a node stack
+ auto rootNode = instanceDataHierarchy->GetRootNode();
+ AZStd::stack nodeStack;
+ nodeStack.push(rootNode);
+ while (!nodeStack.empty())
+ {
+ InstanceDataNode* node = nodeStack.top();
+ nodeStack.pop();
+ if (node->GetClassMetadata()->m_typeId == AZ::AzTypeInfo::Uuid())
+ {
+ componentNode1 = node;
+ break;
+ }
+ for (InstanceDataNode& child : node->GetChildren())
+ {
+ nodeStack.push(&child);
+ }
+ }
+ }
+
+ void TearDown() override
+ {
+ m_serializeContext.reset();
+ testEntity1.reset();
+ delete instanceDataHierarchy;
+ AZ::AllocatorInstance::Destroy();
+ AllocatorsFixture::TearDown();
+ }
+ };
+
class InstanceDataHierarchyKeyedContainerTest
: public AllocatorsFixture
{
@@ -1315,4 +1463,108 @@ namespace UnitTest
run();
}
+ // Test to validate that the only ClassElement::Group nodes are ToggleGroups
+ TEST_F(InstanceDataHierarchyGroupTestFixture, GroupToggleIsClassElementGroup)
+ {
+ using AzToolsFramework::InstanceDataHierarchy;
+ using AzToolsFramework::InstanceDataNode;
+
+ for (auto child : componentNode1->GetChildren())
+ {
+ AZStd::string childName(child.GetElementMetadata()->m_name);
+ if (childName.compare("GroupToggle") == 0)
+ {
+ EXPECT_EQ(child.GetElementEditMetadata()->m_elementId, AZ::Edit::ClassElements::Group);
+ }
+ if ((childName.compare("SubDataNormal") == 0) || (childName.compare("SubDataToggle") == 0))
+ {
+ for (auto subChild : child.GetChildren())
+ {
+ childName = subChild.GetElementMetadata()->m_name;
+ if (childName.compare("SubToggle") == 0)
+ {
+ EXPECT_EQ(subChild.GetElementEditMetadata()->m_elementId, AZ::Edit::ClassElements::Group);
+ }
+ else
+ {
+ EXPECT_NE(subChild.GetElementEditMetadata()->m_elementId, AZ::Edit::ClassElements::Group);
+ }
+ }
+ }
+ }
+ }
+
+ // Test to ensure that each node has been assigned under the proper group and the group hierarchy is structured correctly
+ TEST_F(InstanceDataHierarchyGroupTestFixture, ValidatingGroupAndSubGroupHierarchy)
+ {
+ using AzToolsFramework::InstanceDataHierarchy;
+ using AzToolsFramework::InstanceDataNode;
+
+ for (auto child : componentNode1->GetChildren())
+ {
+ AZStd::string childName(child.GetElementMetadata()->m_name);
+ if (childName.compare("GroupFloat") == 0)
+ {
+ EXPECT_EQ(child.GetGroupElementMetadata()->m_description, "Normal Group");
+ }
+ if (childName.compare("ToggleGroupInt") == 0)
+ {
+ EXPECT_EQ(child.GetGroupElementMetadata()->m_description, "Group Toggle");
+ }
+ if ((childName.compare("SubDataNormal") == 0) || (childName.compare("SubDataToggle") == 0))
+ {
+ for (auto subChild : child.GetChildren())
+ {
+ childName = subChild.GetElementMetadata()->m_name;
+ if (childName.compare("SubInt") == 0)
+ {
+ EXPECT_EQ(subChild.GetGroupElementMetadata()->m_description, "Normal SubGroup");
+ }
+ if (childName.compare("SubFloat") == 0)
+ {
+ EXPECT_EQ(subChild.GetGroupElementMetadata()->m_description, "SubGroup Toggle");
+ }
+ }
+ }
+ }
+ }
+
+ class InstanceDataHierarchyGroupTestFixtureParameterized
+ : public InstanceDataHierarchyGroupTestFixture
+ , public ::testing::WithParamInterface
+ {
+ };
+
+ INSTANTIATE_TEST_CASE_P(
+ InstanceDataHierarchyGroupTestFixture,
+ InstanceDataHierarchyGroupTestFixtureParameterized,
+ ::testing::Values("GroupFloat", "GroupToggle", "ToggleGroupInt", "SubInt", "SubToggle", "SubFloat"));
+
+ // Test to validate that each node in a group and Subgroup has the correct parent
+ TEST_P(InstanceDataHierarchyGroupTestFixtureParameterized, ValidatingGroupAndSubGroupParents)
+ {
+ using AzToolsFramework::InstanceDataHierarchy;
+ using AzToolsFramework::InstanceDataNode;
+
+ const char* paramName = GetParam();
+ for (auto child : componentNode1->GetChildren())
+ {
+ AZStd::string childName(child.GetElementMetadata()->m_name);
+ if (childName.compare(paramName) == 0)
+ {
+ EXPECT_EQ(child.GetParent()->GetClassMetadata()->m_name, "GroupTestComponent");
+ }
+ if ((childName.compare("SubDataNormal") == 0) || (childName.compare("SubDataToggle") == 0))
+ {
+ for (auto subChild : child.GetChildren())
+ {
+ childName = subChild.GetElementMetadata()->m_name;
+ if (childName.compare(paramName) == 0)
+ {
+ EXPECT_EQ(subChild.GetParent()->GetClassMetadata()->m_name, "SubData");
+ }
+ }
+ }
+ }
+ }
} // namespace UnitTest
diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabInstanceToTemplatePropagatorTests.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabInstanceToTemplatePropagatorTests.cpp
index e3b65db97e..8379992553 100644
--- a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabInstanceToTemplatePropagatorTests.cpp
+++ b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabInstanceToTemplatePropagatorTests.cpp
@@ -245,7 +245,9 @@ namespace UnitTest
m_instanceToTemplateInterface->GenerateDomForInstance(instanceDomBeforeUpdate, *firstInstance);
//remove instance from instance
- firstInstance->DetachNestedInstance(addedAlias);
+ AZStd::unique_ptr detachedInstance = firstInstance->DetachNestedInstance(addedAlias);
+ ASSERT_TRUE(detachedInstance != nullptr);
+ m_prefabSystemComponent->RemoveLink(detachedInstance->GetLinkId());
//create document with after change snapshot
PrefabDom instanceDomAfterUpdate;
diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabUpdateInstancesTests.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabUpdateInstancesTests.cpp
index 0d955789ac..baded6d43e 100644
--- a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabUpdateInstancesTests.cpp
+++ b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabUpdateInstancesTests.cpp
@@ -309,6 +309,7 @@ namespace UnitTest
// and use the updated enclosing Instance to update the PrefabDom of Template.
AZStd::unique_ptr detachedInstance = newEnclosingInstance->DetachNestedInstance(nestedInstanceAliases.front());
ASSERT_TRUE(detachedInstance);
+ m_prefabSystemComponent->RemoveLink(detachedInstance->GetLinkId());
PrefabDom updatedTemplateDom;
ASSERT_TRUE(PrefabDomUtils::StoreInstanceInPrefabDom(*newEnclosingInstance, updatedTemplateDom));
diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabUpdateTemplateTests.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabUpdateTemplateTests.cpp
index 4e7d9d95d1..6f90e245f7 100644
--- a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabUpdateTemplateTests.cpp
+++ b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabUpdateTemplateTests.cpp
@@ -274,6 +274,7 @@ namespace UnitTest
InstanceAlias aliasOfWheelInstanceToRetain = wheelInstanceAliasesUnderAxle.front();
AZStd::unique_ptr detachedInstance = axleInstance->DetachNestedInstance(wheelInstanceAliasesUnderAxle.back());
ASSERT_TRUE(detachedInstance);
+ m_prefabSystemComponent->RemoveLink(detachedInstance->GetLinkId());
PrefabDom updatedAxleInstanceDom;
ASSERT_TRUE(PrefabDomUtils::StoreInstanceInPrefabDom(*axleInstance, updatedAxleInstanceDom));
m_prefabSystemComponent->UpdatePrefabTemplate(axleTemplateId, updatedAxleInstanceDom);
diff --git a/Code/Framework/CMakeLists.txt b/Code/Framework/CMakeLists.txt
index 45ccb22b14..61f65de5a4 100644
--- a/Code/Framework/CMakeLists.txt
+++ b/Code/Framework/CMakeLists.txt
@@ -6,7 +6,6 @@
#
#
-add_subdirectory(AzAutoGen)
add_subdirectory(AtomCore)
add_subdirectory(AzCore)
add_subdirectory(AzQtComponents)
diff --git a/Code/Framework/GridMate/GridMate/Replica/ReplicaMgr.cpp b/Code/Framework/GridMate/GridMate/Replica/ReplicaMgr.cpp
index 2bc8d3e9f0..b8eea00871 100644
--- a/Code/Framework/GridMate/GridMate/Replica/ReplicaMgr.cpp
+++ b/Code/Framework/GridMate/GridMate/Replica/ReplicaMgr.cpp
@@ -1688,12 +1688,12 @@ namespace GridMate
return; //No connections to update
}
bool updateRate = false;
- AZ::u32 minRateBytesPerSecond = m_connByCongestionState.top().m_rate;
+ AZ::u32 minRateBytesPerSecond = m_connByCongestionState.front().m_rate;
//const AZ::u32 old = minRateBytesPerSecond; //For debugging
- auto connIt = AZStd::find(m_connByCongestionState.get_container().begin(), m_connByCongestionState.get_container().end(), id);
+ auto connIt = AZStd::find(m_connByCongestionState.begin(), m_connByCongestionState.end(), id);
- if ( connIt == m_connByCongestionState.get_container().end())
+ if ( connIt == m_connByCongestionState.end())
{
return; //Already disconnected
}
@@ -1708,11 +1708,11 @@ namespace GridMate
//If new min or old min increased, rebuild the heap and send an update
if (bytesPerSecond < minRateBytesPerSecond
- || (id == m_connByCongestionState.top().m_connection && bytesPerSecond > minRateBytesPerSecond))
+ || (id == m_connByCongestionState.front().m_connection && bytesPerSecond > minRateBytesPerSecond))
{
updateRate = true;
minRateBytesPerSecond = bytesPerSecond;
- AZStd::make_heap(m_connByCongestionState.get_container().begin(), m_connByCongestionState.get_container().end());
+ AZStd::make_heap(m_connByCongestionState.begin(), m_connByCongestionState.end());
}
}
diff --git a/Code/Framework/GridMate/GridMate/Replica/ReplicaMgr.h b/Code/Framework/GridMate/GridMate/Replica/ReplicaMgr.h
index 93a46d8ad7..bd9f1a1ee9 100644
--- a/Code/Framework/GridMate/GridMate/Replica/ReplicaMgr.h
+++ b/Code/Framework/GridMate/GridMate/Replica/ReplicaMgr.h
@@ -459,7 +459,7 @@ namespace GridMate
}
};
static bool k_enableBackPressure;
- AZStd::priority_queue m_connByCongestionState; ///< Connections priority queue sorted by congestion window
+ AZStd::vector m_connByCongestionState; ///< Connections priority queue sorted by congestion window
/***
* Updates connection's rate in priority and updates send limit
*
@@ -479,7 +479,9 @@ namespace GridMate
}
AZ_Assert(carrier, "NULL carrier!");
- m_connByCongestionState.emplace(RateConnectionPair(AZ::u32(1500), id)); //default to 1500Bps (ex 1 Ethernet frame/second minimum)
+ m_connByCongestionState.emplace_back(AZ::u32(1500), id); //default to 1500Bps (ex 1 Ethernet frame/second minimum)
+ // Restore the heap property after pushing back another element
+ AZStd::push_heap(m_connByCongestionState.begin(), m_connByCongestionState.end());
}
void OnDisconnect(Carrier* carrier, ConnectionID id, CarrierDisconnectReason reason) override
{
@@ -490,17 +492,17 @@ namespace GridMate
}
AZ_Assert(carrier, "NULL carrier!");
- auto connIt = AZStd::find(m_connByCongestionState.get_container().begin(), m_connByCongestionState.get_container().end(), id);
- if (connIt != m_connByCongestionState.get_container().end())
+ auto connIt = AZStd::find(m_connByCongestionState.begin(), m_connByCongestionState.end(), id);
+ if (connIt != m_connByCongestionState.end())
{
//Since we are using a weakly sorted heap, we need to re-generate when the top is removed
- bool remake = (connIt == m_connByCongestionState.get_container().begin());
+ bool remake = (connIt == m_connByCongestionState.begin());
- m_connByCongestionState.get_container().erase(connIt);
+ m_connByCongestionState.erase(connIt);
if (remake)
{
- AZStd::make_heap(m_connByCongestionState.get_container().begin(), m_connByCongestionState.get_container().end());
+ AZStd::make_heap(m_connByCongestionState.begin(), m_connByCongestionState.end());
}
}
}
diff --git a/Code/Tools/AssetProcessor/native/AssetManager/assetProcessorManager.cpp b/Code/Tools/AssetProcessor/native/AssetManager/assetProcessorManager.cpp
index 21089ef020..3a7bc6ef3e 100644
--- a/Code/Tools/AssetProcessor/native/AssetManager/assetProcessorManager.cpp
+++ b/Code/Tools/AssetProcessor/native/AssetManager/assetProcessorManager.cpp
@@ -3072,6 +3072,7 @@ namespace AssetProcessor
QElapsedTimer elapsedTimer;
elapsedTimer.start();
+
for (auto jobIter = m_jobsToProcess.begin(); jobIter != m_jobsToProcess.end();)
{
JobDetails& job = *jobIter;
@@ -3082,7 +3083,7 @@ namespace AssetProcessor
jobIter = m_jobsToProcess.erase(jobIter);
m_numOfJobsToAnalyze--;
- // Update the remaining job status occasionally
+ // Update the remaining job status occasionally
if (elapsedTimer.elapsed() >= MILLISECONDS_BETWEEN_PROCESS_JOBS_STATUS_UPDATE)
{
Q_EMIT NumRemainingJobsChanged(m_activeFiles.size() + m_filesToExamine.size() + m_numOfJobsToAnalyze);
@@ -3102,7 +3103,8 @@ namespace AssetProcessor
// Process the first job if no jobs were analyzed.
auto jobIter = m_jobsToProcess.begin();
JobDetails& job = *jobIter;
- AZ_Warning(AssetProcessor::DebugChannel, false, " Cyclic job dependency detected. Processing job (%s, %s, %s, %s) to unblock.",
+ AZ_Warning(
+ AssetProcessor::DebugChannel, false, " Cyclic job dependency detected. Processing job (%s, %s, %s, %s) to unblock.",
job.m_jobEntry.m_databaseSourceName.toUtf8().data(), job.m_jobEntry.m_jobKey.toUtf8().data(),
job.m_jobEntry.m_platformInfo.m_identifier.c_str(), job.m_jobEntry.m_builderGuid.ToString().c_str());
ProcessJob(job);
diff --git a/Code/Tools/AssetProcessor/native/AssetManager/assetProcessorManager.h b/Code/Tools/AssetProcessor/native/AssetManager/assetProcessorManager.h
index 5fc7a73035..376af5d773 100644
--- a/Code/Tools/AssetProcessor/native/AssetManager/assetProcessorManager.h
+++ b/Code/Tools/AssetProcessor/native/AssetManager/assetProcessorManager.h
@@ -207,6 +207,11 @@ namespace AssetProcessor
//! or a job dependency and we can only resolve these dependencies once all the create jobs are completed.
struct JobToProcessEntry
{
+ bool operator<(const JobToProcessEntry& other)
+ {
+ return m_sourceFileInfo.m_pathRelativeToScanFolder < other.m_sourceFileInfo.m_pathRelativeToScanFolder;
+ }
+
SourceFileInfo m_sourceFileInfo;
AZStd::vector m_jobsToAnalyze;
// a vector of pairs of
diff --git a/Code/Tools/AssetProcessor/native/assetprocessor.h b/Code/Tools/AssetProcessor/native/assetprocessor.h
index 2397f3b1ff..1c13eca200 100644
--- a/Code/Tools/AssetProcessor/native/assetprocessor.h
+++ b/Code/Tools/AssetProcessor/native/assetprocessor.h
@@ -244,6 +244,11 @@ namespace AssetProcessor
m_jobEntry.m_builderGuid == rhs.m_jobEntry.m_builderGuid);
}
+ static bool DatabaseSourceLexCompare(const JobDetails& left, const JobDetails& right)
+ {
+ return left.m_jobEntry.m_databaseSourceName <= right.m_jobEntry.m_databaseSourceName;
+ }
+
JobDetails() = default;
};
diff --git a/Code/Tools/AssetProcessor/native/resourcecompiler/RCQueueSortModel.cpp b/Code/Tools/AssetProcessor/native/resourcecompiler/RCQueueSortModel.cpp
index c39a0c66e9..774876234d 100644
--- a/Code/Tools/AssetProcessor/native/resourcecompiler/RCQueueSortModel.cpp
+++ b/Code/Tools/AssetProcessor/native/resourcecompiler/RCQueueSortModel.cpp
@@ -197,10 +197,20 @@ namespace AssetProcessor
{
return priorityLeft > priorityRight;
}
+
+ // Optionally stabilize queue order on the source name.
+ // This is used in automated tests, to allow tests to have a stable
+ // order that jobs with otherwise equal priority run, so tests process
+ // assets in the same order each time they are run.
+ if (m_sortQueueOnDBSourceName)
+ {
+ return leftJob->GetJobEntry().m_databaseSourceName < rightJob->GetJobEntry().m_databaseSourceName;
+ }
// if we get all the way down here it means we're dealing with two assets which are not
// in any compile groups, not a priority platform, not a priority type, priority platform, etc.
// we can arrange these any way we want, but must pick at least a stable order.
+
return leftJob->GetJobEntry().m_jobRunKey < rightJob->GetJobEntry().m_jobRunKey;
}
diff --git a/Code/Tools/AssetProcessor/native/resourcecompiler/RCQueueSortModel.h b/Code/Tools/AssetProcessor/native/resourcecompiler/RCQueueSortModel.h
index fbeacd8b8c..7fc60fdd60 100644
--- a/Code/Tools/AssetProcessor/native/resourcecompiler/RCQueueSortModel.h
+++ b/Code/Tools/AssetProcessor/native/resourcecompiler/RCQueueSortModel.h
@@ -50,6 +50,10 @@ namespace AssetProcessor
void AddJobIdEntry(AssetProcessor::RCJob* rcJob);
void RemoveJobIdEntry(AssetProcessor::RCJob* rcJob);
+ void SetQueueSortOnDBSourceName()
+ {
+ m_sortQueueOnDBSourceName = true;
+ }
// implement QSortFilteRProxyModel:
bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const override;
@@ -68,6 +72,11 @@ namespace AssetProcessor
QSet m_currentlyConnectedPlatforms;
bool m_dirtyNeedsResort = false; // instead of constantly resorting, we resort only when someone wants to pull an element from us
+ // By default, jobs with equal priority and escalation sort on the job run key. This flag changes
+ // jobs to sort on the database source name. This is used for testing, to guarantee jobs run in the same
+ // order for those tests each time they are run.
+ bool m_sortQueueOnDBSourceName = false;
+
// ---------------------------------------------------------
// AssetProcessorPlatformBus::Handler
void AssetProcessorPlatformConnected(const AZStd::string platform) override;
diff --git a/Code/Tools/AssetProcessor/native/resourcecompiler/rccontroller.cpp b/Code/Tools/AssetProcessor/native/resourcecompiler/rccontroller.cpp
index 11ef68de29..660144095b 100644
--- a/Code/Tools/AssetProcessor/native/resourcecompiler/rccontroller.cpp
+++ b/Code/Tools/AssetProcessor/native/resourcecompiler/rccontroller.cpp
@@ -163,6 +163,11 @@ namespace AssetProcessor
return ((!m_RCQueueSortModel.GetNextPendingJob()) && (m_RCJobListModel.jobsInFlight() == 0));
}
+ void RCController::SetQueueSortOnDBSourceName()
+ {
+ m_RCQueueSortModel.SetQueueSortOnDBSourceName();
+ }
+
void RCController::JobSubmitted(JobDetails details)
{
AssetProcessor::QueueElementID checkFile(details.m_jobEntry.m_databaseSourceName, details.m_jobEntry.m_platformInfo.m_identifier.c_str(), details.m_jobEntry.m_jobKey);
diff --git a/Code/Tools/AssetProcessor/native/resourcecompiler/rccontroller.h b/Code/Tools/AssetProcessor/native/resourcecompiler/rccontroller.h
index c555c7a585..51ae6b4a26 100644
--- a/Code/Tools/AssetProcessor/native/resourcecompiler/rccontroller.h
+++ b/Code/Tools/AssetProcessor/native/resourcecompiler/rccontroller.h
@@ -54,10 +54,11 @@ namespace AssetProcessor
void StartJob(AssetProcessor::RCJob* rcJob);
int NumberOfPendingCriticalJobsPerPlatform(QString platform);
- void SetSystemRoot(const QDir& systemRoot);
int NumberOfPendingJobsPerPlatform(QString platform);
bool IsIdle();
- bool IsPriorityCopyJob(AssetProcessor::RCJob* rcJob);
+
+ void SetQueueSortOnDBSourceName();
+
Q_SIGNALS:
void FileCompiled(JobEntry entry, AssetBuilderSDK::ProcessJobResponse response);
void FileFailed(JobEntry entry);
diff --git a/Code/Tools/AssetProcessor/native/utilities/ApplicationManagerBase.cpp b/Code/Tools/AssetProcessor/native/utilities/ApplicationManagerBase.cpp
index 5e2de8e4cd..b90364e1c5 100644
--- a/Code/Tools/AssetProcessor/native/utilities/ApplicationManagerBase.cpp
+++ b/Code/Tools/AssetProcessor/native/utilities/ApplicationManagerBase.cpp
@@ -49,8 +49,6 @@ static const qint64 s_ReservedDiskSpaceInBytes = 256 * 1024;
//! Maximum number of temp folders allowed
static const int s_MaximumTempFolders = 10000;
-const char AdditionalScanFolders[] = "additionalScanFolders";
-
ApplicationManagerBase::ApplicationManagerBase(int* argc, char*** argv, QObject* parent)
: ApplicationManager(argc, argv, parent)
{
@@ -155,55 +153,90 @@ void ApplicationManagerBase::InitAssetProcessorManager()
const AzFramework::CommandLine* commandLine = nullptr;
AzFramework::ApplicationRequests::Bus::BroadcastResult(commandLine, &AzFramework::ApplicationRequests::GetCommandLine);
- if(commandLine->HasSwitch("zeroAnalysisMode"))
+ struct APCommandLineSwitch
+ {
+ APCommandLineSwitch(const char* switchTitle, const char* helpText)
+ : m_switch(switchTitle)
+ , m_helpText(helpText)
+ {
+
+ }
+ const char* m_switch;
+ const char* m_helpText;
+ };
+
+ const APCommandLineSwitch Command_waitOnLaunch("waitOnLaunch", "Briefly pauses Asset Processor during initializiation. Useful if you want to attach a debugger.");
+ const APCommandLineSwitch Command_zeroAnalysisMode("zeroAnalysisMode", "Enables using file modification time when examining source assets for processing.");
+ const APCommandLineSwitch Command_enableQueryLogging("enableQueryLogging", "Enables logging database queries.");
+ const APCommandLineSwitch Command_dependencyScanPattern("dependencyScanPattern", "Scans assets that match the given pattern for missing product dependencies.");
+ const APCommandLineSwitch Command_dsp("dsp", Command_dependencyScanPattern.m_helpText);
+ const APCommandLineSwitch Command_fileDependencyScanPattern("fileDependencyScanPattern", "Used with dependencyScanPattern to farther filter the scan.");
+ const APCommandLineSwitch Command_fdsp("fdsp", Command_fileDependencyScanPattern.m_helpText);
+ const APCommandLineSwitch Command_additionalScanFolders("additionalScanFolders", "Used with dependencyScanPattern to farther filter the scan.");
+ const APCommandLineSwitch Command_dependencyScanMaxIteration("dependencyScanMaxIteration", "Used to limit the number of recursive searches per line when running dependencyScanPattern.");
+ const APCommandLineSwitch Command_warningLevel("warningLevel", "Configure the error and warning reporting level for AssetProcessor. Pass in 1 for fatal errors, 2 for fatal errors and warnings.");
+ const APCommandLineSwitch Command_acceptInput("acceptInput", "Enable external control messaging via the ControlRequestHandler, used with automated tests.");
+ const APCommandLineSwitch Command_debugOutput("debugOutput", "When enabled, builders that support it will output debug information as product assets. Used primarily with scene files.");
+ const APCommandLineSwitch Command_sortJobsByDBSourceName("sortJobsByDBSourceName", "When enabled, sorts pending jobs with equal priority and dependencies by database source name instead of job ID. Useful for automated tests to process assets in the same order each time.");
+ const APCommandLineSwitch Command_truncatefingerprint("truncatefingerprint", "Truncates the fingerprint used for processed assets. Useful if you plan to compress product assets to share on another machine because some compression formats like zip will truncate file mod timestamps.");
+ const APCommandLineSwitch Command_help("help", "Displays this message.");
+ const APCommandLineSwitch Command_h("h", Command_help.m_helpText);
+
+ if (commandLine->HasSwitch(Command_waitOnLaunch.m_switch))
+ {
+ // Useful for attaching the debugger, this forces a short pause.
+ AZStd::this_thread::sleep_for(AZStd::chrono::seconds(20));
+ }
+
+ if (commandLine->HasSwitch(Command_zeroAnalysisMode.m_switch))
{
m_assetProcessorManager->SetEnableModtimeSkippingFeature(true);
}
- if(commandLine->HasSwitch("enableQueryLogging"))
+ if (commandLine->HasSwitch(Command_enableQueryLogging.m_switch))
{
m_assetProcessorManager->SetQueryLogging(true);
}
- if (commandLine->HasSwitch("dependencyScanPattern"))
+ if (commandLine->HasSwitch(Command_dependencyScanPattern.m_switch))
{
- m_dependencyScanPattern = commandLine->GetSwitchValue("dependencyScanPattern", 0).c_str();
+ m_dependencyScanPattern = commandLine->GetSwitchValue(Command_dependencyScanPattern.m_switch, 0).c_str();
}
- else if (commandLine->HasSwitch("dsp"))
+ else if (commandLine->HasSwitch(Command_dsp.m_switch))
{
- m_dependencyScanPattern = commandLine->GetSwitchValue("dsp", 0).c_str();
+ m_dependencyScanPattern = commandLine->GetSwitchValue(Command_dsp.m_switch, 0).c_str();
}
m_fileDependencyScanPattern = "*";
- if (commandLine->HasSwitch("fileDependencyScanPattern"))
+ if (commandLine->HasSwitch(Command_fileDependencyScanPattern.m_switch))
{
- m_fileDependencyScanPattern = commandLine->GetSwitchValue("fileDependencyScanPattern", 0).c_str();
+ m_fileDependencyScanPattern = commandLine->GetSwitchValue(Command_fileDependencyScanPattern.m_switch, 0).c_str();
}
- else if (commandLine->HasSwitch("fdsp"))
+ else if (commandLine->HasSwitch(Command_fdsp.m_switch))
{
- m_fileDependencyScanPattern = commandLine->GetSwitchValue("fdsp", 0).c_str();
+ m_fileDependencyScanPattern = commandLine->GetSwitchValue(Command_fdsp.m_switch, 0).c_str();
}
- if (commandLine->HasSwitch(AdditionalScanFolders))
+ if (commandLine->HasSwitch(Command_additionalScanFolders.m_switch))
{
- for (size_t idx = 0; idx < commandLine->GetNumSwitchValues(AdditionalScanFolders); idx++)
+ for (size_t idx = 0; idx < commandLine->GetNumSwitchValues(Command_additionalScanFolders.m_switch); idx++)
{
- AZStd::string value = commandLine->GetSwitchValue(AdditionalScanFolders, idx);
+ AZStd::string value = commandLine->GetSwitchValue(Command_additionalScanFolders.m_switch, idx);
m_dependencyAddtionalScanFolders.emplace_back(AZStd::move(value));
}
}
- if (commandLine->HasSwitch("dependencyScanMaxIteration"))
+ if (commandLine->HasSwitch(Command_dependencyScanMaxIteration.m_switch))
{
- AZStd::string maxIterationAsString = commandLine->GetSwitchValue("dependencyScanMaxIteration", 0);
+ AZStd::string maxIterationAsString = commandLine->GetSwitchValue(Command_dependencyScanMaxIteration.m_switch, 0);
m_dependencyScanMaxIteration = AZStd::stoi(maxIterationAsString);
}
- if (commandLine->HasSwitch("warningLevel"))
+ if (commandLine->HasSwitch(Command_warningLevel.m_switch))
{
using namespace AssetProcessor;
- const AZStd::string& levelString = commandLine->GetSwitchValue("warningLevel", 0);
+ const AZStd::string& levelString = commandLine->GetSwitchValue(Command_warningLevel.m_switch, 0);
WarningLevel warningLevel = WarningLevel::Default;
switch(AZStd::stoi(levelString))
@@ -217,26 +250,30 @@ void ApplicationManagerBase::InitAssetProcessorManager()
}
AssetProcessor::JobDiagnosticRequestBus::Broadcast(&AssetProcessor::JobDiagnosticRequestBus::Events::SetWarningLevel, warningLevel);
}
- if (commandLine->HasSwitch("acceptInput"))
+ if (commandLine->HasSwitch(Command_acceptInput.m_switch))
{
InitControlRequestHandler();
}
- if (commandLine->HasSwitch("debugOutput"))
+ if (commandLine->HasSwitch(Command_debugOutput.m_switch))
{
m_assetProcessorManager->SetBuilderDebugFlag(true);
}
- constexpr char truncateFingerprintSwitch[] = "truncatefingerprint";
- if(commandLine->HasSwitch(truncateFingerprintSwitch))
+ if (commandLine->HasSwitch(Command_sortJobsByDBSourceName.m_switch))
+ {
+ m_sortJobsByDBSourceName = true;
+ }
+
+ if (commandLine->HasSwitch(Command_truncatefingerprint.m_switch))
{
// Zip archive format uses 2 second precision truncated
const int ArchivePrecision = 2000;
int precision = ArchivePrecision;
- if(commandLine->GetNumSwitchValues(truncateFingerprintSwitch) > 0)
+ if (commandLine->GetNumSwitchValues(Command_truncatefingerprint.m_switch) > 0)
{
- precision = AZStd::stoi(commandLine->GetSwitchValue(truncateFingerprintSwitch, 0));
+ precision = AZStd::stoi(commandLine->GetSwitchValue(Command_truncatefingerprint.m_switch, 0));
if(precision < 1)
{
@@ -246,6 +283,31 @@ void ApplicationManagerBase::InitAssetProcessorManager()
AssetUtilities::SetTruncateFingerprintTimestamp(precision);
}
+
+ if (commandLine->HasSwitch(Command_help.m_switch) || commandLine->HasSwitch(Command_h.m_switch))
+ {
+ // Other O3DE tools have a more full featured system for registering command flags
+ // that includes help output, but right now the AssetProcessor just checks strings
+ // via HasSwitch. This means this help output has to be updated manually.
+ AZ_TracePrintf("AssetProcessor", "Asset Processor Command Line Flags:\n");
+ AZ_TracePrintf("AssetProcessor", "\t%s : %s\n", Command_waitOnLaunch.m_switch, Command_waitOnLaunch.m_helpText);
+ AZ_TracePrintf("AssetProcessor", "\t%s : %s\n", Command_zeroAnalysisMode.m_switch, Command_zeroAnalysisMode.m_helpText);
+ AZ_TracePrintf("AssetProcessor", "\t%s : %s\n", Command_enableQueryLogging.m_switch, Command_enableQueryLogging.m_helpText);
+ AZ_TracePrintf("AssetProcessor", "\t%s : %s\n", Command_dependencyScanPattern.m_switch, Command_dependencyScanPattern.m_helpText);
+ AZ_TracePrintf("AssetProcessor", "\t%s : %s\n", Command_dsp.m_switch, Command_dsp.m_helpText);
+ AZ_TracePrintf("AssetProcessor", "\t%s : %s\n", Command_fileDependencyScanPattern.m_switch, Command_fileDependencyScanPattern.m_helpText);
+ AZ_TracePrintf("AssetProcessor", "\t%s : %s\n", Command_fdsp.m_switch, Command_fdsp.m_helpText);
+ AZ_TracePrintf("AssetProcessor", "\t%s : %s\n", Command_additionalScanFolders.m_switch, Command_additionalScanFolders.m_helpText);
+ AZ_TracePrintf("AssetProcessor", "\t%s : %s\n", Command_dependencyScanMaxIteration.m_switch, Command_dependencyScanMaxIteration.m_helpText);
+ AZ_TracePrintf("AssetProcessor", "\t%s : %s\n", Command_warningLevel.m_switch, Command_warningLevel.m_helpText);
+ AZ_TracePrintf("AssetProcessor", "\t%s : %s\n", Command_acceptInput.m_switch, Command_acceptInput.m_helpText);
+ AZ_TracePrintf("AssetProcessor", "\t%s : %s\n", Command_debugOutput.m_switch, Command_debugOutput.m_helpText);
+ AZ_TracePrintf("AssetProcessor", "\t%s : %s\n", Command_sortJobsByDBSourceName.m_switch, Command_sortJobsByDBSourceName.m_helpText);
+ AZ_TracePrintf("AssetProcessor", "\t%s : %s\n", Command_truncatefingerprint.m_switch, Command_truncatefingerprint.m_helpText);
+ AZ_TracePrintf("AssetProcessor", "\t%s : %s\n", Command_help.m_switch, Command_help.m_helpText);
+ AZ_TracePrintf("AssetProcessor", "\t%s : %s\n", Command_h.m_switch, Command_h.m_helpText);
+ AZ_TracePrintf("AssetProcessor", "\tregset : set the given registry key to the given value.\n");
+ }
}
void ApplicationManagerBase::Rescan()
@@ -281,6 +343,11 @@ void ApplicationManagerBase::InitRCController()
{
m_rcController = new AssetProcessor::RCController(m_platformConfiguration->GetMinJobs(), m_platformConfiguration->GetMaxJobs());
+ if (m_sortJobsByDBSourceName)
+ {
+ m_rcController->SetQueueSortOnDBSourceName();
+ }
+
QObject::connect(m_assetProcessorManager, &AssetProcessor::AssetProcessorManager::AssetToProcess, m_rcController, &AssetProcessor::RCController::JobSubmitted);
QObject::connect(m_rcController, &AssetProcessor::RCController::FileCompiled, m_assetProcessorManager, &AssetProcessor::AssetProcessorManager::AssetProcessed, Qt::UniqueConnection);
QObject::connect(m_rcController, &AssetProcessor::RCController::FileFailed, m_assetProcessorManager, &AssetProcessor::AssetProcessorManager::AssetFailed);
@@ -1807,4 +1874,3 @@ void ApplicationManagerBase::OnActiveJobsCountChanged(unsigned int count)
AssetProcessor::AssetProcessorStatusEntry entry(AssetProcessor::AssetProcessorStatus::Processing_Jobs, count);
Q_EMIT AssetProcessorStatusChanged(entry);
}
-
diff --git a/Code/Tools/AssetProcessor/native/utilities/ApplicationManagerBase.h b/Code/Tools/AssetProcessor/native/utilities/ApplicationManagerBase.h
index 40106c69ec..7e6347b4d1 100644
--- a/Code/Tools/AssetProcessor/native/utilities/ApplicationManagerBase.h
+++ b/Code/Tools/AssetProcessor/native/utilities/ApplicationManagerBase.h
@@ -236,6 +236,11 @@ protected:
int m_remainingAPMJobs = 0;
bool m_assetProcessorManagerIsReady = false;
+ // When job priority and escalation is equal, jobs sort in order by job key.
+ // This switches that behavior to instead sort by the DB source name, which
+ // allows automated tests to get deterministic behavior out of Asset Processor.
+ bool m_sortJobsByDBSourceName = false;
+
unsigned int m_highestConnId = 0;
AzToolsFramework::Ticker* m_ticker = nullptr; // for ticking the tickbus.
diff --git a/Code/Tools/ProjectManager/Platform/Windows/ProjectBuilderWorker_windows.cpp b/Code/Tools/ProjectManager/Platform/Windows/ProjectBuilderWorker_windows.cpp
index a228f58e51..8856e2312a 100644
--- a/Code/Tools/ProjectManager/Platform/Windows/ProjectBuilderWorker_windows.cpp
+++ b/Code/Tools/ProjectManager/Platform/Windows/ProjectBuilderWorker_windows.cpp
@@ -118,7 +118,9 @@ namespace O3DE::ProjectManager
}
}
- if (m_configProjectProcess->exitCode() != 0 || !containsGeneratingDone)
+ if (m_configProjectProcess->exitStatus() != QProcess::ExitStatus::NormalExit
+ || m_configProjectProcess->exitCode() != 0
+ || !containsGeneratingDone)
{
QString error = tr("Configuring project failed. See log for details.");
QStringToAZTracePrint(error);
@@ -180,7 +182,8 @@ namespace O3DE::ProjectManager
}
}
- if (m_configProjectProcess->exitCode() != 0)
+ if (m_configProjectProcess->exitStatus() != QProcess::ExitStatus::NormalExit
+ || m_configProjectProcess->exitCode() != 0)
{
QString error = tr("Building project failed. See log for details.");
QStringToAZTracePrint(error);
diff --git a/Code/Tools/ProjectManager/Source/CreateProjectCtrl.cpp b/Code/Tools/ProjectManager/Source/CreateProjectCtrl.cpp
index 20d564d8b0..f098518fd3 100644
--- a/Code/Tools/ProjectManager/Source/CreateProjectCtrl.cpp
+++ b/Code/Tools/ProjectManager/Source/CreateProjectCtrl.cpp
@@ -265,6 +265,6 @@ namespace O3DE::ProjectManager
void CreateProjectCtrl::ReinitGemCatalogForSelectedTemplate()
{
const QString projectTemplatePath = m_newProjectSettingsScreen->GetProjectTemplatePath();
- m_gemCatalogScreen->ReinitForProject(projectTemplatePath + "/Template", /*isNewProject=*/true);
+ m_gemCatalogScreen->ReinitForProject(projectTemplatePath + "/Template");
}
} // namespace O3DE::ProjectManager
diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.cpp
index 53d772c217..863f611ec8 100644
--- a/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.cpp
+++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.cpp
@@ -62,10 +62,10 @@ namespace O3DE::ProjectManager
hLayout->addWidget(m_gemInspector);
}
- void GemCatalogScreen::ReinitForProject(const QString& projectPath, bool isNewProject)
+ void GemCatalogScreen::ReinitForProject(const QString& projectPath)
{
m_gemModel->clear();
- FillModel(projectPath, isNewProject);
+ FillModel(projectPath);
if (m_filterWidget)
{
@@ -88,18 +88,9 @@ namespace O3DE::ProjectManager
});
}
- void GemCatalogScreen::FillModel(const QString& projectPath, bool isNewProject)
+ void GemCatalogScreen::FillModel(const QString& projectPath)
{
- AZ::Outcome, AZStd::string> allGemInfosResult;
- if (isNewProject)
- {
- allGemInfosResult = PythonBindingsInterface::Get()->GetEngineGemInfos();
- }
- else
- {
- allGemInfosResult = PythonBindingsInterface::Get()->GetAllGemInfos(projectPath);
- }
-
+ AZ::Outcome, AZStd::string> allGemInfosResult = PythonBindingsInterface::Get()->GetAllGemInfos(projectPath);
if (allGemInfosResult.IsSuccess())
{
// Add all available gems to the model.
diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.h
index 204ad0e5c5..5b48b2f90e 100644
--- a/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.h
+++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.h
@@ -28,13 +28,13 @@ namespace O3DE::ProjectManager
~GemCatalogScreen() = default;
ProjectManagerScreen GetScreenEnum() override;
- void ReinitForProject(const QString& projectPath, bool isNewProject);
+ void ReinitForProject(const QString& projectPath);
bool EnableDisableGemsForProject(const QString& projectPath);
GemModel* GetGemModel() const { return m_gemModel; }
private:
- void FillModel(const QString& projectPath, bool isNewProject);
+ void FillModel(const QString& projectPath);
GemListView* m_gemListView = nullptr;
GemInspector* m_gemInspector = nullptr;
diff --git a/Code/Tools/ProjectManager/Source/ProjectBuilderController.cpp b/Code/Tools/ProjectManager/Source/ProjectBuilderController.cpp
index e782f0b57f..0ff963e539 100644
--- a/Code/Tools/ProjectManager/Source/ProjectBuilderController.cpp
+++ b/Code/Tools/ProjectManager/Source/ProjectBuilderController.cpp
@@ -104,7 +104,7 @@ namespace O3DE::ProjectManager
QMessageBox::critical(m_parent, tr("Project Failed to Build!"), result);
m_projectInfo.m_buildFailed = true;
- m_projectInfo.m_logUrl = QUrl();
+ m_projectInfo.m_logUrl = QUrl("file:///" + m_worker->GetLogFilePath());
emit NotifyBuildProject(m_projectInfo);
}
diff --git a/Code/Tools/ProjectManager/Source/UpdateProjectCtrl.cpp b/Code/Tools/ProjectManager/Source/UpdateProjectCtrl.cpp
index 981a9352f7..6aba261cd2 100644
--- a/Code/Tools/ProjectManager/Source/UpdateProjectCtrl.cpp
+++ b/Code/Tools/ProjectManager/Source/UpdateProjectCtrl.cpp
@@ -94,7 +94,7 @@ namespace O3DE::ProjectManager
Update();
// Gather the available gems that will be shown in the gem catalog.
- m_gemCatalogScreen->ReinitForProject(m_projectInfo.m_path, /*isNewProject=*/false);
+ m_gemCatalogScreen->ReinitForProject(m_projectInfo.m_path);
}
void UpdateProjectCtrl::HandleGemsButton()
diff --git a/Gems/Atom/Component/DebugCamera/Code/Source/CameraComponent.cpp b/Gems/Atom/Component/DebugCamera/Code/Source/CameraComponent.cpp
index 9a6f7c83ab..330b6571f3 100644
--- a/Gems/Atom/Component/DebugCamera/Code/Source/CameraComponent.cpp
+++ b/Gems/Atom/Component/DebugCamera/Code/Source/CameraComponent.cpp
@@ -235,7 +235,7 @@ namespace AZ
UpdateViewToClipMatrix();
}
- void CameraComponent::SetOrthographic(bool orthographic)
+ void CameraComponent::SetOrthographic([[maybe_unused]] bool orthographic)
{
AZ_Assert(!orthographic, "DebugCamera does not support orthographic projection");
}
diff --git a/Gems/Atom/Feature/Common/Assets/Passes/UI.pass b/Gems/Atom/Feature/Common/Assets/Passes/UI.pass
index ac43f17c11..fd59df5336 100644
--- a/Gems/Atom/Feature/Common/Assets/Passes/UI.pass
+++ b/Gems/Atom/Feature/Common/Assets/Passes/UI.pass
@@ -13,13 +13,7 @@
"ScopeAttachmentUsage": "DepthStencil",
"LoadStoreAction": {
"ClearValue": {
- "Type": "DepthStencil",
- "Value": [
- 0.0,
- 0.0,
- 0.0,
- 0.0
- ]
+ "Type": "DepthStencil"
},
"LoadActionStencil": "Clear"
}
diff --git a/Gems/Atom/Feature/Common/Assets/Scripts/material_find_overrides_demo.lua b/Gems/Atom/Feature/Common/Assets/Scripts/material_find_overrides_demo.lua
new file mode 100644
index 0000000000..dda3974043
--- /dev/null
+++ b/Gems/Atom/Feature/Common/Assets/Scripts/material_find_overrides_demo.lua
@@ -0,0 +1,160 @@
+----------------------------------------------------------------------------------------------------
+--
+-- Copyright (c) Contributors to the Open 3D Engine Project.
+-- For complete copyright and license terms please see the LICENSE at the root of this distribution.
+--
+-- SPDX-License-Identifier: Apache-2.0 OR MIT
+--
+--
+--
+----------------------------------------------------------------------------------------------------
+
+local FindMaterialAssignmentTest =
+{
+ Properties =
+ {
+ Textures =
+ {
+ "materials/presets/macbeth/05_blue_flower_srgb.tif.streamingimage",
+ "materials/presets/macbeth/06_bluish_green_srgb.tif.streamingimage",
+ "materials/presets/macbeth/09_moderate_red_srgb.tif.streamingimage",
+ "materials/presets/macbeth/11_yellow_green_srgb.tif.streamingimage",
+ "materials/presets/macbeth/12_orange_yellow_srgb.tif.streamingimage",
+ "materials/presets/macbeth/17_magenta_srgb.tif.streamingimage"
+ },
+ },
+}
+
+function randomColor()
+ return Color(math.random(), math.random(), math.random(), 1.0)
+end
+
+function randomDir()
+ dir = {}
+ for i = 1, 3 do
+ lerpDir = math.random()
+ if lerpDir < 0.5 then
+ table.insert(dir, -1.0)
+ else
+ table.insert(dir, 1.0)
+ end
+ end
+ return dir
+end
+
+function FindMaterialAssignmentTest:OnActivate()
+ self.timer = 0.0
+ self.totalTime = 0.0
+ self.totalTimeMax = 200.0
+ self.timeUpdate = 2.0
+ self.colors = {}
+ self.lerpDirs = {}
+
+ self.assignmentIds =
+ {
+ MaterialComponentRequestBus.Event.FindMaterialAssignmentId(self.entityId, -1, "lambert"),
+ }
+
+ for index = 1, #self.assignmentIds do
+ local id = self.assignmentIds[index]
+ if (id ~= nil) then
+ self.colors[index] = randomColor()
+ self.lerpDirs[index] = randomDir()
+ end
+ end
+ self.tickBusHandler = TickBus.Connect(self);
+end
+
+function FindMaterialAssignmentTest:UpdateFactor(assignmentId)
+ local propertyName = Name("baseColor.factor")
+ local propertyValue = math.random()
+ MaterialComponentRequestBus.Event.SetPropertyOverride(self.entityId, assignmentId, propertyName, propertyValue);
+end
+
+function FindMaterialAssignmentTest:UpdateColor(assignmentId, color)
+ local propertyName = Name("baseColor.color")
+ local propertyValue = color
+ MaterialComponentRequestBus.Event.SetPropertyOverride(self.entityId, assignmentId, propertyName, propertyValue);
+end
+
+function FindMaterialAssignmentTest:UpdateTexture(assignmentId)
+ if (#self.Properties.Textures > 0) then
+ local propertyName = Name("baseColor.textureMap")
+ local textureName = self.Properties.Textures[ math.random( #self.Properties.Textures ) ]
+ Debug.Log(textureName)
+ local textureAssetId = AssetCatalogRequestBus.Broadcast.GetAssetIdByPath(textureName, Uuid(), false)
+ MaterialComponentRequestBus.Event.SetPropertyOverride(self.entityId, assignmentId, propertyName, textureAssetId);
+ end
+end
+
+function FindMaterialAssignmentTest:UpdateProperties()
+ Debug.Log("Overriding properties...")
+ for index = 1, #self.assignmentIds do
+ local id = self.assignmentIds[index]
+ if (id ~= nil) then
+ self:UpdateFactor(id)
+ self:UpdateTexture(id)
+ end
+ end
+end
+
+function FindMaterialAssignmentTest:ClearProperties()
+ Debug.Log("Clearing properties...")
+ MaterialComponentRequestBus.Event.ClearAllPropertyOverrides(self.entityId);
+end
+
+function lerpColor(color, lerpDir, deltaTime)
+ local lerpSpeed = 0.5
+ color.r = color.r + deltaTime * lerpDir[1] * lerpSpeed
+ if color.r > 1.0 then
+ color.r = 1.0
+ lerpDir[1] = -1.0
+ elseif color.r < 0 then
+ color.r = 0
+ lerpDir[1] = 1.0
+ end
+
+ color.g = color.g + deltaTime * lerpDir[2] * lerpSpeed
+ if color.g > 1.0 then
+ color.g = 1.0
+ lerpDir[2] = -1.0
+ elseif color.g < 0 then
+ color.g = 0
+ lerpDir[2] = 1.0
+ end
+
+ color.b = color.b + deltaTime * lerpDir[3] * lerpSpeed
+ if color.b > 1.0 then
+ color.b = 1.0
+ lerpDir[3] = -1.0
+ elseif color.b < 0 then
+ color.b = 0
+ lerpDir[3] = 1.0
+ end
+end
+
+function FindMaterialAssignmentTest:lerpColors(deltaTime)
+ for index = 1, #self.assignmentIds do
+ local id = self.assignmentIds[index]
+ if (id ~= nil) then
+ lerpColor(self.colors[index], self.lerpDirs[index], deltaTime)
+ self:UpdateColor(id, self.colors[index])
+ end
+ end
+end
+
+function FindMaterialAssignmentTest:OnTick(deltaTime, timePoint)
+ self.timer = self.timer + deltaTime
+ self.totalTime = self.totalTime + deltaTime
+ self:lerpColors(deltaTime)
+
+ if (self.timer > self.timeUpdate and self.totalTime < self.totalTimeMax) then
+ self.timer = self.timer - self.timeUpdate
+ self:UpdateProperties()
+ elseif self.totalTime > self.totalTimeMax then
+ self:ClearProperties()
+ self.tickBusHandler:Disconnect(self);
+ end
+end
+
+return FindMaterialAssignmentTest
\ No newline at end of file
diff --git a/Gems/Atom/Feature/Common/Assets/Scripts/material_property_overrides_demo.lua b/Gems/Atom/Feature/Common/Assets/Scripts/material_property_overrides_demo.lua
index c470748801..685fd8310b 100644
--- a/Gems/Atom/Feature/Common/Assets/Scripts/material_property_overrides_demo.lua
+++ b/Gems/Atom/Feature/Common/Assets/Scripts/material_property_overrides_demo.lua
@@ -53,10 +53,9 @@ function PropertyOverrideTest:OnActivate()
self.originalAssignments = MaterialComponentRequestBus.Event.GetOriginalMaterialAssignments(self.entityId);
self.assignmentIds = self.originalAssignments:GetKeys()
- for index = 0, self.assignmentIds:Size() do
- local idOutcome = self.assignmentIds:At(index)
- if (idOutcome:IsSuccess()) then
- local id = idOutcome:GetValue()
+ for index = 1, self.assignmentIds:GetSize() do
+ local id = self.assignmentIds[index]
+ if (id ~= nil) then
self.colors[index] = randomColor()
self.lerpDirs[index] = randomDir()
end
@@ -88,10 +87,9 @@ end
function PropertyOverrideTest:UpdateProperties()
Debug.Log("Overriding properties...")
- for index = 0, self.assignmentIds:Size() do
- local idOutcome = self.assignmentIds:At(index)
- if (idOutcome:IsSuccess()) then
- local id = idOutcome:GetValue()
+ for index = 1, self.assignmentIds:GetSize() do
+ local id = self.assignmentIds[index]
+ if (id ~= nil) then
self:UpdateFactor(id)
self:UpdateTexture(id)
end
@@ -134,10 +132,9 @@ function lerpColor(color, lerpDir, deltaTime)
end
function PropertyOverrideTest:lerpColors(deltaTime)
- for index = 0, self.assignmentIds:Size() do
- local idOutcome = self.assignmentIds:At(index)
- if (idOutcome:IsSuccess()) then
- local id = idOutcome:GetValue()
+ for index = 1, self.assignmentIds:GetSize() do
+ local id = self.assignmentIds[index]
+ if (id ~= nil) then
lerpColor(self.colors[index], self.lerpDirs[index], deltaTime)
self:UpdateColor(id, self.colors[index])
end
diff --git a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Material/MaterialAssignment.h b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Material/MaterialAssignment.h
index 12a9c0fccc..987e78ae0f 100644
--- a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Material/MaterialAssignment.h
+++ b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Material/MaterialAssignment.h
@@ -5,6 +5,7 @@
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
+
#pragma once
#include
@@ -63,5 +64,8 @@ namespace AZ
//! Utility function for generating a set of available material assignments in a model
MaterialAssignmentMap GetMaterialAssignmentsFromModel(Data::Instance model);
+ //! Find an assignment id corresponding to the lod and label substring filters
+ MaterialAssignmentId FindMaterialAssignmentIdInModel(
+ const Data::Instance& model, const MaterialAssignmentLodIndex lodFilter, const AZStd::string& labelFilter);
} // namespace Render
} // namespace AZ
diff --git a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Material/MaterialAssignmentId.h b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Material/MaterialAssignmentId.h
index dd198a7179..e58a8397db 100644
--- a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Material/MaterialAssignmentId.h
+++ b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Material/MaterialAssignmentId.h
@@ -15,6 +15,7 @@
#include
#include
#include
+#include
namespace AZ
{
@@ -23,51 +24,50 @@ namespace AZ
using MaterialAssignmentLodIndex = AZ::u64;
//! MaterialAssignmentId is used to address available and overridable material slots on a model.
- //! The LOD and one of the model's original material asset IDs are used as coordinates that identify
+ //! The LOD and one of the model's original material slot IDs are used as coordinates that identify
//! a specific material slot or a set of slots matching either.
struct MaterialAssignmentId final
{
AZ_RTTI(AZ::Render::MaterialAssignmentId, "{EB603581-4654-4C17-B6DE-AE61E79EDA97}");
AZ_CLASS_ALLOCATOR(AZ::Render::MaterialAssignmentId, SystemAllocator, 0);
static void Reflect(ReflectContext* context);
+ static bool ConvertVersion(AZ::SerializeContext& context, AZ::SerializeContext::DataElementNode& classElement);
MaterialAssignmentId() = default;
- MaterialAssignmentId(MaterialAssignmentLodIndex lodIndex, const AZ::Data::AssetId& materialAssetId);
+ MaterialAssignmentId(MaterialAssignmentLodIndex lodIndex, RPI::ModelMaterialSlot::StableId materialSlotStableId);
- //! Create an ID that maps to all material slots, regardless of asset ID or LOD, effectively applying to an entire model.
+ //! Create an ID that maps to all material slots, regardless of slot ID or LOD, effectively applying to an entire model.
static MaterialAssignmentId CreateDefault();
- //! Create an ID that maps to all material slots with a corresponding asset ID, regardless of LOD.
- static MaterialAssignmentId CreateFromAssetOnly(AZ::Data::AssetId materialAssetId);
+ //! Create an ID that maps to all material slots with a corresponding slot ID, regardless of LOD.
+ static MaterialAssignmentId CreateFromStableIdOnly(RPI::ModelMaterialSlot::StableId materialSlotStableId);
- //! Create an ID that maps to a specific material slot with a corresponding asset ID and LOD.
- static MaterialAssignmentId CreateFromLodAndAsset(MaterialAssignmentLodIndex lodIndex, AZ::Data::AssetId materialAssetId);
+ //! Create an ID that maps to a specific material slot with a corresponding stable ID and LOD.
+ static MaterialAssignmentId CreateFromLodAndStableId(MaterialAssignmentLodIndex lodIndex, RPI::ModelMaterialSlot::StableId materialSlotStableId);
- //! Returns true if the asset ID and LOD are invalid
+ //! Returns true if the slot stable ID and LOD are invalid, meaning this assignment applies to the entire model.
bool IsDefault() const;
- //! Returns true if the asset ID is valid and LOD is invalid
- bool IsAssetOnly() const;
+ //! Returns true if the slot stable ID is valid and LOD is invalid, meaning this assignment applies to every LOD.
+ bool IsSlotIdOnly() const;
- //! Returns true if the asset ID and LOD are both valid
- bool IsLodAndAsset() const;
+ //! Returns true if the slot stable ID and LOD are both valid, meaning this assignment applies to a single material slot on a specific LOD.
+ bool IsLodAndSlotId() const;
- //! Creates a string composed of the asset path and LOD
+ //! Creates a string describing all the details of the assignment ID
AZStd::string ToString() const;
- //! Creates a hash composed of the asset ID sub ID and LOD
+ //! Creates a hash composed of all elements of the assignment ID
size_t GetHash() const;
- //! Returns true if both asset ID sub IDs and LODs match
bool operator==(const MaterialAssignmentId& rhs) const;
-
- //! Returns true if both asset ID sub IDs and LODs do not match
bool operator!=(const MaterialAssignmentId& rhs) const;
static constexpr MaterialAssignmentLodIndex NonLodIndex = -1;
+
MaterialAssignmentLodIndex m_lodIndex = NonLodIndex;
- AZ::Data::AssetId m_materialAssetId = AZ::Data::AssetId();
+ RPI::ModelMaterialSlot::StableId m_materialSlotStableId = RPI::ModelMaterialSlot::InvalidStableId;
};
} // namespace Render
diff --git a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/SkinnedMesh/SkinnedMeshInputBuffers.h b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/SkinnedMesh/SkinnedMeshInputBuffers.h
index 5d333e070e..c52bed8cf2 100644
--- a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/SkinnedMesh/SkinnedMeshInputBuffers.h
+++ b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/SkinnedMesh/SkinnedMeshInputBuffers.h
@@ -45,7 +45,7 @@ namespace AZ
uint32_t m_vertexOffset = 0;
uint32_t m_vertexCount = 0;
Aabb m_aabb = Aabb::CreateNull();
- Data::Asset m_material;
+ AZ::RPI::ModelMaterialSlot m_materialSlot;
};
//! Buffer views for a specific sub-mesh that are not modified during skinning and thus are shared by all instances of the same skinned mesh
diff --git a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/IndexedDataVector.h b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/IndexedDataVector.h
new file mode 100644
index 0000000000..37835bd6a8
--- /dev/null
+++ b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/IndexedDataVector.h
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) Contributors to the Open 3D Engine Project.
+ * For complete copyright and license terms please see the LICENSE at the root of this distribution.
+ *
+ * SPDX-License-Identifier: Apache-2.0 OR MIT
+ *
+ */
+
+#pragma once
+
+#include
+#include
+
+namespace AZ::Render
+{
+ // Growable vector that leverages indirection to support erasure of elements while maintaining
+ // resident data in a densely packed region of memory. Useful as a backing store for growable
+ // buffers intended to be uploaded to the GPU for example.
+ template
+ class IndexedDataVector
+ {
+ public:
+ IndexedDataVector();
+ explicit IndexedDataVector(size_t initialReservedSize);
+ ~IndexedDataVector() = default;
+
+ static constexpr IndexType NoFreeSlot = std::numeric_limits::max();
+ IndexType m_firstFreeSlot = NoFreeSlot;
+
+ void Clear();
+ IndexType GetFreeSlotIndex();
+ void RemoveIndex(IndexType index);
+
+ DataType& GetData(IndexType index);
+ const DataType& GetData(IndexType index) const;
+ size_t GetDataCount() const;
+
+ AZStd::vector& GetDataVector();
+ const AZStd::vector& GetDataVector() const;
+
+ AZStd::vector& GetIndexVector();
+ const AZStd::vector& GetIndexVector() const;
+
+ IndexType GetRawIndex(IndexType index) const;
+
+ private:
+ constexpr static size_t InitialReservedSize = 128;
+
+ // Stores data indices and an embedded free list
+ AZStd::vector m_indices;
+ // Stores the indirection index
+ AZStd::vector m_dataToIndices;
+ AZStd::vector m_data;
+ };
+} // namespace AZ::Render
+
+#include
diff --git a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/IndexedDataVector.inl b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/IndexedDataVector.inl
new file mode 100644
index 0000000000..076caad7f4
--- /dev/null
+++ b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/IndexedDataVector.inl
@@ -0,0 +1,134 @@
+/*
+ * Copyright (c) Contributors to the Open 3D Engine Project.
+ * For complete copyright and license terms please see the LICENSE at the root of this distribution.
+ *
+ * SPDX-License-Identifier: Apache-2.0 OR MIT
+ *
+ */
+
+namespace AZ::Render
+{
+ template
+ inline IndexedDataVector::IndexedDataVector()
+ : IndexedDataVector(InitialReservedSize)
+ {
+ }
+
+ template
+ inline IndexedDataVector::IndexedDataVector(size_t initialReservedSize)
+ {
+ m_dataToIndices.reserve(initialReservedSize);
+ m_indices.reserve(initialReservedSize);
+ m_data.reserve(initialReservedSize);
+ }
+
+ template
+ inline void IndexedDataVector::Clear()
+ {
+ m_dataToIndices.clear();
+ m_indices.clear();
+ m_data.clear();
+
+ m_firstFreeSlot = NoFreeSlot;
+ }
+
+ template
+ inline IndexType IndexedDataVector::GetFreeSlotIndex()
+ {
+ IndexType freeSlotIndex = static_cast(m_indices.size());
+
+ if (freeSlotIndex == NoFreeSlot)
+ {
+ // the vector is full
+ return NoFreeSlot;
+ }
+
+ if (m_firstFreeSlot == NoFreeSlot)
+ {
+ // If there's no free slot, add on to the end.
+ m_indices.push_back(freeSlotIndex);
+ }
+ else
+ {
+ // Fill the free slot. m_indices uses it's empty slots to store a linked list (via indices) to other empty slots.
+ freeSlotIndex = m_firstFreeSlot;
+ m_firstFreeSlot = m_indices.at(m_firstFreeSlot);
+ m_indices.at(freeSlotIndex) = static_cast(m_data.size());
+ }
+
+ // The data itself is always packed and m_indices points at it, so push a new entry to the back.
+ m_data.push_back(DataType());
+ m_dataToIndices.push_back(freeSlotIndex);
+
+ return freeSlotIndex;
+ }
+
+ template
+ inline void IndexedDataVector::RemoveIndex(IndexType index)
+ {
+ IndexType dataIndex = m_indices.at(index);
+
+ // Copy the back light on top of this one.
+ m_data.at(dataIndex) = m_data.back();
+ m_dataToIndices.at(dataIndex) = m_dataToIndices.back();
+
+ // Update the index of the moved light
+ m_indices.at(m_dataToIndices.at(dataIndex)) = dataIndex;
+
+ // Pop the back
+ m_data.pop_back();
+ m_dataToIndices.pop_back();
+
+ // Use free slot to link to next free slot
+ m_indices.at(index) = m_firstFreeSlot;
+ m_firstFreeSlot = index;
+ }
+
+ template
+ inline DataType& IndexedDataVector::GetData(IndexType index)
+ {
+ return m_data.at(m_indices.at(index));
+ }
+
+ template
+ inline const DataType& IndexedDataVector::GetData(IndexType index) const
+ {
+ return m_data.at(m_indices.at(index));
+ }
+
+ template
+ inline size_t IndexedDataVector::GetDataCount() const
+ {
+ return m_data.size();
+ }
+
+ template
+ inline AZStd::vector& IndexedDataVector::GetDataVector()
+ {
+ return m_data;
+ }
+
+ template
+ inline const AZStd::vector& IndexedDataVector::GetDataVector() const
+ {
+ return m_data;
+ }
+
+ template
+ inline AZStd::vector& IndexedDataVector::GetIndexVector()
+ {
+ return m_dataToIndices;
+ }
+
+ template
+ inline const AZStd::vector& IndexedDataVector::GetIndexVector() const
+ {
+ return m_dataToIndices;
+ }
+
+ template
+ IndexType IndexedDataVector::GetRawIndex(IndexType index) const
+ {
+ return m_indices.at(index);
+ }
+} // namespace AZ::Render
diff --git a/Gems/Atom/Feature/Common/Code/Source/CommonSystemComponent.cpp b/Gems/Atom/Feature/Common/Code/Source/CommonSystemComponent.cpp
index 6ad0099686..1500079b00 100644
--- a/Gems/Atom/Feature/Common/Code/Source/CommonSystemComponent.cpp
+++ b/Gems/Atom/Feature/Common/Code/Source/CommonSystemComponent.cpp
@@ -284,7 +284,7 @@ namespace AZ
passSystem->AddPassCreator(Name("ReflectionScreenSpaceCompositePass"), &Render::ReflectionScreenSpaceCompositePass::Create);
passSystem->AddPassCreator(Name("ReflectionCopyFrameBufferPass"), &Render::ReflectionCopyFrameBufferPass::Create);
- // Add RayTracing pas
+ // Add RayTracing pass
passSystem->AddPassCreator(Name("RayTracingPass"), &Render::RayTracingPass::Create);
// setup handler for load pass template mappings
diff --git a/Gems/Atom/Feature/Common/Code/Source/CoreLights/CapsuleLightFeatureProcessor.h b/Gems/Atom/Feature/Common/Code/Source/CoreLights/CapsuleLightFeatureProcessor.h
index a85831e290..6749acfcf5 100644
--- a/Gems/Atom/Feature/Common/Code/Source/CoreLights/CapsuleLightFeatureProcessor.h
+++ b/Gems/Atom/Feature/Common/Code/Source/CoreLights/CapsuleLightFeatureProcessor.h
@@ -10,7 +10,7 @@
#include
#include
-#include
+#include
#include
namespace AZ
diff --git a/Gems/Atom/Feature/Common/Code/Source/CoreLights/DirectionalLightFeatureProcessor.h b/Gems/Atom/Feature/Common/Code/Source/CoreLights/DirectionalLightFeatureProcessor.h
index a312b31dda..4c486c4540 100644
--- a/Gems/Atom/Feature/Common/Code/Source/CoreLights/DirectionalLightFeatureProcessor.h
+++ b/Gems/Atom/Feature/Common/Code/Source/CoreLights/DirectionalLightFeatureProcessor.h
@@ -9,9 +9,9 @@
#pragma once
#include
-#include
#include
+#include
#include
#include
#include
diff --git a/Gems/Atom/Feature/Common/Code/Source/CoreLights/DiskLightFeatureProcessor.h b/Gems/Atom/Feature/Common/Code/Source/CoreLights/DiskLightFeatureProcessor.h
index 2e97ae1ded..36837a67fb 100644
--- a/Gems/Atom/Feature/Common/Code/Source/CoreLights/DiskLightFeatureProcessor.h
+++ b/Gems/Atom/Feature/Common/Code/Source/CoreLights/DiskLightFeatureProcessor.h
@@ -11,7 +11,7 @@
#include
#include
#include
-#include
+#include
#include
namespace AZ
diff --git a/Gems/Atom/Feature/Common/Code/Source/CoreLights/IndexedDataVector.h b/Gems/Atom/Feature/Common/Code/Source/CoreLights/IndexedDataVector.h
deleted file mode 100644
index f2a372aca9..0000000000
--- a/Gems/Atom/Feature/Common/Code/Source/CoreLights/IndexedDataVector.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) Contributors to the Open 3D Engine Project.
- * For complete copyright and license terms please see the LICENSE at the root of this distribution.
- *
- * SPDX-License-Identifier: Apache-2.0 OR MIT
- *
- */
-
-#pragma once
-
-#include
-#include
-
-namespace AZ
-{
- namespace Render
- {
- template
- class IndexedDataVector
- {
- public:
- IndexedDataVector();
- ~IndexedDataVector() = default;
-
- static constexpr IndexType NoFreeSlot = std::numeric_limits::max();
- IndexType m_firstFreeSlot = NoFreeSlot;
-
- void Clear();
- IndexType GetFreeSlotIndex();
- void RemoveIndex(IndexType index);
-
- DataType& GetData(IndexType index);
- const DataType& GetData(IndexType index) const;
- size_t GetDataCount() const;
-
- AZStd::vector& GetDataVector();
- const AZStd::vector& GetDataVector() const;
-
- IndexType GetRawIndex(IndexType index) const;
-
- private:
-
- static constexpr size_t InitialReservedCount = 128;
-
- // stores the index of data vector for respective light, it also include a linked list to flag the free slots
- AZStd::vector m_indices;
- // stores the index of index vector for respective light
- AZStd::vector m_dataToIndices;
- // stores light data
- AZStd::vector m_data;
- };
-
-#include "IndexedDataVector.inl"
- }
-}
diff --git a/Gems/Atom/Feature/Common/Code/Source/CoreLights/IndexedDataVector.inl b/Gems/Atom/Feature/Common/Code/Source/CoreLights/IndexedDataVector.inl
deleted file mode 100644
index da10e5a503..0000000000
--- a/Gems/Atom/Feature/Common/Code/Source/CoreLights/IndexedDataVector.inl
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright (c) Contributors to the Open 3D Engine Project.
- * For complete copyright and license terms please see the LICENSE at the root of this distribution.
- *
- * SPDX-License-Identifier: Apache-2.0 OR MIT
- *
- */
-
-template
-inline IndexedDataVector::IndexedDataVector()
-{
- m_dataToIndices.reserve(InitialReservedCount);
- m_indices.reserve(InitialReservedCount);
- m_data.reserve(InitialReservedCount);
-}
-
-template