Commit Graph

2580 Commits (1431afb51a08535a0ceabc22f11a55c0e5f5bb93)

Author SHA1 Message Date
lumberyard-employee-dm 751caf5f7c
Updated the Windows ScopedAutoTempDirectory creation logic to use a Uuid. (#6789)
Previously it was using `GetTickCount()` for the creation of the
directory which can collide if0 there are multiple processes
creating a temporary directory via teh ScopedAutoTempDirectory
constructor.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
4 years ago
srikappa-amzn d3a99235aa
Fix undo for create editor entity (#6785)
* Avoid undoing twice when undo is hit for CreateNewEditorEntity

Signed-off-by: srikappa-amzn <82230713+srikappa-amzn@users.noreply.github.com>

* Moved an assert immediately after entity creation

Signed-off-by: srikappa-amzn <82230713+srikappa-amzn@users.noreply.github.com>
4 years ago
lumberyard-employee-dm 18ea4ba6a8
Added a CriticalAssetsCompiled Lifecycle event (#6469)
The CriticalAssetsCompiled event can be handled to detect when the
AssetProcessor has finished processing Critical Assets

Also with the new event, an audit has been performed over all the
locations where the AssetCatalogEventBus OnCatalogLoaded event was being
handle to make sure it was the proper event to use.
If the handler was actually examing the enumerating over the full
catalog or querying all assets within the catalog, then it was a proper
use.
For handlers that were interested in a particular asset it was not

Moreover added implementations of `OnCatalogAssetChanged` and
`OnCatalogAssetAdded` to the FileTagComponent and the MaterialViewportComponent.

Any applications which uses the AtomToolsApplication
class(MaterialEditor, AtomSampleViewerStandalone,
ShaderMangementConsole) now signals a "CriticalAssetsCompiled" lifecycle
event as well as loads the "assetcatalog.xml" if it exists.

The Launcher application signals the "CrticalAssetsCompiled" event and
reloads the "assetcatalog.xml" for the ${project}.GameLauncher and
${project}.ServerLauncher in Launcher.cpp

Finally the Editor signals the "CriticalAssetsCompiled" and reloads the
"assetcatalog.xml" in CryEdit.cpp

resolves #6093

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
4 years ago
lumberyard-employee-dm 098005afbc
AZStd::basic_string improvements (#6438)
* AZStd::basic_string improvements

The AZStd::basic_string class has a better implementation of the Short
String Optimization, which increases the amount of characters that can
be stored in a `basic_string<char>` from 15 characters to 22
characters(not-including null-terminating characters). For a
`basic_string<wchar_t>` on Windows the amount of characters that can be
stored increases from 7 to 10. Using `basic_string<wchar_t>` on Unix
platforms SSO character amount from 3 to 4 characters.

An additional benefit is that the size of the AZStd::basic_string class
has been reduced from 40 bytes to 32 bytes when using the
AZStd::allocator.
When using a stateless allocator with no non static data members such as
AZStd::stateless_allocator, the size of the AZStd::basic_string is 24
bytes.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Corrected comments and updated type alias to usings for AZStd::basic_string

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Added Benchmarks for the basic_string and basic_fixed_string class

The benchmarks currently measure the speed of the `assign` overloads.
A benchmark has also been added to compare the speed swapping two
`basic_string` instances by 3 memcpy vs 3 pointer swap operations

Speed up string operation when in the iterator overload cases of the
`assign`, `append`, `insert` and `replace` function.
The code was always performing the logic to copy over a string that is
overlapping, without actually checking if the string was overlapping in
the first place.

Added an `az_builtin_is_constant_evaluated` macro that allows use of the
C++20 `std::is_constant_evaluated` feature to determine if an operation
is being performed at compile time vs run time.

That macro is being used to speed up the char_trait operations at run
time, by using the faster standard library functions.
For example char_traits::move now uses "memmove" at runtime, instead of
a for loop.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Simplified string logic in AWSMetricsServiceApiTest.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
4 years ago
John Jones-Steele 7c88f20e1e
Spinboxes now correct when rounding. (#6748)
* Spinboxes now correct when rounding.

Signed-off-by: John Jones-Steele <82226755+jjjoness@users.noreply.github.com>

* Changes from PR

Signed-off-by: John Jones-Steele <82226755+jjjoness@users.noreply.github.com>

* Fixed tests after change to rounding in spinbox

Signed-off-by: John Jones-Steele <82226755+jjjoness@users.noreply.github.com>
4 years ago
Michael Pollind 8503915cdd
bugfix: correct mouseMove under AzToolsFrameworkHelper (#6493)
* bugfix: correct mouseMove under AzToolsFrameworkHelper

REF: https://github.com/o3de/o3de/issues/6481
Signed-off-by: Michael Pollind <mpollind@gmail.com>

* chore: added unit test

Signed-off-by: Michael Pollind <mpollind@gmail.com>

* chore: address comments

Signed-off-by: Michael Pollind <mpollind@gmail.com>

* chore: correct fixture

Signed-off-by: Michael Pollind <mpollind@gmail.com>

* chore: tweak mouse move logic

Signed-off-by: Michael Pollind <mpollind@gmail.com>

* updates to track mouse/cursor position via events instead of using QCursor::pos()

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* rename AzToolFrameworkTestHelperTest.cpp to AzToolsFrameworkTestHelpersTest.cpp

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

Co-authored-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
4 years ago
Tom Hulton-Harrop 1a8b7aeb48
Small workaround and fix to ensure line fade (alpha) displays correctly (#6733)
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
4 years ago
sphrose 98b0f206a0
Merge pull request #6705 from aws-lumberyard-dev/3495_preferences_panel_update
3495 Preferences panel update: fix richtext elision and allow html links
4 years ago
Esteban Papp 54e0b8b7b5
Enabling mac tests (#6716)
* Adds mac test job

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* Points to sysctl properly to handle zsh

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* Fixes some macos differences with Linux when reading the CTEST_RUN_FLAGS parameters

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* adding the test job to the profile pipe

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* Disables some tests in Mac that are not passing

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* passes config to cli_test_driver and sets the right trait for the test (pytest instead of lytesttools)

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* Set proper traits for AtomRHI

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* Corrected AZ_TRAIT_UNIT_TEST_PERLINE_GRADIANT_GOLDEN_VALUES_7878 values for Mac

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* Disables EMotionFX tests in Mac

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* Removes debugging prints

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* Removes filters that were meant just for Linux

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* quotes are re-quoted in the test_mac.sh script

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Ronald Koppers f376d7e379
Merge pull request #6468 from aws-lumberyard-dev/Prefabs/ProcessStackAddPrefabBug
Spawnable Entity Alias improvements
4 years ago
sphrose 030ba4853b Merge branch 'development' into 3495_preferences_panel_update 4 years ago
AMZN-koppersr e2a960e442 Fixed a sync issue when a PrefaDOM was taken from a PrefabDocument.
When a PrefabDOM was taken from a PrefabDocument the Instance would continue to have the data from the original Prefab, which means they'd no longer be in sync as the Prefab would be empty. This was fixed by resetting the Instance so they're both clear.

Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
4 years ago
Esteban Papp 09fd52ef73
AzCore Math tests produce errors that need to be disabled in debug (#6678)
* Tests produce errors that need to be disabled in debug

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* PR suggestion

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
AMZN-koppersr 13375cd7d9 Merge branch 'development' into Prefabs/ProcessStackAddPrefabBug 4 years ago
AMZN-koppersr 31e51f8c3a Minor updates to the Spawnable Entity Aliases in response to PR feedback.
Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
4 years ago
Esteban Papp 89067fe667
Memory/benchmarks (#5896)
* initial version ported from an old implementation

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* simplification of code

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* Fixes a recursive loop

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* Removing commented code of different options for getting memory usage of a process

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* PR comment (NULL->nullptr)

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* Adds mulit-threaded tests

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* Improving runtime and making the whole duration manageable

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* Fixes Linux build

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* Fixes for mac

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* Fixes for HeapSchema to get a default block if none is passed

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* Adds recording functionality (disabled) and a benchmark that can run recordings

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* Removes Heap allocator from being possible to use as a SystemAllocator since it doesnt allow dynamic allocating (only works with pre-allocated blocks)

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* WIP trying to use SystemAllocator instead of raw reads

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* Makes the recorded benchmark more stable

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* More stability changes, improvement on type usage within the benchmark, cleanup of unstable stats

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* Adds benchmark files for Android

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* Fixes Linux nounity build

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* PR comments

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* Death test relies on an exception from ocurring, that exception is an access violation, which could not happen (i.e. the memory could be valid for the process)
The test didnt have to be a death test. Also handled the situation better in the code to be able to continue in that scenario (useful for release configurations)"

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
sphrose 783a04b880 3495 Preferences panel update: fix richtext elision and allow html links
Signed-off-by: sphrose <82213493+sphrose@users.noreply.github.com>
4 years ago
Esteban Papp c548fd7682
Death test relies on an exception from ocurring, that exception is an access violation, which could not happen (i.e. the memory could be valid for the process) (#6683)
The test didnt have to be a death test. Also handled the situation better in the code to be able to continue in that scenario (useful for release configurations)"

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
bosnichd 2dfdabdfc9
ProcessWatcher fixes. (#6570)
* ProcessWatcher fixes.

Signed-off-by: bosnichd <bosnichd@amazon.com>

* Update based on review feedback.

Signed-off-by: bosnichd <bosnichd@amazon.com>
4 years ago
Chris Galvan aa17120f09
Merge pull request #6496 from pollend/chore/add-assets-plane
chore: add assertions to plane to ensure normalization
4 years ago
Benjamin Jillich 79dd65e1cc
Quaternion shortest equivalent (#6472)
* Added new helper functions to get the shortest equivalent of the rotation. In case the w component of the quaternion is negative the rotation is > 180° and taking the longer path. The quaternion will be inverted in that case to take the shortest path of rotation.
* Added unit test.
* Renamed the angle parameter of the CreateRotationX/Y/Z() functions into angleInRadians.

Signed-off-by: Benjamin Jillich <jillich@amazon.com>
4 years ago
Michael Pollind 81b2841bd2 chore: correct text for assertion
Signed-off-by: Michael Pollind <mpollind@gmail.com>
4 years ago
Chris Galvan 24a3014e06
Merge pull request #6318 from aws-lumberyard-dev/PathSerializationSupport
Introduced a Json Serializer for the AzCore mutable path classes
4 years ago
Chris Galvan e09a4d20d3
Merge pull request #6240 from tjmgd/bug-keyword-prefab-23
Fix for bug in entity outliner search box
4 years ago
Jeremy Ong c3de8034eb
Merge pull request #6560 from aws-lumberyard-dev/RemoveTimeTests
Remove time tests that relied on main-thread sleeps
4 years ago
Jeremy Ong 174e27cbfb
Merge pull request #6559 from aws-lumberyard-dev/NullVariableInterfaceOptimization
Disambiguate null interface case
4 years ago
Jeremy Ong 5b76d47e17 Remove time tests that relied on main-thread sleeps
Sleeping in tests and attempting to rely on fine-grained measurements to
check code validity is intrinsically brittle. Wall-clock time is
unreliable in an environment where tests are run under a hypervisor that
may choose to suspend your VM at any point, or in situations where the
OS cannot schedule your thread in time. The correct way to reintroduce
these tests in the future is provide an override for the timestamp
queries that can be injected in the test environment to control the wall
time deterministically.

Signed-off-by: Jeremy Ong <jcong@amazon.com>
4 years ago
Jeremy Ong 6660c365b9 Disambiguate null interface case
In some cases, the interface being queried may be persistently nullptr
(e.g. a gem isn't active, or a feature was disabled by a cvar). In this
case, querying the interface would always enter the writer-lock branch
with existing code because nullptr was synonmous with "we haven't
queried for this variable yet."

This PR adds an additional state variable that is set when s_instance is
assigned to, so that after the variable is queried and found to be null,
future queries can enter the read-lock branch.

Signed-off-by: Jeremy Ong <jcong@amazon.com>
4 years ago
Michael Pollind 7dac0bac0d
chore: remove "using namespace " from AZCore Math (#6372)
* chore: remove "using namespace " from AZCore Math

REF: https://github.com/o3de/o3de/issues/6281

Signed-off-by: Michael Pollind <mpollind@gmail.com>

* chore: fix formatting

Signed-off-by: Michael Pollind <mpollind@gmail.com>
4 years ago
Michael Pollind cb740a3b3e
chore: remove "using namespace AZ" from AZCore Script (#6366)
* chore: remove "using namespace AZ" from AZCore Script

REF: https://github.com/o3de/o3de/issues/6281

Signed-off-by: Michael Pollind <mpollind@gmail.com>

* chore: address changes

Signed-off-by: Michael Pollind <mpollind@gmail.com>
4 years ago
tjmgd a6240ff6bc
Editor issue after clicking Find Layer in Asset Browser and (#6327)
Find Slice in Asset Browser in Slice mode

Signed-off-by: T.J. McGrath-Daly <tj.mcgrath.daly@huawei.com>
4 years ago
tjmgd 33495e4858
Slice save path incorrect, and error message incomplete (#6214)
Signed-off-by: T.J. McGrath-Daly <tj.mcgrath.daly@huawei.com>
4 years ago
tjmgd 3f766629bc
Lua Editor log - text ghosted (#6329)
Signed-off-by: T.J. McGrath-Daly <tj.mcgrath.daly@huawei.com>
4 years ago
Mike Balfour 37bb001040
Merge pull request #6517 from aws-lumberyard-dev/mbalfour/gitflow_211220_stabilization_2111RTE
Merge from stabilization/2111RTE
4 years ago
John Jones-Steele 219653a75b
Fixes rounding error display in Slider control (#6477)
Signed-off-by: John Jones-Steele <82226755+jjjoness@users.noreply.github.com>
4 years ago
Mike Balfour 1845eba6ee Fixed compile error.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
4 years ago
Mike Balfour a07534ea51 Merge commit '7e5115114ca9500abf67095acb71fbb6087d06c8' into mbalfour/gitflow_211220_stabilization_2111RTE 4 years ago
AMZN-Igarri bb14675db7
Fix tests Debug (#6405)
Signed-off-by: AMZN-Igarri <82394219+AMZN-Igarri@users.noreply.github.com>
4 years ago
amzn-sean fea4d0e6b1
adding TimeSystem unit tests (#6446)
Signed-off-by: amzn-sean <75276488+amzn-sean@users.noreply.github.com>
4 years ago
Michael Pollind e58d8815f1 chore: add assertions to plane to ensure normalization
Signed-off-by: Michael Pollind <mpollind@gmail.com>
4 years ago
Michael Pollind 2ddf55474e
chore: remove "using namespace " from AZCore Memory (#6373)
* chore: remove "using namespace " from AZCore Memory

REF: https://github.com/o3de/o3de/issues/6281

Signed-off-by: Michael Pollind <mpollind@gmail.com>

* chore: fix formatting

Signed-off-by: Michael Pollind <mpollind@gmail.com>

* chore: fix indentation for AllocatorBase.cpp

Signed-off-by: Michael Pollind <mpollind@gmail.com>

* chore: fix formatting

Signed-off-by: Michael Pollind <mpollind@gmail.com>

* chore: address minor checkstyle problems

Signed-off-by: Michael Pollind <mpollind@gmail.com>
4 years ago
Benjamin Jillich d20aa935ba
Quaternion to scaled-axis angle representation (and back) helpers (#6421)
Direct conversion helpers for quaternion to the scaled axis-angle representation and back without the need to convert them first to the axis-angle format and manually scale (or normalize on the way back). This also avoids having to deal with the special case of an identity representation which is 0,0,0 in the scaled axis-angle format while our convention for axis-angle is 0,1,0 for the axis and 0 for the angle.

Added unit tests that check the conversion round-trips from quaternion -> (scaled) axis-angle -> quaternion as well as comparing the scaled axis-angle representations from the direct helper functions as well as the axis-angle while manually scaling/normalizing.

Signed-off-by: Benjamin Jillich <jillich@amazon.com>
4 years ago
AMZN-koppersr 34edd4d0c0 Fixed post rebase Spawnable issues.
Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
4 years ago
AMZN-koppersr e8366040df Added unit test to cover the updates to the Spawnable Entities Aliases.
Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
4 years ago
AMZN-koppersr 1efbb7216f Addressed issues found in/by the Spawnables benchmarks and unit tests.
Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
4 years ago
AMZN-koppersr 02137e2219 Fixed existing tests for Prefab processing.
Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
4 years ago
AMZN-koppersr 43c42f63c6 Cleaned up some unused code in the Prefab processor.
Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
4 years ago
AMZN-koppersr 7b5868d198 Added additional functions to edit prefabs during processing to PrefabDocument.
Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
4 years ago
AMZN-koppersr b8e3b27ea9 Added a PrefabDocument for Prefab to simplify working with Prefabs during conversion to spawnables.
The new PrefabDocument handles the Prefab and the Instance. This reduces the number of times the Instance has to be reloaded from the Prefab and keeps the entity ids stable between steps. The intention is for all the PrefabDocument to conceptually manipulate the Prefab DOM, although behind the scenes it will manipulate the Instance for now. The Instance should only be directly used in case the PrefabDocument doesn't provide the functionality yet.

Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
4 years ago
AMZN-koppersr 9def902e1c Fixes up parents for entities that are moved to another Prefab.
This fixes issues with entities that are moved to another Prefab and have a parent that was also moved to the same Prefab. Entities that have their parent moved to another Prefab continue to work as is because a placeholder entity is always left behind. Entities that are moved to another Prefab but have a parent that's still in the original Prefab will currently not work correctly. This will be a addressed in a future commit.

Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
4 years ago