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>
* 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>
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>
* Some fixes for paths with spaces
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* PR comments
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* 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>
* 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>
* 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>
* 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>
* updates to ViewportTitleDlg to better expose grid snapping visualization
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* small typo fix
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* add escape handling for widget to be more consistent with other QMenu behavior
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* remove unneeded [[maybe_unused]]
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
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>
* 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>
* {lyn8865} Adding DataTypes::ScriptProcessorFallbackLogic
- Give the user an option how to handle fallback logic for script rules
Signed-off-by: Allen Jackson <23512001+jackalbe@users.noreply.github.com>
* the new code found an error in a Python script... it seems to work!
Signed-off-by: Allen Jackson <23512001+jackalbe@users.noreply.github.com>
* fixing up the regression test
Signed-off-by: Jackson <23512001+jackalbe@users.noreply.github.com>
* dump version number
Signed-off-by: Allen Jackson <23512001+jackalbe@users.noreply.github.com>
* 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>
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>
This change reworks the AssetProcessor's FileWatcher so that it only uses
one thread. This is motivated by getting better support for inotify on
Linux. The previous architecture required calling `inotify_init` once for
each directory that was being watched, and using separate inotify instances
for each watched tree. In addition, having separate threads per watched
tree is not necessary, and just consumes system resources. Each platform
supports watching multiple directories with the same platform-specific
watcher API, so each platform has been updated accordingly.
The interface to the FileWatcher class is greatly simplified. Previously,
it supported client-supplied filtering of the paths that would generate
notifications. This was done by subclassing `FolderWatchBase` and
implementing `OnFileChange`. However, only one filter was ever used, so
that filter is now hard-coded in the FileWatcher class, and the classes
driving the old filtering mechanism are removed. Users of the interface
now have a much easier time, they just call `AddFolderWatch` with the path
to watch, and only have to connect to one set of signals, instead of
separate signals per watched directory.
Signed-off-by: Chris Burel <burelc@amazon.com>
* AssetBuilder sends builder registration network message to AP
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Add AP activating status message
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* First builder handles registration.
Fixed deadlock caused by AP and AssetBuilder waiting on each other when registering by moving AP builder start code to a thread
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Clean up external builder registration
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Add thread description for builder manager idle thread
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Remove gem loading
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Clean up builder registration and remove unused functions
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Remove PostActivate call from batch application since it will be called after builders are registered
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Removal external builder dependency scanning since we no longer support builder dlls
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Fix missing bus disconnect
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Remove unused variable
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Moved AP-AssetBuilder specific types into AssetBuilder.Static library. Also removed some unused/old code
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>