Commit Graph

88 Commits

Author SHA1 Message Date
greerdv a49017ec23 merging from main 2021-05-05 13:26:08 +01:00
AMZN-koppersr 2d4a17a2fb Merge branch 'main' into JsonSerializationPointerFix 2021-05-04 13:53:03 -07:00
AMZN-koppersr afcbe4e02b Small updates based on PR feedback. 2021-05-04 13:51:08 -07:00
Aaron Ruiz Mora f770e4aa7a Unifying operators in Matrix3x3, Matrix3x4 and Matrix4x4
- Add operators +, -, * and / too all matrix classes
- Add RetrieveScaleSq and GetReciprocalScaled to all matrix classes
- Add unit tests to all matrix classes
- Fix a bug that causes release configuration not to compile.
2021-05-04 19:12:01 +01:00
AMZN-koppersr 11b79f567a Smart and raw pointer support in Json Serialization now behave similarly.
The behavior of smart pointers was not updated after the changes to raw pointers, in particular with how default JSON Objects were handled. They both now treat an empty JSON Object (a.k.a. the id for default instances) as meaning to create a default instance on the pointer even if the default is a nullptr. To have a nullptr a JSON Null has to be explicitly written.
2021-05-04 11:10:46 -07:00
greerdv d9b3b7ccfa adding non-uniform scale component via button on transform component and forcing it to be adjacent in the component sort order and visible 2021-05-04 18:31:43 +01:00
Mike Balfour 31746705eb Merge pull request #541 from aws-lumberyard-dev/mbalfour/lyn-3464
[LYN-3464] Vegetation unit tests intermittently failed due to AssetManager bug
2021-05-04 11:50:49 -05:00
mbalfour 53a6e5ac6b Addressed feedback. 2021-05-04 10:08:59 -05:00
mbalfour 5df82caef6 [LYN-3464] Vegetation unit tests intermittently failed due to an AssetManager bug. Inside the AssetContainer, if the root asset finished loading during the container initialization, the CheckReady() call at the end of initialization would detect the loaded asset, but would skip sending out notifications because the initialized flag wasn't set yet. This would lead to an extra asset reference remaining in the AssetManager itself, would would then cause errors when the asset handler for that asset got removed.
By setting the initialization flag before the CheckReady() call, the notifications get sent correctly, and no extra asset references remain.  This checkin also includes a unit test for the AssetManager that specifically forces this condition to happen and validates that it works correctly.
2021-05-04 09:04:18 -05:00
Aaron Ruiz Mora 70bd3ea0ff Performance pass to Cloth CPU Skinning
- Added operator+(Matrix3x4), operator*(float), RetrieveScaleSq and GetReciprocalScaled to Matrix3x4. Used by Cloth CPU Linear Skinning. These operation will be performant as they use SIMD.
- Modified so there are no virtual functions calls at vertex level.
- Caching indices to simplify the loop when applying skinning.
- Caching static variables Matrix3x4 zero and DualQuaternion zero to avoid creating it for every vertex.
- Removing branching to skip joints when the weight is zero, these cases are rarely and this improves performance by removing branching from loops at vertex level.
- Changing skinning influences so it's a continuous block of memory.
- Caching the vector size() if a variable instead of directly using it in a for loop.
2021-05-04 12:09:56 +01:00
Chris Burel 31885753cb Fixes for compile failures with Clang on Windows (#532)
* Fix compile errors when building with Clang.

* Fix for clang-based unity builds
2021-05-03 22:46:28 -07:00
mbalfour 2cfb7d536e [LYN-3411] Editor freezes when saving/reloading slice due to deadlock between main thread which is blocked waiting on a loading asset, and the loading thread, which is blocked on a mutex held by the main thread.
The specific mutex is "m_assetMutex" in the AssetManager.  AssetManager::ReloadAssetFromData was holding this lock while calling AssignAssetData, which goes on to call OnAssetReloaded.  This is dangerous, because any arbitrary logic can be executed during that call, including blocking asset loads, which is what happens in this specific deadlock case.  The fix is to move the call to AssignAssetData outside of the mutex lock.  AssignAssetData itself already grabs the assetMutex to protect the parts of its logic that are necessary, and then specifically releases the lock before calling OnAssetReloaded, so this change shouldn't introduce any dangerous threading conditions.

(cherry picked from commit 1581a28339f12d521955edef890acfb678a0df6f)
2021-04-30 09:13:30 -05:00
luissemp f5a9aaff5b Removed temporary debugging test 2021-04-29 10:12:09 -07:00
luissemp 13cf0be08a Restored the code that clears the Lua asset cache 2021-04-29 10:09:35 -07:00
Eric Phister fbdd26bbbc Merge pull request #410 from aws-lumberyard-dev/ly-sdk/phistere/LYN-2723-Merge
LYN-2723: Fixes issues with bad project or engine paths

Cherry-pick: 6ce7a6d30c57c941459b43c157861df5d9143ae1
2021-04-29 11:01:32 -05:00
lumberyard-employee-dm 3dec5d3b71 LYN-2537 engine assets (#254)
* LYN-2537 Moved the Engine and Editor folder to be within the EngineAssets folder

* Fixed Documentation in bootstrap.cfg to correct the path to the user project specific registry file

* Adding a newline to the output of AssetCatalog 'Registering asset..., but type is not set' message

* Updating the AssetProcessorPlatformConfig.setreg Scan Folder to detect
the @ENGINEROOT@/EngineAssets/Engine path for engine runtime assets and
@ENGINEROOT@/EngineAssets/Editor path for engine tool assets

* Updating references to Icons and other assets to account for moving the
Engine and Editor folder under a single EngineAssets folder

* Moving the Engine Settings Registry folder from Engine/Registry -> Registry

* Removed the LY_PROJECT_CMAKE_PATH define as it is not portable to other locations. It is hard coded to the project location that was used for the CMake configuration. Furthermore it paths with backslashes within it are treated as escape characters and not a path separator

* Updated the LyTestTools asset_processor.py script to copy the exclude.filetag from the EngineAssets/Engine directory now

* Fixed Atom Shader Preprocessing when running using an External Project

* Updated the TSGenerateAction.cpp to fix the build error with using a renamed variable

* Updated the Install_Common.cmake ly_setup_others function to install the
EngineAssets directory and the each of the Gem's Assets directory while
maintaining the relative directory structure to the Engine Root
Also updated the install step to install the Registry folder at the
engine root

* Fixed the copying of the Registry folder to be in the install root, instead of under a second 'Registry' folder

* Moving the AssetProcessorPlatformConfig.setreg file over to the Registry folder

* Updated the LyTestTools and C++ code to point that the new location of
the AssetProcessorPlatformConfig.setreg file inside of the Registry
folder

* Renamed Test AssetProcessor*Config.ini files to have the .setreg extension

* Converted the AssetProcessor test setreg files from ini format to json
format using the SerializeContextTools convert-ini command

* Updated the AssetProcessor CMakeLists.txt to copy over the test setreg files to the build folder

* Updated the assetprocessor test file list to point at the renamed AsssetProcessor*Config setreg filenames

* Removed the Output Prefix code from the AssetProcessor. The complexity that it brought to the AP code is not needed, as users can replicate the behavior by just moving there assets underneath a another folder, underneath the scan folder

* Adding back support to read the AssetProcessorPlatformConfig.setreg file from the asset root. This is only needed for C++ UnitTests as they run in an environment where the accessing the Engine Settings Registry is not available

* Updating the Install_common.cmake logic to copy any "Assets" folder to
the install layout.
The Script has also been updated to copy over the "Assets" folder in the
Engine Root to the install layout instead of an "EngineAssets" folder

* Updating References to EngineAssets source asset folder in code to be the Assets source folder

* Moved the Engine Source Asset folder of 'EngineAssets' to a new folder name of 'Assets'. This is inline with the naming scheme we use for Gem asset folders

* Adding the EngineFinder.cmake to the AutomatedTesting project to allow it to work in a project centric manner

* Updating the LyTestTools copy_assets_to_project function to be able to copy assets with folders to the temporary project root
Fixed an issue in LyTestTools where the temporary log directory could have shutil.rmtree being called twice on it leading to an exception which fails an automated test

Updated the asset_procesor_gui_tests_2 AddScanFolder test to not use the
output prefix, but instead place the source asset root into a
subdirectory

* Correct the AssetProcessorPlatformConfig Scan Folders for the EngineAssets directory to point at the Assets directory

* Updated the asset procesor batch dependency test scan folder to point at the 'Assets' folder instead of 'EngineAssets'
2021-04-28 21:38:43 -05:00
Eric Phister 7dd7e82d86 LYN-2723: Fixes issues with bad project or engine paths (#369)
* Setup NativeUIRequests as an AZ::Interface.  Adds a NativeUISystemComponent to AzFramework Application.

* Renames NativeUISystemComponent (class) to NativeUISystem, since it's no longer a Component.

* Minor update to SettingsRegistryInterface::Remove doc-comments for accuracy.

* Fixes to make an early fatal shutdown of Editor occur without crash.

* LYN-2723: Updates startup to handle errors: engine root is empty, no valid project.json found (mismatched engine name), or bad project path (launch project picker dialog).

* LYN-2723: Minor formatting/spelling edits.

* LYN-2723: Moves ParseCommandLine from ComponentApplication to SettingsRegistryMergeUtils so it can be used in more places.

* Misc fixes. 'wait_for_connect' setting wasn't being properly applied to AP connection settings. Fix infinite loop in CCmdLine::Next.

* LYN-2723: Addresses review feedback.

* LYN-2723: Reverts some changes that caused a unit test to fail.

* LYN-2723: Reverts one more change that was unnecessary.
2021-04-28 19:03:17 -05:00
AMZN-koppersr b4976ff9cb Merge pull request #327 from aws-lumberyard-dev/JsonSerializationTypeIdBug
Typeid bug fix in Json Serialization.
2021-04-28 10:44:42 -07:00
AMZN-koppersr 2dfe9942f2 Merge branch 'main' into JsonSerializationTypeIdBug 2021-04-28 09:23:41 -07:00
hultonha d36a9470a3 Merge branch 'main' into hultonha_PR-37_follow-up 2021-04-28 09:27:00 +01:00
mnaumov 5f33337fec Merge main 2021-04-27 11:05:22 -07:00
AMZN-koppersr 0f8e6cbda1 Fixed a Linux build error. 2021-04-27 10:36:43 -07:00
mnaumov 91f027a05c PR feedback 2021-04-26 17:42:49 -07:00
AMZN-koppersr 6dfa33816b Fixed a bug with type ids for inherited classes with a custom serializer.
The code that adds a $type field for pointers where needed was still assuming that custom serializer were always for primitives, which isn't the case anymore. This changes updates the behavior to allow $type to be added to those as well as long as they use an object. This does now however rely more heavily on earlier checks that the data needs a $type because it otherwise can't tell the difference between a primitive getting a default value (an empty object). In the original code this situation would have resulted in failed serialization though, so it's unlikely to be a problem.
2021-04-26 15:26:18 -07:00
hultonha fbaa59f28f updates following review feedback 2021-04-26 15:03:29 +01:00
Chris Burel 61fe298319 Merge pull request #197 from aws-lumberyard-dev/filesEndInNewlines
Add newlines to the end of all files
2021-04-23 12:11:40 -07:00
Chris Burel 28170ffe41 Add newlines to the end of all files 2021-04-23 09:43:40 -07:00
amzn-mike d25179303d Add jira ticket for disabled tests 2021-04-23 10:50:58 -05:00
amzn-mike c61b244416 Use a const to toggle asset cancellation on and off 2021-04-23 09:56:59 -05:00
amzn-mike 9e2836613f Merge branch 'main' into amzn-mike/lyn-2249-disable-cancel 2021-04-22 15:38:32 -05:00
amzn-mike 58e8233c2c Remove debug message 2021-04-22 15:27:16 -05:00
amzn-mike 0428189bed Increase test difficulty 2021-04-22 15:18:54 -05:00
amzn-mike 39789c30d8 Remove container OnAssetCanceled event 2021-04-22 15:03:04 -05:00
amzn-mike 35a47932eb Disable weak references and unit tests for them. 2021-04-22 15:02:41 -05:00
Terry Michaels d680995074 Renamed several non-inclusive terms (#236) 2021-04-22 13:31:26 -05:00
greerdv 1fa5728655 Merge pull request #69 from aws-lumberyard-dev/non-uniform-scale-mesh
support for non-uniform scale component with atom mesh component
2021-04-22 18:49:36 +01:00
amzn-mike 3907ffc173 Add unit test 2021-04-22 12:01:21 -05:00
mbalfour bd23944531 Fix issues with rapid asset cancellation / reload:
* Asset<T>::QueueLoad didn't trigger any loads in the case where an asset was in a Queued state, it simply returned the reference.  This caused problems in the case where an asset was in the process of being cancelled and garbage collected, as it could be in a queued state with nothing actively loading it.  The method now detects this case and calls GetAsset(), which triggers a new load.
* AssetContainer::IsValid() was returning true for canceled containers that no longer had a root asset.  Now it returns false, to help ensure the container doesn't try to get reused.
* AssetContainer would add entries to the preloadList even if any potential preloads were filtered out from the load.  They are no longer added, since they shouldn't be waiting for any dependent assets to load.  (This could cause incorrect warnings to print in some situations)
* AssetContainer was erroneously warning about removing assets from a missing waiting list.  The warning was removed, as the condition could occur when the same asset was being loading by two different containers - once with dependencies and once without.
* AssetDataStream::RequestCancel has been added, as it was missing, but nothing currently needs to use it.
* AssetManager::GetAssetContainer() now verifies that the container is valid before attempting to reuse it.  This prevents asset containers that are in the middle of cancellation from getting reused.
2021-04-22 12:01:19 -05:00
AMZN-AlexOteiza dbcb2f9916 Added sys_assert level 3 which will make asserts to crash the application(#208)
Co-authored-by: aljanru <aljanru@amazon.com>
2021-04-22 17:46:37 +01:00
greerdv 62a3b7635b Merge branch 'main' into non-uniform-scale-mesh 2021-04-21 10:56:36 +01:00
SJ 3df1ffe3b7 3rd Party static libraries need to be public dependencies to work from installed engine.
Merge pull request #168 from aws-lumberyard-dev/LYN-2588
2021-04-20 14:11:08 -07:00
amzn-sj f53c1e8084 3rd Party static libraries need to be public dependencies to work from installed engine. 2021-04-20 12:16:40 -07:00
mbalfour d9fe89ba56 Addressed feedback - made string& into a string_view. 2021-04-20 13:37:10 -05:00
greerdv 12cbba5fad adding test for Aabb::MultiplyByScale 2021-04-20 17:42:38 +01:00
mbalfour e8459898a7 Exposed Quaternion::CreateFromEulerAnglesDegrees and Transform::Transform(Vector3, Quaternion, Vector3) to the behavior context to improve usability of these classes from scripts.
(cherry picked from commit 8156beb21181f9ff20972c8ea8be5e3dc61f1700)
2021-04-20 09:08:40 -05:00
mbalfour 33e61ad35b Added SetEntityName and exposed Get/SetEntityName to the behavior context for use from scripts.
(cherry picked from commit 4f2e0b74727cfe99c74ed588769a540f24d7aa46)
2021-04-20 09:08:19 -05:00
greerdv cc937e0809 feedback from PR 2021-04-20 14:44:31 +01:00
greerdv fd8b42c45e Merge branch 'main' into non-uniform-scale-mesh 2021-04-20 10:29:55 +01:00
greerdv f0ae8056c8 feedback from PR 2021-04-20 10:25:19 +01:00
mcgarrah 9412078992 Fixed issue if the "/Amazon/AzCore/Bootstrap/<platform>_assets" or
"/Amazon/AzCore/Bootstrap/assets" key is set, then it would append that
value to the default asset platform value for the OS
2021-04-19 10:23:58 -05:00