Commit Graph

215 Commits (4014cacff8b9c05071fcd203fd43d8ed19e243b5)

Author SHA1 Message Date
carlitosan 43e157035e
Merge pull request #1272 from aws-lumberyard-dev/carlito/stabilization/2106
Carlito/stabilization/2106  Fix for AP errors on graph, and Lua properties table fix
5 years ago
jackalbe 4818d1ce80
{LYN-4224} Fix for the file scan slowdown (#1252)
* {LYN-4224} Fix for the file scan slowdown (#1183)

* {LYN-4224} Fix for the file scan slowdown

* Fixed a slowdown in the file scanning logic
* Improved the file scanning logic from previous code by 40%

Tests:
Using Testing\Pytest\AutomatedTesting_BlastTest

old code:
=== 7 passed in 96.13s (0:01:36) ===

current code:
=== 7 passed in 160.45s (0:02:40) ====

newest code:
=== 7 passed in 52.91s ===

* fixing a unit test compile error

* unit test fixes

* another file improvement

* fix for legacy level loading taking too long

* making an enum for the search types

* switched the enum to "allow" types to make the input more clear

* got rid of orphaned const variables
5 years ago
chcurran a995aee35a Properties__Index and Properties__NewIndex upvalue counts no reflect removal of net binding component 5 years ago
Steve Pham b2bafc44ab
LYN-2705: Remove 'AZ_TRAIT_DISABLE_FAILED_ASSET_PROCESSOR_TESTS' trait for Linux (#1235)
* Fix Delete_Real_Readonly_Fails to mark parent directory as read-only as well

Read-only files in Windows cannot be deleted. The previous version of this
code relied on that fact, and would attempt to delete a file even when
`skipReadOnly = true`, relying on the OS to refuse to delete the file if it
is read only. On Linux, it is the writable state of the *directory* that
determines if a file can be deleted or not. This fixes the test to set up
the correct situation where a file deletion would fail.

* Remove excluded items from a vector before iterating over it

Removing items from the `pathMatches` `QStringList` while iterating over it
was causing a segfault on Linux. This change separates out the item removal
from the item iteration, which allows the item iteration loop to use a
range-for loop instead of directly manipulating iterators.

* Remove invalid test that asserts a file's metadata file can have differing file casing

This test is asserting that a given source file and its accompanying
metadata file can have the the same name but differing case. This is really
testing whether or not the underlying filesystem that those files live on
is case sensitive or not. The 99% chance is that users are using the
default filesystem that their host OS gives them, NTFS on Windows, EXT* on
Linux, and APFS on Mac. Even though NTFS is case-insensitive by default,
it [can be configured per-directory](https://devblogs.microsoft.com/commandline/improved-per-directory-case-sensitivity-support-in-wsl/).
APFS as well can be configured to be case-sensitive. For users with case
sensitive filesystems, this test makes no sense. We could extend this test
to inspect the case-sensitivity of the underlying filesystem, but then it
is just testing the filesystem's behavior, which seems out of scope of this
test.

* Use a non-priviliged port for the Asset Processor tests

From https://www.w3.org/Daemon/User/Installation/PrivilegedPorts.html:

> The TCP/IP port numbers below 1024 are special in that normal users are not
> allowed to run servers on them. This is a security feaure, in that if you
> connect to a service on one of these ports you can be fairly sure that you
> have the real thing, and not a fake which some hacker has put up for you.
>
> When you run a server as a test from a non-priviliged account, you will
> normally test it on other ports, such as 2784, 5000, 8001 or 8080.

* Fix for `QDir::rmdir(".")` not working in Linux

Qt uses `::rmdir` to remove directories on Linux. This comes from
[unistd.h](https://pubs.opengroup.org/onlinepubs/007904875/functions/rmdir.html)
The documentation for that function states:

> If the path argument refers to a path whose final component is either dot
> or dot-dot, rmdir() shall fail.

So calling `dir.rmdir(".")` will never work on Linux.

Instead, get the parent directory, and remove the child directory by name.

* Avoid lowercasing source asset paths when resolving dependencies

Source asset paths may be case sensitive, so their case must be preserved
when doing operations that hit the underlying filesystem. This method was
always lowercasing them, which would cause dependencies to not be found.

* Correct test to expect product filenames to be lowercase

The modtime tests were failing in Linux due to something unrelated to file
modtime checking. The Asset Processor Manager does this during AnalyzeJob:

```
if (foundInDatabase && jobs[0].m_fingerprint == jobDetails.m_jobEntry.m_computedFingerprint)
{
    // If the fingerprint hasn't changed, we won't process it.. unless...is it missing a product.
```

In this case, the test was setting up a product whose file case was the
same as the source asset, and would write it to the cache dir using mixed
case, but use the normal asset processor API to write the product file path
to the database, which recorded the path in lowercase. When the manager
then went to check if the source asset's products all exist, it checked the
lowercase path, which didn't exist.

This fixes that test failure, by updating the test to write the product
file to the cache using the proper lowercased path.

* Update test to define a "not current platform" for Linux

This test was failing because it was setting some "not current platform"
variable to be set to "pc" on Linux, when
`AssetSystem::GetHostAssetPlatform()` is defined to:

```cpp
inline const char* GetHostAssetPlatform()
{
    return "mac";
    return "pc";
    // set this to pc because that's what bootstrap.cfg currently defines the platform to "pc", even on Linux
    return "pc";
    #error Unimplemented Host Asset Platform
}
```

The test would go on to assert that "pc" was simultaneously in a list and
not in the same list.

This fixes the test by updating the code to set the "not the current
platform" variable appropriately on Linux.

The expectations were also updated to improve the output on test failure.
Instead of this:
```
Value of: recogs["rend"].m_platformSpecs.contains(platformWhichIsNotCurrentPlatform)
  Actual: true
Expected: false
```

You now get this:
```
Value of: recogs["rend"].m_platformSpecs.keys()
Expected: (has 3 elements and there exists some permutation of elements such that:
 - element #0 is equal to pc, and
 - element #1 is equal to es3, and
 - element #2 is equal to server) and (doesn't contain any element that is equal to pc)
  Actual: { pc, server, es3 } (of type QList<QString>), whose element #0 matches
```

* Prevent windows supported path separators to be included in the test paths for UpdateToCorrectCase_ExistingFile_ReturnsTrue_CorrectsCase

* Fix failing linux unit test "PlatformConfigurationUnitTests.TestFailReadConfigFile_RegularScanfolder"
caused by static variable not being reset from a different test run when using AssetUtilities::ComputeProjectPath

* Fix AZ_RTTI declaration for RequestEscalateAsset Message

* Implement FileWatcher for Linux to fix AssetProcessorMessages.All test (RequestAssetStatus)

* Split AssetProcessorMessages into 2 tests, one with RequestAssetStatus/ResponseAssetStatus and one without
Add The RequestAssetStatus/ResponseAssetStatus as a sandbox test because it relies on FileWatcher thread and seems to be timing related

* Remove FileWatcher_win.cpp from the Linux specific folder for FileWatcher

* - Fix build error related to non-unity builds
- Fixed failed linux test 'Test/LegacyTestAdapter.AllTests/UtilitiesUnitTest' caused by misplaced windows only EXPECT
- Remove test trait AZ_TRAIT_DISABLE_FAILED_ASSET_PROCESSOR_TESTS for linux to expose remaining failed tests

* Fixed failed linux test 'Test/LegacyTestAdapter.AllTests/RCcontrollerUnitTests' caused by misplaced windows only EXPECT

* - Fix FileWatcher unit test, disable incompatible subtests for Linux
- Fix errors in FileWatcher_linux from results of the FileWatcher Unit Test

* Remove AZ::AssetProcessor.Tests.Sandbox tests from definition and restore the original AssetProcessorMessages.All tests now that Filewatcher_linux was fixed

* Fixes for failed unit tests: AssetProcessorManagerUnitTests and AssetProcessorManagerUnitTests_JobDependencies_Fingerprint
- Caused by differences between between case-sensitive files (Linux) and non-case-sensitive Filesystems (Windows)

* Update consts in FileWatcher_linux.cpp to constexpr

* Fixes related to PR comment suggestions

* - Removed std::bind and replaced with lambda in FileWatcher_linux
- Replaced String replace functions for path separators to use AZ::IO::Path::LexicallyNormal() instead

* Restoring string replace function in PathDependencyManager::ResolveDependencies due to unit test failure

Co-authored-by: Chris Burel <burelc@amazon.com>
5 years ago
Aaron Ruiz Mora 7a053d82e1
UX Workflow improvements for Physics Materials (#1237)
- Added button to PhysX Collider Component in PhysX Mesh's field to open FBX Settings.
- Added button Material Selection to open the physics material library in Asset Editor.
- Default Material in PhysX configuration is read only and consistent with the text in combo boxes.
- Material configuration field "Surface Type" renamed to "Name"
- Fixed bug in EditorColliderComponent where the material selection was not updated when changing the library.
- Fixed bug where the materials selection was not set to default when a physics material from the asset was not found in the library.
- Added attributes 'BrowseButtonEnabled' and 'BrowseButtonVisible' to PropertyAssetCtrl.
- Updated physx configuration setreg files of AutomatedTesting project.
5 years ago
Aaron Ruiz Mora 9d41954d0e
Added configurable physics materials per asset in PhysX group in FBX Settings. (#1186)
- Added back the' Physics Materials from Asset' tick in the collider components.
- Made physics materials names case insensitive.
- Refactored how to gather material information from fbx and used the same code for exporter and physx groups.
5 years ago
AMZN-koppersr 4ad0560d06 Removed AddOn(De)SpawnedHandler from Spawnable Entities Interface
The calls AddOnSpawnedHandler and AddOnDespawnedHandler were removed from the SpawnableEntitiesInterface. These functions will eventually be called from multiple threads and AZ::Event currently doesn't have a thread-safe version to support this. There's also a performance concern as these callbacks are called for each individual (de)spawn requests which can lead to multiple handlers being called without information that's relevant to the callback. It would be better to batch up all (de)spawn requests per ProcessQueue call and only have a single event do a single signal. Since both events are currently not being used they have been removed for now, but can be introduced -with the previously mentioned concerns in mind- when needed.
5 years ago
amzn-sean 47e5c72f2e
fixed missing methods in SC from Trigger and Collision events (#1185) 5 years ago
jackalbe 1a6b6d5bc0
{LYN-4230} Fixed loading *.pak files in Release builds (#1127)
* {LYN-4230} Fixed loading *.pak files in Release builds

* Helios - Release mode should load all *.pak files
* Tests: made a separate installation folder with a reduced "engine.pak" and a full "game.pak" which loads in release

* added unit test to regress the bug fix
5 years ago
Tom Hulton-Harrop cf8a6761bf
Formatting-only change - Update Manipulator and Viewport AzToolsFramework files (#1143)
* formatting changes to AzToolsFramework viewport related types + API comment style updates

* minor format change - include ordering

* improve formatting by moving comment

* fix compile error and switch to use AZ_Printf

* small polish changes after review feedback
5 years ago
rgba16f 74f474aae2
Add unit tests for the ViewportScreen ndc <-> worldspace utility functions (#1149)
Add ScreenNdcToWorld function to enable round trip testing.
5 years ago
AMZN-koppersr febf53671e Addressed PR feedback. 5 years ago
AMZN-koppersr ce7b81e2e7 Merge branch 'main' into SpawnableEntityIdMapping 5 years ago
lumberyard-employee-dm 4a1d713227
Fix recursive attempts to open the log file in the GameLauncher (#1114)
* Fix recursive attempts to open the log file in the GameLauncher

The AzFramework Application has been updated to default the @user@ and
@log@ aliases to the <engine-root>/user and <engine-root>/user/log
folder respectively if a project isn't set.

Fixed the SystemFile class to support negative offsets if Seek() as per
standard seek function such as fseek

Updated the CrySystem CLog class to use SystemFile instead of FileIOBase
to avoid any asserts that would cause CLog::OpenFile to be recursively
called infinitely

* Removing unused Force Closed variable

* AZ::IO::SystemFile build fixes for Unix platforms. Added a copy constructor for LUAEditorContextInterface.h to fix the LuaEditor build

* Adding missing includes to the WindowsAPI and Android SystemFile headers
5 years ago
AMZN-koppersr 1e7ac60949 Reintroduced spawning multiple instances of the same entity
The following was changed:
- The remapper in AZ::IdUtils now has an additional argument to tell it what to do when it encounters the same source entity id. The original behavior of ignoring the new entity id and returning the first occurrence is the default. The alternative behavior is to store the last known entity id and return that instead.
- Split the optional arguments for SpawnAllEntities and SpawnEntities.
- SpawnEntities now has an option to continue with the entity mapping from a previous spawn call or to start with a fresh mapping. The latter is the default as the former will come at a performance cost since the mapping table has to be reconstructed.
- Entities spawned using SpawnEntities and ReloadEntities now also get the correct entity mapping applied.
- Added several new unit tests to cover most of the new functionality.
- Fixed some places where the older API version was still called.
5 years ago
AMZN-koppersr 8c541b5205 Moved default values to object in the Spawnable Entities Interface 5 years ago
AMZN-koppersr 1bf8c599e3 External Serialize Context for spawning
This change makes it possible to provide a Serialize Context for spawning entities from spawnables. This also removes the need for the Serialize Context to be retrieved multiple times per frame.
5 years ago
Esteban Papp 29c71b4e53
SPEC-2513 Fixes to enable w4701 (#1105)
* Some fixes

* more fixes

* fixes for debug
5 years ago
Vincent Liu dfd63737c3
[SPEC-6720] Update session common interfaces (#956) 5 years ago
Alex Peterson afe20906db
Add Project Manager File menu options to Editor 5 years ago
AMZN-koppersr b32507bd4b
Merge pull request #973 from aws-lumberyard-dev/SpawnablePriorityQueue
Spawnable priority queue
5 years ago
Nicholas Van Sickle 087677b326
Fix several viewport issues (#1045)
* Fix some FOV calculation viewport issues:
-Avoid calculating FOV if we've got an invalid viewport
-Don't override game mode FOV, let the active camera components manage it instead

* Fix viewport font positioning

This updates code in a few places to respect an API change/fix made to AtomFont - also switched the default value of m_virtual800x600ScreenSize to false as it's really behavior you want to opt into

* Don't activate CameraComponentController when in the Editor / not in game mode
5 years ago
AMZN-koppersr c0dade8883 Merge branch 'main' into SpawnablePriorityQueue 5 years ago
Tom Hulton-Harrop 3947dcf213
Add some extra cvars to control orbit point appearance and remove unused ones (#1032) 5 years ago
greerdv 2c36d6a19a
Merge pull request #1039 from aws-lumberyard-dev/transform-float-scale-3
refactor vector scale in Transform to float scale
5 years ago
sconel 57b961c113
Merge pull request #997 from aws-lumberyard-dev/Spawnable/ScriptCanvas/Integration
Add dynamic spawn node to Script Canvas
5 years ago
Aaron Ruiz Mora 00e860f326
Physics material system for spectra launch
- Invalidate 'Physics Materials From Mesh' boolean from collider component
- Removed material library from material selector. Default material library will always be used instead.
- Marking failing automated test as xfail
- Added default material to physics configuration.
- Moved material library asset from physx configuration to physics configuration, as it doesn't need to be physx specific.
- Refactor physics material system having into account that there is only one material library in the project.
- Renaming code from DefaultMaterialLibrary to MaterialLibrary.
- All queries about physics materials unified under PhysicsMaterialRequests bus.
- PhysXSystem only manages the material library asset.
- Saving and reloading the same physics material asset with different content didn't trigger a events that the material library has changed.
- Changing Physics Material Request interface to use shared_ptr instead of weak_ptr to be simpler to handle the returned materials and having a more consistent code.
- Refactored Material Manager to improve its implementation. Still following the same approach of "creating materials on the fly as they are requested", but now it's doing it consistently across the interface, with private helpers functions FindOrCreateMaterial that simplify vastly the implementation.
- Material Manager now listens to change event of material library asset and default material configuration so it updates its materials accordingly.
- Complete Material move constructor and operator.
5 years ago
Esteban Papp ff9a052ce6
Merge pull request #1011 from aws-lumberyard-dev/ly-as-sdk/LYN-2948
Integration of the LY as an SDK work
5 years ago
greerdv 34abf7376e Merge branch 'main' into transform-float-scale-3 5 years ago
sconel 0a32951e7e Merge branch 'main' of https://github.com/aws-lumberyard/o3de into Spawnable/ScriptCanvas/Integration 5 years ago
greerdv 55d3d18c9b update transform component to remove vector scale transform function 5 years ago
pappeste eece07efd3 Merge branch 'main' into ly-as-sdk/LYN-2948 5 years ago
pereslav 090234f1f0 Merge branch 'main' into MultiplayerPipeline 5 years ago
pereslav 42b3e3817a SPEC-7012 Added rewind-aware scene query utilities. Added frame ID to SimulatedBody 5 years ago
Tom Hulton-Harrop 36ceff84c9
Support mesh intersection for camera orbit (#982)
* wip support for mesh intersection with intersector bus

* WIP camera mesh intersection orbit logic

* remove unneeded template argument

* add bus connect/disconnect

* fix intersection logic

* small updates, additional comments, some tidy-up

* update formatting options slightly

* use aznumeric_cast

* temp workaround for negative distances with RayIntersection
5 years ago
greerdv d73566565e remove most vector scale functions from transform bus 5 years ago
greerdv e4f73d44fe remove vector scale and add uniform scale as animatable properties 5 years ago
pappeste 8b9f5230f6 Merge branch 'main' into ly-as-sdk/LYN-2948 5 years ago
AMZN-koppersr 40dbf22b00 Merge branch 'main' into SpawnablePriorityQueue 5 years ago
AMZN-koppersr 2550c3e1ff Spawnable Entity Manager threshold default to "m_highPriorityThreshold" 5 years ago
AMZN-koppersr c946d57928 Addressed PR feedback. 5 years ago
jackalbe 5b5d02baa4
{LYN-4060} Helios - Fix to load PAK Archive files (#964)
* {LYN-4060} Helios - Fix to load PAK Archive files

{LYN-4060} Helios - Fix to load PAK Archive files

* Helios - Archive does not load from PAK files due to IsFileExists() error
* the decompression tag does not need to be ZCRY, so removed it
* the PAK files are on disk, so a "on disk file exists" method is used
* the mapped files m_mapFiles need to track the file path, not just the filename

Tests: Release Launcher with a new level

* re-adding the read only flag check so that ZIP files can be created
5 years ago
pappeste 01933f45b1 Merge branch 'main' into ly-as-sdk/LYN-2948
# Conflicts:
#	Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/gem.json
5 years ago
pappeste f1b688f435 Merge branch 'main' into ly-as-sdk/LYN-2948
# Conflicts:
#	CMakeLists.txt
#	Code/Tools/ProjectManager/Source/GemCatalog/GemInfo.h
#	Gems/AtomLyIntegration/AtomViewportDisplayInfo/gem.json
#	cmake/LYWrappers.cmake
#	cmake/SettingsRegistry.cmake
#	scripts/o3de/tests/unit_test_current_project.py
5 years ago
amzn-sean 529e29071c
update Ragdoll component to only uses Handles (#981) 5 years ago
greerdv 34c59a81b8 update rigid body to use non-deprecated function and remove many deprecated transform bus functions 5 years ago
Tom Hulton-Harrop 4205a69106
Allow ComponentAdapter (and related types) to work with EntityComponentIdPairs as well as EntityIds (#920)
* provide the ability for component adapters to support multiple components per entity

* add missing explicit keywords

* updates following review feedback - update how template logic works

* small updats (fix typo, remove redundant includes)

* add missing this->

* naming change, common -> controller

* add [[maybe_unused]]
5 years ago
michabr 8bd4c8d974
Add back text drawing using Draw2d (#928)
This is used by the UI Editor's viewport and also by LyShine to display debug text.
5 years ago
sconel 07ecb938e7 Merge branch 'main' of https://github.com/aws-lumberyard/o3de into Spawnable/ScriptCanvas/Integration 5 years ago
sconel b5599ca739 Add asset picker support to spawn SC node and thread safety measures 5 years ago