* {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>
* 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>
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>
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>
* Fix: Lua directory empty and always loading in editor
Signed-off-by: T.J. McGrath-Daly <tj.mcgrath.daly@huawei.com>
* fixed naming convention errors
Signed-off-by: T.J. McGrath-Daly <tj.mcgrath.daly@huawei.com>
* Tidy up
Signed-off-by: T.J. McGrath-Daly <tj.mcgrath.daly@huawei.com>
Co-authored-by: Tobias Alexander Franke <tobias.alexander.franke@huawei.com>
* bugfix: resolve Lua script file not found
REF: https://github.com/o3de/o3de/issues/5899
Signed-off-by: Michael Pollind <mpollind@gmail.com>
* chore: user lowcase version of assetIdLower
Signed-off-by: Michael Pollind <mpollind@gmail.com>
- Use a vector for shared string storage (to avoid the double heap allocation for AZStd::string)
- Use a shared heap allocated any for opaque types (instead of an unsafe ref)
- Add a string comparison key lookup benchmark to measure the impact of Name
Signed-off-by: Nicholas Van Sickle <nvsickle@amazon.com>
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>
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>
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>
In some cases entities created for use as a Spawnable Entity Alias would share an entity id with their original. This is no longer working due to a reverse lookup from an entity id to its PrefabDOM. Upon further investigation this turned out to not matter as instances that are created by the PrefabCatchmentProcessor would create new entity ids any way. This cause unexpected behavior at runtime as entity relations may be broken. This will be addressed in a future fix.
Testing the above also highlighted a possible double delete in the builder when aliases were registered. This has also been fixed.
Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
While processing prefabs into spawnables new prefabs can be added for later processing. Because the new prefabs were immediately added to the list of prefabs it could happen that the new prefabs would be added to the active processor for processing, which could lead to infinite recursion. Adding prefabs while iterating prefabs now delays the addition until the iteration has completed.
Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
* wip fixes for entity viewport icons displaying in the correct order and handling selection correctly
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* add additional comment about z value
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* move manual sorting and some small tidy-up
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* update comment
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* updates following initial round of PR feedback
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* additional changes to support tests for entity icon intersection
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* add support to enable/disable icons separately from helpers
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* final tests added and small tidy-up to display EntityId correctly
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* update some manipulator test framework calls after utility functions were moved
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* fix for implicit cast
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* move icon scale values to AZ_CVARS
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* fix failing tests caught in AR and update some naming conventions for tests
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* update naming convention for members of ProjectedViewportRay
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* update other references to ProjectedViewportRay
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* update more references to ProjectedViewportRay change
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* update menus for python tests
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>