* Update the FileIOAlias naming to make the cache, project root and engine
root paths more clear
The alias of `@root@`, `@assets@`, and `@projectplatformcache@` has been
collapsed to `@projectproductassets@`
The alias of `@devroot@` and `@engroot@` has been collapsed to
`@engroot@`
The alias of `@devassets@` and `@projectroot@` has been collapsed to
`@projectroot@`
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updated use of devassets and devroot properties in python
Those properties now use projectroot and engroot
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updating the alias @engroot@ alias path comment in each platform specific LocalFileIO_*.cpp file
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Removed hardcoded size of 9 for the product asset alias.
The ResolvePath function now just appends the @projectproductassets@
alias with the input path
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Remove duplicate @projectproductassets@ check in ProcessFileTreeRequest
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fix for typos in Hydra python test
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updated LocalFileIO::Copy call on Windows to use the Unicode aware CopyFileW API
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updated the AWSMetreicsGemAllocatorFixture to properly suppress asset
cache write errors for Test file creation.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Removed unneeded call to set the @projectproductasstes@ alias at the bottom of the AssetSeedManagerTest SetUp
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Added a deprecated alias map to the FileIO System
When a deprecated alias is accessed, the FileIO System logs an AZ_Error and indicates the alias that should be used
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updated python test scripts to use the projectroot binding
Retrieving the AutomatedTesting project path based on "<devroot>/AutomatedTesting" has been removed.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updated references to devroot and devgame within the codebase
The GetAbsoluteDevGameFolderPath functions has been replaced with direct call to AZ::Utils::GetProjectPath
The GetAbsoluteDevRootFolderPath functions has been replaced with direct calls to AZ::Utils::GetEnginePath
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updated <engroot>/AutomatedTesting references to projectroot
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Replaced references that assumes the project path is <engroot>/AutomatedTesting with <projectroot> in the AutomatedTesting python test
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Correct casing in emfxworkspace file
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Removed newly added AppendPathParts function
Removed the Path constructors which accepts a PathIterable instance
The PathIterable isn't safe to return to a user of the Path class as it might be referencing temporary paths supplied via PathView arguments
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fixed unused parameter warning
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Undid change to the LexicallyProximate function to set the path result to the base path.
It needs to return the *this path if the pathResult is empty
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Moved the LocalFileIO ConvertToAbsolutePath implementations to AZ::Utils
Fixed the ConvertToAbsolutePath implementation for Unix platforms to use a buffer that is size PATH_MAX(4096 on all our supported Unix platforms).
Because the buffer before was AZ::IO::MaxPathLength which as a size of 1024, this was resulting in the Unix `realpath` function smashing the stack when it converts a path to an absolute path that is longer than 1024 characters
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updated the EditorCore.Tests to attach the AZ Environment to the EditorCore shared library that is statically loaded on launch.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fixed for DeprecatedAlaisesKeyVisitor Visit function causing the non string_view overloads being hidden causing a hidden base class function warning
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Changed the AWSMetricsGemMock to use a temporary for writing test assets
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updated the LocalFileIO::ResolvePath function to use HasRootPath to determine if a path starts with a root path such as "D:", "D:/" or "/"
IsAbsolute was not the corect check as the path of "D:" is a relative
path.
To be absolute according to the Windows the path must have a root
directory. i.e "D:/" or "D:\"
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Removed absolute path comment from LocalFile_UnixLike.cpp and LocalFile_Android.cpp FindFiles implementations
Updated the ConvertToAlias to supply an AZ::IO::FixedMaxPath
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Replaced usage of the @projectproductassets@ alias with @engroot@ when referring to the LmbrCentral source folder in the CopyDependencyBuilderTest and the SeedBuilderTests
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updated the ScriptCanvas Upgrade Tool to output backed up files to the
Project User Path instead of the engine root
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fixed whitespacing issues in Application.cpp
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Remove unnecessary creation of a FixedMaxPath in the UpgradeTool.cpp
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Modified testSeedFolder variable in the SeedBuilderTests to use the
@engroot@ alias instead of @projectproductassets@/.. alias when
referring to the LmbrCentral Gem source path
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updated references to the Project Asset Cache in the PythonTests.
Those tests no longer use the logic `azlmbr.paths.projectroot / "Cache" / "pc"` to retrieve a path to the cache root but instead the `azlmbr.paths.projectproductassets` constant
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fixed the FileIO Deprecated Alias test on Windows
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Removing @projectsourceassets@ alias, as it is only used once.
Updated the PhysX EditorSystemComponent.cpp to query the ProjectPath
form the SettingsRegistry.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Replaced @projectproductassets@ alias with @products@
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Rollback changes to the PhysX EditorSystemComponent.cpp
The changes to use the ProjectPath from the SettingsRegistry has been implemented in PR #4497
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Added IsDirectory function to SystemFile
This takes the implementation in LocalFileIO and uses it for SystemFile
and then just has LocalFileIO call the SystemFile implementation
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fixed logic to detect the WinApi FILE_ATTRIBUTE_DIRECTORY attribute
Updated the FileIO.cpp test to use AZ::IO::Path and removed direct uses
of AZStd::string
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding googletest printers for string and Path classes
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updated the SystemFile_WinAPI functions to use AZStd::to_wstring
This makes the the SystemFile function convert from UTF-8 to UTF-16
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
Fixed the memory leaking with ID3D12CommandAllocator in DX12 AsyncUploadQueue. Add reset for the ID3D12CommandAllocator when the commandlist was executed.
Fixed another small memory leak in NativeWindow.
Signed-off-by: Qing Tao <qingtao@amazon.com>
* Fix issues with seedlist for AutomatedTesting
Fixes error reporting so it will show the file hint in the tool.
Removes any missing assets from the .seed file.
Remove an unnecessary dependency from AutomatedTesting dependencies
file.
Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
* Make ArchiveComponent use AZ::IO::IArchive
Initial changes that will get the sychronous calls in ArchiveComponent
to use IArchive interface rather than external zip/7z tools.
Some of the asynchronous api are still in place, anything that wasn't
being used has been removed for now. This may change later if we move
towards all the api being asynchronous. Until then, we can't remove the
reliance upon the external archive tools completely.
Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
* Updates AZStd::thread constructors
Adds a variadic constructor which forwards args to the functor.
Because of our thread_desc extension, there was confusion on the
arugments, so the args were reordered to take the thread_desc first,
before the functor and args.
Also the thread_desc is taken as reference rather than by pointer.
Update callsites to account for this change.
Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
* Async operation of ArchiveComponent api
This sets up the ArchiveComponent to operate asynchronously. It uses
promise/future to transfer results to caller.
This is still broken, there's a few things that need to get fixed up,
but this is a good checkpoint for the work as it solidifies the api,
cleans up a bunch of unused code, and compiles.
Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
* Removes the platform-specific ArchiveComponen
These are no longer needed, as they control the direct interaction with
host OS tools like 7za.exe or /bin/zip.
Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
* Removes the platform-specific files from cmake
Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
* Removes the 7za.exe (and legal notice)
This tool is no longer needed in the repo.
Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
* Fixes usage of IArchive::GetFullPath()
This changed to return a PathView, updated to reflect that.
Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
* Fix promises and threads
Make sure promises are only set exactly once. This meant reworking some
of the initial error checking.
Detach threads when created. Adds [[nodiscard]] to the functions that
return a future. Since threads are detached, the future is the main way
to get communication from the thread.
Clean up interface, add comments.
Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
* More edits to thread creation
Changes to thread construction to account for parameter change.
Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
* Fix some remaining issues with ArchiveComponent
Put created threads inside a container, then join them at Deactivate.
Fix asset bundler case when injecting a file with no working directory.
Fix thread constructor that applies args to a function.
Fix lambdas to take string args by value rather than reference.
Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
* Fixes some remaining bugs in ArchiveComponent
Open archive as read-only during extract & list operations.
Fixes paths issues.
Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
* Fix initialize of opaque thread handle in thread_UnixLike.h
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Removed unused variable in AssetBundleComponent.cpp to fix compiler warning
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fix some issues with archives
File paths in the CDR and the local headers need to match, but there
were issues with path separators and case that made it possible to get
invalid headers errors in some archives.
Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
* Adds some new ArchiveComponent unit tests
Adds new tests for extraction of archive and adding files from a file
list to an archive.
Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
* Fix file data offset issues when opening archives
When opening an INestedArchive it would run through the CDR headers to
create file entries in the zip cache. The offsets to the compressed
data were being calculated incorrectly because they were using the CDR
headers rather than jumping to the local file headers and getting
offsets from those sizes.
Removed and refactored some archive validation flow and zip cache
factory init methods to either init default or init w/ additional
validation checks.
Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
* Addresses PR feedback
Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
* Address more points of feedback in PR
Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
* Address additional PR feedback
Fixes up some error checks and uses of strings vs paths.
Enable archive component tests on Linux so we can see if they will
pass.
Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
* Address PR feedback
Change the INestedArchive interface to list files as AZ::IO::Path.
Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
* Disabling the ArchiveComponent tests on Linux
They failed so we will revisit them to attempt a fix.
Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
* Rename a member variable to be more accurate
Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
* Address feedback on PR
Bump version of Archive Components for serialize context.
Improve error messages during archive open and validation.
Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
* Revert recent changes
Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Intial attempt to convert the Atom/RHI/FrameScheduler to use the new TaskGraph api
Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>
* Avoid enqueuing work on the active task thread if the submitted task
graph is waitable
When submitting a task graph, supplying a wait event implies that
dependent jobs must occur on threads that do not wait on the event (in
the absence of work stealing). This change prevents this by adding a
notion of a task thread enable/disable state, and prohibiting dependent
jobs from being enqueued on waiting threads.
Signed-off-by: Jeremy Ong <jcong@amazon.com>
* Convert RPI/Scene to use TaskGraph pass 1, Culling jobs remain on the old system
Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>
* RemoveTask Graph changes from the FrameScheduler::ExecuteGroups, use old job system instead
Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>
* Per review, removing commented out code
Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>
* Cleanup debug code, & build fix
Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>
* Add a cvar & interface to query whether to use jobs or task graph
Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>
* Make TaskGraph assert if you try to wait inside a job
Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>
* Fix TaskTest SpawnSubgraph to account for the new TaskGraphEvent assert on wait in a running task
Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>
* 3 minor cleanups. 1) Events always store a ptr to their executor 2) Fix clang compile error 3) remove an early out.
Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>
* Fix double group end that was causing assert/crash plus misc minor diff's with development
Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>
* Fix deallocation failure on deactivation of the TaskGraphSystemComponent. Also make the system component account for multiple creation in Unit Tests.
Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>
* Update with PR feedback
1) Rename UseTaskGraph to IsTaskGraphActive & update related code
2) prefer TaskExecutor::SetInstance
3) add comments and remove commented out code
Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>
* Fix incorrect RTTI name for TaskGraphActiveInterface
Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>
* Move TaskGraphSystemComponent CRC calculation to a shared variable
Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>
Co-authored-by: Jeremy Ong <jcong@amazon.com>
* Use XcbUniquePtr to manage xcb resources
Signed-off-by: Chris Burel <burelc@amazon.com>
* Add a unit test for XcbInputDeviceKeyboard
Signed-off-by: Chris Burel <burelc@amazon.com>
* Removed ununeeded includes from EBus EBus.h and Policies.h
Updated the locations which needed those includes
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding missing include for <memory> to AWsClientAuthBus.h
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Remove the while true loop in the EBusQueuePolicy Execute() function
The while true loop in Execute was for allowing additional functions to be queued in the middle of execution of current list of functions.
That functionality was dangerous, because if a queued function added itself during execution unconditionally, then it would result in an infinite loop
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updated the AssetManager::DispatchEvents function to pump the AssetBus event queue until empty
Queued Events on the AssetBus is able to queue additional events on that Bus during execution of those events.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Changed the AssetManager::DispatchEvents function to only execute the
AssetBus queued events once
Changed the AssetJobsFloodTest.AssetWithNoLoadReference_LoadDependencies_BehaviorObeyed test to dispatch events until the OnAssetContainerReady callback is signaled.
This happens after every asset load to make sure that the
expiring AssetContainer instances are removed from `AssetManager::m_ownedAssetContainer` container before retrying to load the same asset.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Added a MaxTimeoutSeconds constant for the maximum amount of the time to run a single DispatchEvents loop
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* overhaul to how camera orbit/pivot behavior works
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* update naming from orbit to pivot
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* fix camera unit tests
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* add additional tests for new camera pivot behavior
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* fix comment and add additional info for tests
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* first pass fixes for how entity space is handled in the viewport interaction model
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* small updates to simplify space handling
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* fix for influence group with one entity selected
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* some tidy-up and fix for scale manipulator snapping
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* couple of small fixes for scale manipulator
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* small comment update
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* fixes for integration test failures
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* add test for rotation manipulator
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* add test coverage for rotation manipulators
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* add tests for translation manipulators and some other tidy-up changes
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* add tests for translating a group of entities
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* add some tests for scale manipulators
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* some updates and formatting changes (clang-format) to ViewportScreen
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* simplify usage of lround code
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* update missed name updates
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* update usage of WorldToScreenNdc
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* updates following review feedback
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* some more small tidy-up changes
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* move static variables to be marked inline
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* small formatting fixes
Signed-off-by: hultonha <hultonha@amazon.co.uk>
This allows for all the global static `InputChannelId`s to be `constexpr`
as well, which prevents some global constructors, including some CRC32
calculations on application startup.
Signed-off-by: Chris Burel <burelc@amazon.com>
The Linux platform has multiple windowing systems. Support for xcb is
currently in progress, support for Wayland is planned in the future. The
way the current xcb support is included is by making some file with a
`_xcb` suffix, and placing `#if PAL_TRAIT_LINUX_WINDOW_MANAGER_XCB` around
most of that file's contents.
With this change, all of the code in AzFramework that uses xcb directly is
inside the `Platform/Common/Xcb` subdirectory. It greatly reduces the
amount of code in compile-time `#ifdef` checks for the chosen windowing
system. It also provides a logical place to include O3DE-specific xcb
C++ wrappers and interfaces, without polluting non-xcb related code.
Signed-off-by: Chris Burel <burelc@amazon.com>
* Fixed calculation of each archive file data offset.
The location of a file entry in a Zip file is calculated after the local file
header + the length of the filename + the length of the extra field
length per the ZIP file spec.
https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Removed bIndependentBlocks variable
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Added array index operators to Spawnable(Const)EntityContainerView.
This commit also includes some tweaks to the begin/end functions and unit tests.
Ticket: https://github.com/o3de/o3de/issues/4110
Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
* Fixed string formatter for assert in Spawnable(Const)EntityContainerView.
Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
* Added empty() to Spawnable(Const)EntityContainerView and made move functions use [[nodiscard]]
Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
* Create a new InputContextComponent.
- An InputContextComponent is used to configure (at edit time) the data necessary to create an AzFrameowrk::InputContext (at run time). The lifecycle of any InputContextComponent is controlled by the AZ::Entity it is attached to (adhering to the same rules as any other AZ::Component), and the InputContext which it owns is created/destroyed when the component is activated/deactivated.
- The underlying AzFramework::InputContext and AzFramework::InputMapping* classes already exist, along with comprehensive unit tests (see Code/Framework/AzFramework/Tests/InputTests.cpp). All changes in this PR are simply to allow input contexts / input mappings to be defined/edited from the editor using data.
- The new InputContextComponent is similar in many respects to the InputConfigurationComponent found in the StartingPointInput Gem, the main difference being that the user-defined input mapping objects the new component creates are identical (from the perspective of any input consumer) to 'raw' engine-defined input channels (the existing AzFramework::InputMapping class inherits from the existing AzFramework::InputChannel class). This means that any system which consumes input (in either C++ or lua) can seamlessly interchange between obtaining input using either the 'raw' engine-defined input channels (eg. InputDeviceGamepad::Button::A, InputDeviceKeyboard::Key::AlphanumericA, etc.) or any user-defined input mapping, which can now be defined from the editor using data. Ultimately I would like to deprecate the StartingPointInput::InputConfigurationComponent in favour of this new InputContextComponent, which isn't realistic at present because the former is used pervasively throughout many different projects, and it integrates with ScriptCanvas in a way that I have yet to replicate, but this is a step towards the goal of a unified, engine-wide input context/input mapping solution that can be used interchangeably by any system, project, or Gem.
Signed-off-by: bosnichd <bosnichd@amazon.com>
* Edited some reflected property descriptions for clarity.
Signed-off-by: bosnichd <bosnichd@amazon.com>
* Fix clang builds:
- Add a missing virtual destructor.
- Fix the scope of two reflected property attribute functions.
Signed-off-by: bosnichd <bosnichd@amazon.com>
* Fix for InputContextComponent being reflected twice in some cirsumstances.
Signed-off-by: bosnichd <bosnichd@amazon.com>
* Updates in response to PR feedback.
Signed-off-by: bosnichd <bosnichd@amazon.com>
* More updates based on review feedback.
Signed-off-by: bosnichd <bosnichd@amazon.com>
* Added string and string_view class constructor overloads which is deleted that prevents initializing them from a nullptr or an integer type
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fixed locations where string and string_view were initialized with
nullptr
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fix IArchive::IsInstalledToHDD signature
Updated calls to ConvertAbsolutePathToAliasedPath to use an
list initialization instead of nullptr
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updated the GameApplication to mount the engine.pak
This allows loading the autoexec.cfg and bootstrap.game.<config>.<platform>.setreg from the engine.pak files
The engine.pak is searched for in the following order: <ExecutableDirectory>/engine.pak, followed by <ProjectCacheRoot>/engine.pak
Removed a lot of unused APIs from the AZ::IO::Archive feature suite
Updated many of the AZ::IO::Archive classes to use AZ::IO::Path internally.
The logic to search for files within an Archive has been updated to use AZ::IO::Path and to remove case-insensitve string comparisons
Somehow removed the CryFile dependency on anything Cry
Updated the Settings Registry to support reading from the FileIOBase and therefore Archive files in the GameLauncher via the `SetUseFileIO` function
Removed AzFramework Dependency on md5 3rdParty library
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Linux build fix
Added an include of <stdio.h> before the <rapidxml/rapidxml.h> include as it usesnprintf.
Added `static` to the constexpr constants in ExtractFileDescription in SettingsRegistryImpl.cpp to fix clang compile issue
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updated the case used to mount the Engine PAK file in the GameApplication to be Engine.pak to match the other locations where it is mounted
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updated the proper FFont call to FileIOBase::Size to supply the correct
integer type of AZ::u64 instead of size_t
This fixes building on platforms where size_t is type defined to be
unsigned long
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fixed segmentation fault in Archive::Unregister when outputing the filename of the Archive file being closed
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fix calls to OpenPack in the Legacy LevelSystem
The LevelSystem was calling the incorrect overload of OpenPack that
accepts BindRoot for the mounted level.pak instead of the overload that
that passes a memory block object.
This was causing the level pak files to be mounted using an invalid
directory, causing file accesses inside the level pak to fail.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updated the error messages in the ZipDir CacheFactory class to use AZ_Warning directly
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updated the ArchiveFileIO m_trackedFiles container to store mapped type as an AZ::IO::Path
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fix code that deregisters the Atom Scene subsystem from the AzFramework Scene
The AzFramework Scene subsystem API is a generic container based on the
type of argument that is passed to it. It maintains a vector of typeids,
and only one object of any type is stored at a time. The Bootstrap system
component registers the Atom scene as a `ScenePtr` (aka
`AZStd::shared_ptr<RPI:Scene>`) with the AzFramework Scene's generic
subsystem. However, the component was previously deregistering the type by
value, `RPI::Scene`. Since no subsystem for the type `RPI::Scene` was set,
unsetting this type did nothing. The result was that the `RPI::Scene`
object would still be around by the time that all the Atom
`InstanceDatabse`s were being destroyed, resulting in a large number of
errors reported about leaked instances during global shutdown.
This fixes the above issue by passing the `m_defaultScene` as a parameter
to `AzFramework::Scene::UnsetSubsystem`, the same value that is passed to
`SetSubsystem`. This is better, because instead of providing explicit
template arguments (which were specifying the incorrect type), this now
allows the compiler to deduce the correct type, and the syntax is symmetric
with the call to `SetSubsystem`.
Signed-off-by: Chris Burel <burelc@amazon.com>
* Correctly release the AWS API from the `HttpRequestManager` module
This code was incorrectly assuming that
`AWSNativeSDKInit::InitializationManager::Shutdown()` would be called
automatically by the `InitializationManager` itself. However, all that
`InitAwsApi()` does is create an `AZ::EnvironmentVariable`, which is a
ref-counted type, and stores it in a global static. That global static is
defined in a static library (namely `AWSNativeSDKInit`), which is linked
in to the `HttpRequestManager` dynamic lib. Because it is a global static,
it has to be explicitly cleared with the call to `Shutdown()`. Otherwise
the destructor of the EnvironmentVariable doesn't happen until global
destruction, by which time the allocator that is supplied to the AWS SDK
has already been destroyed, and the shutdown of the AWS SDK attempts to use
the already-destroyed allocator.
Signed-off-by: Chris Burel <burelc@amazon.com>
* Avoid blocking the remote console server thread if there are no connections
The Remote console server runs in a separate thread. Previously, it would
directly call `AzSock::Accept()` and block the server thread until some
client connected to it. However, if no client connected, the thread would
continue to be blocked, even if the game launcher tried to exit.
This adds a check to see if there's a client on the socket before calling
`Accept()`, to avoid the deadlock on launcher exit.
Signed-off-by: Chris Burel <burelc@amazon.com>
* Fix a log message to print one message per line
Signed-off-by: Chris Burel <burelc@amazon.com>
* Allow pumping the event loop to close the launcher window
Events from the OS are handled in the game's main loop. The general loop
looks like this:
* Read events from the OS
* Tick the game application
One of the events that can come from the OS is that the window hosting the
game is closed. When this event happens, many resources provided by the
renderer are freed, and the game application's `shouldExit` bit is set.
However, when the game's `Tick()` is called, there is lots of code that
assumes the renderer is still there. To avoid crashing in the `Tick()`
call, check if the game should exit after pumping the system events.
Signed-off-by: Chris Burel <burelc@amazon.com>
* Unload the level when exiting the launcher
This ensures that any resources held onto by the level are freed before the
launcher exits.
Signed-off-by: Chris Burel <burelc@amazon.com>
* Add an explicit bus `Disconnect()` call to `AZCoreLogSink`
This is necessary because this bus has virtual functions and can be called
from multiple threads.
Signed-off-by: Chris Burel <burelc@amazon.com>
* Allow normal cleanup to take place when exiting the game launcher
Previously, global cleanup was side-stepped by calling `TerminateProcess`
or `exit`, when quitting the game launcher. This is in contrast to the call
to `_exit` on Linux and Mac when exiting the Editor. That leading `_` makes
a big difference: the former runs object destruction, the latter does not.
Instead of making the launcher exit with `_exit` on Linux, instead, remove
that call and actually run all the atexit code.
This does not modify the Editor's behavior however. It still uses `_exit`
and `TerminateProcess`.
Signed-off-by: Chris Burel <burelc@amazon.com>
* Remove the "TEST_SUPPORTED" traits.
Terrain unit tests should be usable on all platforms, so they shouldn't need a platform-specific trait to enable/disable.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
* Fix a few misc terrain bugs.
* Change Activate/Deactivate to happen immediately instead of deferring. There were too many order-of-operation bugs caused by trying to defer this.
* Added implementation for calculating normals.
* Fixed bug where GetHeightSynchronous wasn't stopping at the highest-priority layer.
* Added locks for SurfaceData bus to help ensure we lock our mutexes in the correct order and avoid deadlocks.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
* Add trivial TerrainSystem tests.
Tests construction, Activate(), Deactivate(), and destruction.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
* Unified Terrain system calls on single bus.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
* Added mock for TerrainDataNotificationBus listener.
Also added unit tests to verify the listener, and added in missing notification events.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
* Removed extra Sampler class.
Fixed up APIs to correctly pass Sampler and terrainExistsPtr around.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
* Switched MockTerrainSystem to be proper gmock.
This makes it for flexible to use and easier to reuse from other test environments.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
* Fix settings bug caused by bad order of operations that occurred when the methods moved to a different bus.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
* Eliminate extra EBus by simplifying area initialization.
Previously, there was a back-and-forth ebus signal used for the terrain system to find any terrain spawners that were created prior to the terrain system activation. Now it uses the more simple technique of just grabbing all the spawners that are currently hooked up to the spawner ebus.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
* Switch to NiceMock so that "uninteresting" mock calls get ignored.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
* Addressed PR feedback.
Filled in terrainExistsPtr at the end, and added it to GetNormal as well.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
* Fixed shader height calculation.
It was off by half a pixel, and it was interpolating, both of which were wrong.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
* Fixed PathView `MakeRelativeTo` and `Append` functions path segment
comparisons when using the Windows path separator of '\'
The PathSegment comparisons were case-sensitive in both those functions
and now use `Internal::ComparePathSegments` function to perform the
appropriate case comparison based on the path separator value of the
Path class
Reverted the LocalFileIO::CheckInvalidWrite function back to not
lowercasing the assets alias and input path before invoking
`PathView::IsRelativeTo`
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Simplified the LocalFileIO::ConvertToAliasBuffer logic
Fix for the ArchiveTest
`IResourceList_Add_AbsolutePath_RemovesAndReplacesWithAlias` and
`TestArchiveViaFileIO` test
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Added a PathIterable structure stores a non-heap container of normalized path segments of an input path.
Moved the PathParser logic to a PathParser.inl file
Removed dependency of the PathView::IsRelativeTo logic on FixedMaxPath
There is no longer a 1024 character limit when determining if a path is relative to a base
Added a GetNormalPathParts and AppendNormalPathParts to function and removed LexicallyNormalInplace to share the logic for creating a normalized path between IsRelativeTo and LexicallyNormal
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Clang PathIterable.inl build fix
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fixed Normalize and Relative Path functions initialize the result paths
With the correct path separator for the paths being transformed
Ported over the Custom Path Root Separator logic to the PathParser.inl
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updated he Shader Preprocessor include path gather.
It now uses AZ::IO::Path for the path operations and checks if the path
exist before adding it to the list of include paths.
Finally the set logic has been removed for a simpler find_if check to
see if the include path already since in the project include paths
This fixes the Asset Processing issues with shader includes due to the
Path.inl changes
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fixed tail recursion call to AppendNormalPathParts to supply a PathView with the same path separator as the parent call
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding reference qualifier overloads to the Path class Native function
Removed the conversion operators from the Path class for converting to a
string_type&/const string_type&
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
Many of these are just extra noise in the profile, but the one in Archive.cpp could also cause PIX to crash.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
* Move a few specializations from AzStdOnDemandReflection.inl to cpp file
This reduces compilation time and produced profile/debug file sizes.
The specializations for string and string_view are only implemented for 'char' type, since
others are not used anywhere.
Extracted `Reflect` method from `ClientAuthAWSCredentials` to a cpp file.
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
* Windows build fixes.
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
* Added missing license.
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
* Fix missing spaces in template argument lists
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
* Clang format on ClientAuthAWSCredentials.cpp
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
* Merge upstream development and fix linux build.
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
* Miscellaneous fixes and PAL changes required for restricted platforms.
Signed-off-by: bosnichd <bosnichd@amazon.com>
* Rename O3DE::ProjectManager::ProjectUtils::ReplaceFile -> ReplaceProjectFile to prevent conflict with Windows ReplaceFile #define
Signed-off-by: bosnichd <bosnichd@amazon.com>
* CHanges to Push/Pop Matrix
Signed-off-by: John Jones-Steele <jjjoness@amazon.com>
* Fixed bad commit
Signed-off-by: John Jones-Steele <jjjoness@amazon.com>
* REmoved the AxisAlignedBoxShapeComponentBux and AxisAlignedBoxShapeConfig
Signed-off-by: John Jones-Steele <jjjoness@amazon.com>
* Fixed derivation of AxisAlignedBoxShape
Signed-off-by: John Jones-Steele <jjjoness@amazon.com>
* Added ShowChildrenOnly to Component
Signed-off-by: John Jones-Steele <jjjoness@amazon.com>
* Fixed cmake file
Signed-off-by: John Jones-Steele <jjjoness@amazon.com>
* Changes from review
Signed-off-by: John Jones-Steele <jjjoness@amazon.com>
* Added tests for AxisAlignedBoxShape
Signed-off-by: John Jones-Steele <jjjoness@amazon.com>
* Addressed PR comments and added one further test.
Signed-off-by: John Jones-Steele <jjjoness@amazon.com>
* Removed dead code.
Signed-off-by: John Jones-Steele <jjjoness@amazon.com>
* Changes from review
Signed-off-by: John Jones-Steele <jjjoness@amazon.com>
* Spelling fix and changed link to docs
Signed-off-by: John Jones-Steele <jjjoness@amazon.com>
* Fixed profile bug in Linux
Signed-off-by: John Jones-Steele <jjjoness@amazon.com>
* Fixed problem with Unity Profile Build in Tests
Signed-off-by: John Jones-Steele <jjjoness@amazon.com>