* Minimal TypeInfo header/reduce std interdependencies.
TypeInfoSimple.h is a small header that can replace the use of
TypeInfo.h in some cases.
Signed-off-by: Nemerle <nemerle5+git@gmail.com>
* Windows build fixed
Removed algorithm.h from string_view.h
smoke-test passed
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
* Resotore dynamic_pointer_cast in intrusive_ptr
Requested by reviewer.
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
* Fix CI build
string.h - missed alogorithm.h, since it was removed from string_view
NodeWrapper.h - missing smart_ptr.h
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
Co-authored-by: Nemerle <nemerle5+git@gmail.com>
* 1. Initial support for loading dylibs outside the bundle.
2. Child processes inherit parent's environment if no environment is explicitly specified(should change to append the parent's environment even if environment variables are explicitly specified).
3. Update some time functions to use system uptime instead of wall clock time when computing elapsed time. This fixes false timeouts when the OS goes to sleep.
4. Increase wait times for AssetBuilders and some Atom tools to connect to the AssetProcessor. This is needed because GateKeeper slows down first time bootup which results in asset processing failures.
With this change we'll be able to run Editor and AssetProcessor from an install on Mac and we will also be able to build and run projects using the installed engine as an SDK.
Signed-off-by: amzn-sj <srikkant@amazon.com>
* 1. Remove debug messages.
2. Fix license
3. Pass parent's environment variables to child processes by default(on Mac).
Signed-off-by: amzn-sj <srikkant@amazon.com>
* 1. Add more detailed comments.2. Use a custom ly_copy for Mac and leave the default as is.
Signed-off-by: amzn-sj <srikkant@amazon.com>
* Address some feedback from review
Signed-off-by: amzn-sj <srikkant@amazon.com>
* Cleared m_scriptFilename between scene files.
This fixes a bug where a Python script file would be run on a scene file
that didn't have a script file set.
Added a general case version to SceneBuilderWorker.cpp, to make it easy
to mark all scene files as dirty.
Automated tests for this will come in a separate pull request.
Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>
* Work in progress automated tests
Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>
* Python test done
Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>
* Sorted jobs work now. This may sort too aggressively, I'll remove the additional sorting after some testing.
Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>
* Cleaned up test
Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>
* Fixed stray '
Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>
* Removed temp code from test
Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>
* Command line help options for AP
Removed job sorting that wasn't actually sorting jobs
Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>
* Changed constant variable names to match coding standards
Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>
* fix reference to temporary
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Non-unity fixes for mac
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Update fbx test dbgsg files
Remove rc products from fbx test expected output
Update warning counts for 2 of the tests - these are due to missing material properties
Add SkipAtomOutput setting to disable atom material and mesh processing in scene as these pull in a lot of external dependencies to Process
Removed BlendShapeData and MeshData debug output of positions/normals/faces
Updated ManifestImportRequestHandler to remove warning about Joining 2 absolute paths
Updated AssImpMaterialImporter to use new GenerateRelativeSourcePath API to fix issue where relative path generation failed with tmp project directories
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Add comment for setting
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Add override dbgsg file to python test
The mesh optimizer specifically avoids creating optimized nodes for nodes that are not selected, resulting in a different scene graph that requires a different dbgsg file to compare with
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Replace hardcoded passing of specific registry setting to instead pass all registry settings to AssetBuilder
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
temporarily copied over to the SettingsRegistryBuilder local Settings Registry instance
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
Fixed unresolved product dependency query to be able to handle much larger queries (tested with 100,000 products) by storing queried products in a temp table first
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Disabling FileWatcherUnitTests for Linux
Signed-off-by: jackalbe <23512001+jackalbe@users.noreply.github.com>
* added comments to explain the update
Signed-off-by: jackalbe <23512001+jackalbe@users.noreply.github.com>
* fixes AssetProcessorManagerUnitTests unexpectedly fails due to writing out the branch token
* instead, the branch token is calculated ahead of time and added to the settings registry
Tests: --gtest_filter=Test/LegacyTestAdapter.*
* First pass FBX -> Scene File conversion.
This is the simple pass, minimizing code changes and focused on comments.
Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>
* Step 1 of part 2 of the FBX -> Scene rename
Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>
* Renaming FbxSceneBuilder folder to SceneBuilder
Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>
* Renamed files
Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>
* More FBX -> Scene
Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>
* Final update copyright headers to reference license files at the repo root
Signed-off-by: spham <spham@amazon.com>
* Fix copyright validator unit tests to support the stale O3DE header scenario
Signed-off-by: spham <spham@amazon.com>
* Could not reproduce the unit test fail for the m_app->BeforeRun() failure,
* so I am adding file IO hooks to listen for errors during the fixture setup
Tests: failed to repro the issue
Signed-off-by: Jackson <23512001+jackalbe@users.noreply.github.com>
* Fix for DeleteCachedAssets_AssetsReprocessed fails on Debug Nightly Builds
* added -ap_disableAssetTreeView=true to disable the Qt tree view for the asset tab to get the parts that want to be tested finish
* only shows up on Debug
Tests:
=== test session starts ===
AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_processor_batch_tests_2.py::TestsAssetProcessorBatch_AllPlatforms::test_AllSupportedPlatforms_FastScanWorks_FasterThanFullScan[windows-AutomatedTesting] PASSED [ 50%]
AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_processor_batch_tests_2.py::TestsAssetProcessorBatch_Windows::test_WindowsPlatforms_RunAPBatchAndConnectGui_RunsWithoutEditor[windows-AutomatedTesting] PASSED [100%]
--- generated xml file: F:\amazon\o3de\build\vs2019\Testing\Pytest\AssetPipelineTests.Batch_2_Sandbox.xml ---
=== 2 passed, 4 deselected in 18.32s ===
* Fixed organization of the AssetProcessor SourceAssetBrowser
Assets within the Engine Root were grouped under a '/' entry.
That has been fixed to use the relative path within the engine root for
those assets
Assets outside of the Engine Root, but on the same drive were using
absolute paths before. Now there are child entries that navigate up the
directory hierarchy to those asset locations
* Added ly_enable_gems call to Atom gems targets that are required
The DefaultLevel.prefab contains several Atom components, that require
the Atom RHI, RPI, Common_Feature, ShaderBuilder and AtomLyIntegration CommonFeatures
gems to be enabled in order to successfully process in the
AssetProcessor.
* Added ly_enable_gems call to make the Camera gem required in Tools,
Builders and Clients.
This is needed as the DefaultLevel.prefab contains an Editor Camera
Component
* Adding the ly_enable_gem call to make the Maestro gem required
CrySystem currently requires Maestro to be enabled in order to
initialize
* Added ly_enable_gems call to the SceneProcessing gem to make it required
The SceneCore and SceneData libraries that are part of the core engine
Code folder requires the SceneProcessing gem to be enabled in order to
invoke the InitializeDynamicModule hooks in DllMain.cpp in order to
initialize those libraries.
* Fixed bad argument in comment for Prefab CMakeLists.txt
* Fixed Assert in Asset Builders due to the Atom RPI Builder
The Atom RPI Builder was enabling the Asset Catalog for the ScriptAsset a second time
The Atom Feature Common EditorSystemCommonComponent.cpp which also loads
in the AssetBuilder is enabling the Asset Catalog for the ScriptAsset
Added BehaviorContext reflection to the OutputDeviceTransformType enum
to fix the BehaviorContext errors about reflecting a method that returns
such an enum
* Added TypeId output to the JsonDeserializer report message about missing
ClassData
Previously the report callback would indicate that the target type was
missing Serialization class data, but didn't indicate the TypeId of the
target type
* Added support to the ly_enable_gems function to be able to support
0 gems being enabled.
Updated the Install step for CMake to propagate any ly_enable_gems
within a CMakeLists.txt for a target into the generated CMakeLists.txt
that is made for each installed IMPORTED target
* Adding newline to the end of the Camera Gem CMakeLists.txt
* Fixing target TYPE parameter for actual Gem Modules to use the GEM_MODULE tag instead of MODULE
* Reverting change to the DESTINATION directory for the installed CMakeLists.txt to use the relative path to the installed directory
* Adding the Atom_Bootstrap gem as a required gem
The Client and GameLaunchers required the Atom_Bootstrap gem in order to create the NativeWindow
Added Atom_Feature_Common client module as a runtime dependency of the AtomLyIntegration CommonsFeature client module
* Fixed register.py --all-projects-path and --all-gems-path arguments to
NOT register projects or gems that are within a template folder
Fixed reading of old pre-1.0 o3de_manifest.json files where the
"engines" key was a json array
* Changed how the relative target source directory is calculated when that source directroy resides outside of the engine root.
The final dirname component is used with a unique SHA256 has to form a <dirname>-<8 char SHA256> folder for installing files into
* Adding newline to the end of Atom_Bootstrap CMakeLists.txt
* Moving ly_enable_gems variants for Tools and Builders inside of PAL_TRAIT_BUILD_HOST_TOOLS block
* Adding a comment to AWSCore.ResourceMappingTool target to indicate that it is not a GEM_MODULE.
Furthermore it cannot be loaded with the Gem system because the library is in a different directory the executable
* Fixes issues with project paths w/ trailing slash
When launching AP with a --project-path that has a trailing slash, the
AssetBuilders would get that slash instead of a normalized version.
This would mess up the params sent to AssetBuilders.
* Missed a variable name replacement
* Addresses feedback on code style guidelines
Removed 'auto' keyword in favor of explicit types.
* 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>