Commit Graph

3255 Commits

Author SHA1 Message Date
cgalvan 64ea419c5c Merge pull request #1243 from aws-lumberyard-dev/cgalvan/FixCreateCameraFromView
[LYN-4390] Implemented EditorCameraRequestBus::GetActiveCameraState on the EditorViewportWidget so that the "Create camera entity from view" action works again.
2021-06-10 15:51:50 -05:00
Terry Michaels 829a6fcc8d Removed Wireframe menu option since it doesn't work with Atom (#1248) 2021-06-10 15:42:06 -05:00
Danilo Aimini d3be5600c3 Increase rotation step for Transform (#1244)
Using the spinbox on the Transform Component is made very cumbersome by the low rotation step. Increased it to make it more usable.
2021-06-10 12:30:17 -07:00
evanchia-ly-sdets 3e0b0582ea Merge pull request #1214 from aws-lumberyard-dev/enable_smoke_test
enabling smoke test
2021-06-10 11:55:58 -07:00
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>
2021-06-10 11:04:18 -07:00
Aaron Ruiz Mora 42cc4214ba Use dropdown comboboxes in Physics Materials fields' of PhysX Groups in FBX Settings (#1242) 2021-06-10 18:39:42 +01:00
cgalvan c684714e4b Merge pull request #1241 from aws-lumberyard-dev/cgalvan/AddGameModeLogging
[LYN-3801] Added back log message when entering/exiting game mode.
2021-06-10 12:20:32 -05:00
Terry Michaels 91fb8be535 Added toolbar icons, updated viewport header UX (#1240) 2021-06-10 11:42:25 -05:00
Esteban Papp 67489d2907 Remove PAL_TRAIT_BUILD_EDITOR_APPLICATION_TYPE 2021-06-10 09:36:16 -07:00
Chris Galvan 45b2391303 [LYN-4390] Implemented EditorCameraRequestBus::GetActiveCameraState on the EditorViewportWidget so that the "Create camera entity from view" action works again. 2021-06-10 11:18:29 -05:00
Scott Romero 5436e08d15 [stabilization/2106] fixed startup crash in project manager from installer build (#1231) 2021-06-10 09:11:11 -07:00
Chris Galvan 992a37df8d [LYN-3801] Added back log message when entering/exiting game mode. 2021-06-10 10:42:13 -05:00
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.
2021-06-10 16:36:38 +01:00
amzn-sean 2ede3c3dc3 fixed raycast multi SC node to return more then 1 result (#1238) 2021-06-10 15:56:48 +01:00
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.
2021-06-10 12:22:16 +01:00
Terry Michaels adf6d93a06 Moved toggle pivot to lower in the context menu, converted all context menu additions to use a singular mechanism (#1209) 2021-06-09 22:37:28 -05:00
Vincent Liu ac8ee00aff [LYN-4288] Adding error page if resource mapping tool has invalid setup (#1219) 2021-06-09 19:29:34 -07:00
AMZN-koppersr 463e0cfff3 Merge pull request #1200 from aws-lumberyard-dev/JsonSerialization/UnsupportedWarnings
Improved reporting on unsupported types by the Json Serialization
2021-06-09 19:18:36 -07:00
Guthrie Adams 86253f6cbc Merge pull request #1205 from aws-lumberyard-dev/Atom/guthadam/ATOM-15748_fixing_material_editor_launch_failure_for_new_projects
Fixing material editor startup and critical asset issues
2021-06-09 20:40:39 -05:00
AMZN-koppersr c46c82079c Fixed string format bug in JsonRegistrationContext 2021-06-09 18:35:04 -07:00
scottr 5061241992 [cpack/stabilization/2106] early out if sys import fails in PythonBindings::StartPython 2021-06-09 17:03:13 -07:00
AMZN-koppersr 4f4cb4e220 Merge branch 'stabilization/2106' into JsonSerialization/UnsupportedWarnings 2021-06-09 17:02:25 -07:00
lumberyard-employee-dm a9e59fd75f Updating the DefaultProject template to not insert the project-path parameter (#1223)
* Updating the DefaultProject template to not insert the project-path parameter into the VS Debugger Arguments for any applications

Added project-path injection directly within the LauncherUnified and AssetBuilder cmake scripts where their targets are defined

* Removing the add_vs_debugger_arguments call from the AutomatedTesting CMakeLists.txt
2021-06-09 18:50:47 -05:00
cgalvan da4e006621 Merge pull request #1227 from aws-lumberyard-dev/cgalvan/RemoveUnhandledEventMessages
[LYN-3145] Removed unnecessary spam message from legacy CEntityObject class when entering game mode.
2021-06-09 18:49:15 -05:00
AMZN-koppersr 773dc42537 Merge pull request #1228 from aws-lumberyard-dev/Prefab/EntitySpawnNotificationRemoval
Removed AddOn(De)SpawnedHandler from Spawnable Entities Interface
2021-06-09 16:42:08 -07:00
Terry Michaels 05d177568c Fixed cut & paste error of menu item name (#1230) 2021-06-09 18:33:12 -05:00
dmcdiarmid-ly 9ecdbd9d75 Merge pull request #1229 from aws-lumberyard-dev/Atom/dmcdiar/ATOM-15765
[ATOM-15765] Meshes without a material will cause a crash in MeshFeatureProcessor::SetRayTracingData
2021-06-09 16:16:23 -07:00
carlitosan 8e35ba8b58 Merge pull request #1222 from aws-lumberyard-dev/carlito/stabilization/2106
Carlito/stabilization/2106 fix for LYN-4098, LY-4019, LY-3777
2021-06-09 16:14:41 -07:00
AMZN-nggieber 5330309cb1 Set Desktop Icon for Project Manager (#1225)
* Set executable icon for O3DE
2021-06-09 16:01:48 -07:00
Terry Michaels aa7bab1027 Make SimpleAssetPropertyHandler handle showing the edit button on component cards (#1221) 2021-06-09 17:47:35 -05:00
scottr 2eefc08d2e [cpack/stabilization/2106] fixed startup crash in project manager from installer build 2021-06-09 15:21:30 -07:00
chcurran d1a5fb651b Fixes for reflection code that hides itself frm Script explicitly but NOT from ScriptCanvas 2021-06-09 15:14:23 -07:00
Doug McDiarmid d94015f5e1 Skipped meshes with no materials in MeshFeatureProcessor::SetRayTracingData 2021-06-09 14:53:32 -07:00
chcurran c4ab5fff9a testing code files for fixes for LYN-3777 2021-06-09 14:52:55 -07:00
chcurran 8ab2752f42 Fix for using BC class constants LYN-3777 2021-06-09 14:52:33 -07:00
Chris Galvan 6ac13c19a3 [LYN-3145] Removed unnecessary spam message from legacy CEntityObject class when entering game mode. 2021-06-09 16:32:15 -05:00
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.
2021-06-09 14:22:40 -07:00
Terry Michaels 3c23f5fead Fixed size of Save As window (#1208) 2021-06-09 16:21:02 -05:00
AMZN-koppersr e3fe4705f6 Post merge and Linux fixes. 2021-06-09 13:44:18 -07:00
Fuzzy Carter c4d01b62ef Merge pull request #1202 from aws-lumberyard-dev/LYN-2765_update_fbx_test_assets
Lyn 2765 update fbx test assets
2021-06-09 13:02:32 -07:00
greerdv 492225931c Merge pull request #1216 from aws-lumberyard-dev/pyrunfile_args_fix
fix handling of multiple arguments when running python scripts from console
2021-06-09 20:53:07 +01:00
chcurran b51103c2bf Merge branch 'stabilization/2106' of https://github.com/aws-lumberyard/o3de into carlito/stabilization/2106 2021-06-09 12:46:32 -07:00
chcurran ec7edac932 Hide the raw input handler bus from the SC node palette list 2021-06-09 12:43:43 -07:00
lumberyard-employee-dm 217eddc8bd Fixing the enable_gem.py and disable_gem.py commands (#1207)
* Fixing the enable_gem.py and disable_gem.py commands
The project path wasn't taking into account when querying for gems,
templates and restricted directories registered with the project

Fixing the cmake.py add_gem_dependency and remove_gem_dependency methods
to properly detect a gem within a `set(ENABLED_GEM ...)` cmake variable
Also updated the add_gem_dependency to add the gem right before the end
marker of ')'
Updated the remove_gem_dependency to remove each instance of a gem with
a content that is in between in the `set(ENABLED_GEM ...)` cmake
variable

* Correct Typo in manifest.get_registered doc string
2021-06-09 14:14:01 -05:00
AMZN-koppersr ccbb0f45f5 Merge branch 'stabilization/2106' into JsonSerialization/UnsupportedWarnings 2021-06-09 12:12:39 -07:00
AMZN-nggieber b26b472bba Fix Editor being opened twice by project (#1213) 2021-06-09 11:59:15 -07:00
guthadam 1339d453fc Adding PAL implementation for Linux 2021-06-09 13:21:59 -05:00
AMZN-koppersr 6063e3a391 Simplified Json Serializer registration code
Updated the Json Serializer registeration code in the RegistrationContext.cpp to use try_emplace instead of find + end check + insert.
2021-06-09 11:07:28 -07:00
guthadam af42705bc9 Fixing linux build 2021-06-09 12:49:35 -05:00
dmcdiarmid-ly f159de72f5 Merge pull request #1204 from aws-lumberyard-dev/Atom/dmcdiar/ATOM-15670
[ATOM-15670] AtomSampleViewer All RPI Samples Crash On Vulkan
2021-06-09 10:46:14 -07:00