* Added a deferred queue to the AZ Console class
An AZ Console instance will now store any console commands that could be
dispatched from a configuration file into a deferred queue, that can be
invoked later.
This can be used to defer execution of console commands in configuration files such as
.cfg, .setreg and .setregpatch files that are defined in gem modules that
have not been loaded yet.
The defered execution can then be invoked at any point later in the
application
Updated the Component Application CreateCommon function to invoke deferred console commands
after all the gems have loaded
fixes#2062
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fixed variable shadowing in the Console Deferred Command Test
Updated commit for the ClearDeferredQueue function to just mention
clearing the queue
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Filtered out execution of the ConsoleRootCommandKey as a console command
The AZ::Console notification handler is tracking changes to the fields
of "/Amazon/AzCore/Runtime/ConsoleCommands" and it's children.
Now the "/Amazon/AzCore/Runtime/ConsoleCommands" field is the
ConsoleRootCommandKey and not an actual console command so it shouldn't
attempt to be invoked
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Moved the execution of deferred console commands after linking deferred
functors
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Moved the execution of deferred console commands into CreateModuleClass
hook
Any module that loads using the ModuleManager system will attempt to
execute any deferred console commands to allow newly registered commands
from that module to be dispatched.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Added a StealHandlers function to AZ Event
The StealHandlers function is able to take all the handlers from an AZ
Event parameter and register them with the current AZ Event
This allows stealing handlers from expiring AZ Events, which is useful
for a lock and swap algorithm for thread safety.
1. Lock persistent AZ::Event
2. Swap persistent AZ::Event with local AZ::Event
3. Unlock persistent AZ::Event - Other threads can now add to this
AZ::Event
4. Invoke handlers from local AZ::Event
5. Relock persistent AZ::Event
5. Swap local AZ::Event with persistent AZ::Event
6. Local AZ::Event now contains handlers that were added when the lock
was free
7. Persistent AZ::Event now steals from local AZ::Event
8. Unlock persistent AZ::Event
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Separated SettingRegistry update/query mutex from Notifier update mutex
The Settings Registry update/query mutex is also better scoped to reduce
the amount of lock time.
The Notifier mutex being separate allows the Settings Registry to signal
a notification event without being under any mutex, by locking and
swapping the notifier event with a local instance
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Renamed StealHandlers function to ClaimHandlers
Replaced decltype keywords in ClaimHandlers to auto
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* 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>
* Converted the AZStd implementations of unintialized construct to use std
The uninitialized_default_construct and uninitialized_value_construct
functions implementations have been removed and the Standard library
implementations have been brought into the AZStd namespace scope
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Added a default construct to the UninitializedValueConstruct test case
which value initializes the int member which uses zero initialization to
initalize it to zero.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.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>
The drain function was used only before the API gained the ability to
wait on the completion of a graph. This is the correct way to "drain"
the task executor of work.
Signed-off-by: Jeremy Ong <jcong@amazon.com>
* EnvironmentVariableHolder: reduce the size of template instantiation.
Move almost all destruction logic to EnvironmentVariableHolderBase::UnregisterAndDestroy.
Specialized templates have DestructDispatchNoLock instead that can either destroy the held value,
or the holder itself.
UnregisterAndDestroy has been moved to the cpp file.
All of these changes reduce the profile build time and size on linux
Here, the size of bin/profile goes down by ~200MB.
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
* Requested changes/fixups.
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
* Use scoped_lock to simplify mutex management.
Updated comments.
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
* Hopefully a fix for env variables released at a wrong time
Conditional was using incorrect variable
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
* Comment fixup
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
* Missing negation in conditional
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
* Cleanup the internal logic in UnregisterAndDestroy
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
* fix an error with addr_impl_ref assignment operator
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
* chrono duration unary '+' was missing a return
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
* HierarchyMenu constructor logic fix
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
* at least assert in case of invalid arguments to ring_buffer::insert
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
* EditorSettings using incorrect string_view::find result comparison
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
"If constexpr" branches are evaluated at template instantiation time,
but static assertions receiving false are triggered even earlier.
Signed-off-by: Jeremy Ong <jcong@amazon.com>
Also, came up with more useful benchmarks that actually measure the
enqueue/dequeue operations for various simple workflows. For retained
graphs, time-of-flight from submission to execution is ~1us per job,
indicating job granularity should be >20us for retained jobs. For
dynamic jobs, where we need to pay the cost of allocation, a granularity
of ~100+ us may be advised.
Signed-off-by: Jeremy Ong <jcong@amazon.com>
- Handle changing of active camera entirely inside CameraComponentController
- Remove a LOT of legacy Cry things related to cameras
- Add a CameraSystemComponent to handle ActiveCameraRequestBus and CameraSystemRequestBus
Signed-off-by: Yuriy Toporovskyy <toporovskyy.y@gmail.com>
* Fixed bug in hash_table that made rehash() function to run infinitely on specific conditions when inserting an already existing element
Signed-off-by: Garcia Ruiz <aljanru@amazon.co.uk>
* Replaced erasing to happen in the source list instead
Signed-off-by: Garcia Ruiz <aljanru@amazon.co.uk>
* minor comment improvement
Signed-off-by: Garcia Ruiz <aljanru@amazon.co.uk>
* Small commment improvement
Signed-off-by: Garcia Ruiz <aljanru@amazon.co.uk>
* Small comment fix
Signed-off-by: Garcia Ruiz <aljanru@amazon.co.uk>
* Added assert and fixed code with incorrect hashing
Signed-off-by: Garcia Ruiz <aljanru@amazon.co.uk>
* .
Signed-off-by: Garcia Ruiz <aljanru@amazon.co.uk>
* Addressed PR comments, reverted to void* as it size_t hash is different
Signed-off-by: Garcia Ruiz <aljanru@amazon.co.uk>
* Fixed build on linux
Signed-off-by: Garcia Ruiz <aljanru@amazon.co.uk>
* Addressed PR comments
Signed-off-by: Garcia Ruiz <aljanru@amazon.co.uk>
Co-authored-by: Garcia Ruiz <aljanru@amazon.co.uk>
* Fixed the emplace function implementations for stack and queue
Cleaned up several functions in the stack, queue and priority_queue
classes that were non-standard or weren't needed.
Updated the "style" of the code to use more modern concepts: "typedef" ->
"using", empty constructor body -> default keyword.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Replaced the custom implementations of AZStd stack, (proirity)queue
Theses classes now have a template alias to the standard library version
of the classes
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updated print_registration functions to fix "register-show" command
Added unit test to validate the argparse options to the register show
command.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updated the register.py script to once again register an engine list
Previosly each engine were registered into a dictionary with multiple
keys, but once the engine.json started to self describe the registered
content that came with it, it was reduced to a single 'path' key.
Therefore it has been changed to a list to be consistent with other o3de
object paths
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updated the SettingsRegistryMergeUtitls Code which parses the attempts to locate the engine path associated associated with the project.json engine key to check the 'engines_path' object within the o3de_manifest.json
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updated print registration unit test to patch the get_project_path
This is to make sure that the existence of the placeholder project path
isn't validated when running the test
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Typo and formatting fixes for the print_registration script
Also corrected indentation in unit_test_print_registration script
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Some var cleanup so it shows better-organized in cmake-gui. Some vars were also not following the namign convention we are using
Removed some unnecessary messaging
Fixed a TIF bug where it would report the wrong test in a message, fixed a message that was being triggered
Changed TIF to be enabled just by the binary so running the ci_build scripts locally doesnt trigger TIF messaging
Removed `LY_ENABLE_MULTIPLAYER_COMPRESSION`, it was not being used
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* handling case where a parameter can be empty
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* needs to be var name, not contents
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Add an Orthogonal Projection option to the Camera Gem
This adds a check-box to opt into an ortho projection along with a half-width parameter to adjust the size of the visible area. Includes some light tweaks to ensure debug rendering looks OK and that we generate a correct camera state for these non-perspective views.
Known issue: while in "Be this camera" mode in the Editor using an ortho projection manipulators aren't working correctly. This appears to be a downstream issue with CameraState consumers not actually checking the ortho flag.
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Fix some typos
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Account for reversed depth buffer
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Clarify depth reversal for MakeOrthographicMatrixRH
Signed-off-by: nvsickle <nvsickle@amazon.com>
Synergy (now Barrier) input was lost when we removed the CryLegacy Gem. This resurrects the code, updates it to work with Barrier (which is the open source project based on the original Synergy core), and updates it to be more conformant with the AzFramework Input framework.
Notes:
- The majority of code in BarrierInputClient.cpp is still largely unmodified from the original Cry drop and could use some love to make it more robust, but it works so at least gives us somewhere to start.
- The current iteration replaces the host platform's default mouse/keyboard implementation upon creation of the BarrierInputClient, and if the connection fails or is later lost we don't restore the default implementations which we should for a better use experience. On a related note, for some use cases it would be better to create additional mouse/keyboard input devices (that use the Barrier implementations) in addition to the existing devices (that use the host platform's default implementation), however this would mean that any system assuming only one mouse/keyboard device exists would not work with the additional Barrier input devices. We can iterate on both of the above issues in the future as needed, perhaps providing configurable options to control the behaviour.
Signed-off-by: bosnichd <bosnichd@amazon.com>
Since TraceMessageBus will be called from multiple threads and python interpreter is single threaded, all the bus calls are queued into a list and called at the end of the frame in the main thread.
Signed-off-by: moraaar <moraaar@amazon.com>
* Add missing RTTI include to fix non-unity build error
* Add missing includes that were automatically added as part of unity builds
Signed-off-by: Steve Pham <spham@amazon.com>
Engine improvements/fixes
Fixed behavior that made the editor automated test to be sometimes stuck if lost the focus is lost.
Added support for specifying multiple tests to in batch to the editor, this is achieved by passing --runpythontest with the tests separated by ';'
Added new cmdline argument --project-user-path for overriding the user path. This allows to have multiple editors running writing logs and crash logs in different locations.
Moved responsability of exiting after a test finishes/passes out of ExecuteByFilenameAsTest, callers will use the bool return to know if the test passed.
Editor test batch and parallelization implementation:
Now the external python portion of the editor tests will be specified via test specs which will generate the test. Requiring no code. This is almost a data-driven approach.
Tests can be specified as single tests, parallel, batchable or batchable+parallel
Command line arguments for pytest to override the maximum number of editors, disable parallelization or batching.
Automated tests for testing this new editor testing utility
Signed-off-by: Garcia Ruiz <aljanru@amazon.co.uk>
Co-authored-by: Garcia Ruiz <aljanru@amazon.co.uk>
* [GHI 2178] Fixed missing vegetation info
The entity debug drawing culling system was removing it due to the level entity not having an AABB. Since this component can draw infinitely far, it just needed a max AABB.
With the culling fixed, it made another culling problem evident - a bug in the font code where it wasn't culling 3D text rendered behind the camera. Now it is.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
* Fix problem with debug rendering not immediately showing up.
When using FloatMax for the AABB, it causes math overflows with the initial camera frustrum. Changing to max/2.0f is sufficient to avoid the overflows.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
* Fixed normals on mesh raycasts.
The normals needed to be normalized after transformation, and didn't need the non-uniform scale applied to them, since they're normals.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
* Fixed the bug that prevented max-size AABBs from working with ShapeIntersection::Overlap.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
By adding the natvis to a vcxproj Visual Studio automatically loads it
when using the source engine
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* {LYN-4514} Engine updates to enable PAB for the Blast Gem
* Engine updates to enable Python Asset Building for the Blast Gem
* added API to detect IsPythonActive()
* ExportProductList behavior
* scene manifest usage of generated assetinfo
* updated ScriptProcessorRuleBehavior to handle OnPrepareForExport
Tests: new tests for scene behavior via ExportProduct
Signed-off-by: Jackson <23512001+jackalbe@users.noreply.github.com>
* updated base on PR feedback
added more comments for IsPythonActive()
added a serializeContext for export product list
Signed-off-by: Jackson <23512001+jackalbe@users.noreply.github.com>
* Update PrefabLoader to sanitize ingested prefabs and have core systems operate with default values
Signed-off-by: sconel <sconel@amazon.com>
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Remove IsExplicitDefault implementation to avoid confusion (since the function isn't virtual).
Avoid copying PrefabDoms over in SanitizeLoadTemplate.
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Address naming and commenting concerns from PR reviews.
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Fix to error detection code
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Add support for all uuid formats for zero check.
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
Co-authored-by: sconel <sconel@amazon.com>
The tag name max size should match the maximum size of a project name,
since the project name is automatically added as a specialization tag in
the settings registry when loading .setreg files from within the
<ExecutableDirectory>/Registry directory
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
Co-authored-by: Tom spot Callaway <spot@fedoraproject.org>
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
Co-authored-by: Tom "spot" Callaway <72474383+spotaws@users.noreply.github.com>
Co-authored-by: Tom spot Callaway <spot@fedoraproject.org>
* Fix compile error from -Wwritable-strings
Signed-off-by: Chris Burel <burelc@amazon.com>
* Fix flags used to build MaskedOcclusionCulling with clang
Signed-off-by: Chris Burel <burelc@amazon.com>
* Fix class that has a final destructor, but the class itself was not final
Signed-off-by: Chris Burel <burelc@amazon.com>