Commit Graph

3023 Commits

Author SHA1 Message Date
lumberyard-employee-dm 97e9f4dc7d [LYN-6838] Various Monolithic shutdown fixes for the GameLauncher (#4564)
* Added a stateless allocator which uses AZ_OS_MALLOC/AZ_OS_FREE to
allocate memory for objects in static memory.

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

* Updated the Maestro and LyShine Anim Nodes to use the
stateless_allocator for its static containers.

This prevents crashes in static de-init due to the SystemAllocator being
destroyed at that poitn

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

* Updated the EBus AllocatorType to use the EBusEnvironmentAllocator

Because the EBus Context resides in static memory, the SystemAllocator
lifetime is shorter than the EBus Context.

This results in shutdown crashes in monolithic builds due to all of the
gem modules being linked in as static libraries and the EBus context now
destructing at the point of the executable static de-init, instead of
the module de-init, where the SystemAllocator would still be around.

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

* Fixed an assortment of shutdown issues due to deleting objects after
AZ allocators are no longer available

Fixed the NameDictionary IsReady() function to not assert when the
dictionary when invoked after the environment variable it was stored in
was destroyed.
Updated the NameData destructor to check that the NameDictionary
IsReady() before attempting to remove itself from the dictionary

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

* Fixed NameDictionary destory workflow, to reset the EnvironmentVariable
instance

Updated the EnvironmentVariable instance to store the NameDictionary as a
value.

Added a rvalue reference `Set` function overload to the
EnvironmentVariable class to support move only types.

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

* Clang 6.0.0 build fixes

The C++17 std::launder feature isn't available in that compiler version

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
2021-10-13 09:38:36 -05:00
hultonha 48a74ca93d Remove clearFocus from EditorTransformComponentSelection duplicate Entity (#4571)
* remove clearFocus from EditorTransformComponentSelection duplicate entity

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* remove extra unneeded calls to RequestWrite

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* update PrefabPublicHandler to use SetSelectedEntities

Signed-off-by: hultonha <hultonha@amazon.co.uk>
2021-10-13 10:18:21 +01:00
Steve Pham ccd60513f1 Fix prefab close dialog Editor crash on Linux (#4623)
Signed-off-by: Steve Pham <spham@amazon.com>
2021-10-12 18:34:55 -07:00
Danilo Aimini 1cb26a31f8 LYN-7195 + LYN-7185 + LYN-5301 | Hide viewport helpers for entities out of focus + selection shortcut adjustments (#4615)
* Light refactoring of selection logic. Only draw helpers for selectable entities according to Editor Focus Mode and Container Entity systems.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* When Escape is pressed, clear the Prefab Focus.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Alter Ctrl+A and Ctrl+Shift+I to take editor focus mode and container entity behaviors into account.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Remove redundant comments and reduce footprint of tests.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Introduce loop protection, as GetParentId is known to loop in some situations possibly causing timeouts.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
2021-10-12 15:53:38 -07:00
Guthrie Adams 2b72f7b100 Merge pull request #4642 from aws-lumberyard-dev/Atom/guthadam/overriding_property_asset_ctrl_thumbnails
PropertyAssetCtrl and ThumbnailPropertyCtrl support custom thumbnail image
2021-10-12 17:27:03 -05:00
Steve Pham 70636572ff Fix casing of editor_xml filenames to match casing in .ly files (#4640)
Signed-off-by: Steve Pham <spham@amazon.com>
2021-10-12 15:08:07 -07:00
Artur K 80db67e90a Remove many unused variables and unused setting files (#4607)
* Remove many unused variables and unused setting files

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Remove a few more dead config vars

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* fix android test_ConfigureSettings_DefaultValues_SetsValues

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
2021-10-12 17:06:15 -05:00
Guthrie Adams f34811c373 Merge pull request #4639 from aws-lumberyard-dev/Atom/guthadam/thumbnail_bus_passes_const_qpixmap
Updated thumbnail notification bus to use const QPixmap&
2021-10-12 16:47:26 -05:00
Guthrie Adams 4f539b0eb7 fixed comments
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
2021-10-12 16:17:19 -05:00
Guthrie Adams f7e08d1c4b PropertyAssetCtrl and ThumbnailPropertyCtrl support custom thumbnail images
• PropertyAssetCtrl was previously extended with ThumbnailPropertyCtrl to optionally display a thumbnail and floating zoomed in preview of the selected asset.
• This change allows overriding the image that comes from the thumbnail system with a custom image provided as an attribute. The custom image can be specified as either a file path or a buffer containing a serialized QPixmap.
• This will be used by the material system in the editor to provide a dynamically rendered image of the material with property overrides applied so that the image will update as the user customizes their material.

Signed-off-by: Guthrie Adams <guthadam@amazon.com>
2021-10-12 15:36:19 -05:00
Danilo Aimini 6318247b3d LYN-7279 + LYN-7192 | Focus Mode - Container unit tests + Clear container entity open state on new level load (#4558)
* Change SetContainerOpenState to SetContainerOpen.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Introduce Clear function to avoid retaining all lingering open states when switching contexts/loading a new level.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Minor FocusMode fixture refactors to support ContainerEntity tests

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Introduce tests for the ContainerEntity API

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Add include to fix issue with EntityContextId not being defined.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Minor comment fixes. Moved environment clear functions to TearDown function of test fixture.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Use default editor context id in ContainerEntitySystemComponent

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Revert previous change as the EditorEntityContextId would not be initialized correctly on ContainerEntitySystemComponent Activate.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
2021-10-12 13:34:51 -07:00
Chris Galvan 190cf92f9d Merge pull request #4637 from aws-lumberyard-dev/cgalvan/FixPythonScriptsTreeItems
Fixed logic error causing Python Scripts tree items to only show extension intead of filename.
2021-10-12 15:30:57 -05:00
Guthrie Adams 8487373b0c Updated thumbnail notification bus to use const QPixmap&
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
2021-10-12 14:41:26 -05:00
AMZN-Phil c355c162ab Merge pull request #4486 from aws-lumberyard-dev/Prism/ShowRepoList
repo.jsons can be listed and and access through CLI and is Integrated with Project Manager
2021-10-12 12:38:49 -07:00
Chris Galvan 94c938496e Fixed logic error causing Python Scripts tree items to only show extension intead of filename.
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
2021-10-12 13:46:54 -05:00
Junbo Liang 736c2fe27b [O3DE][GameLift] Add client side change for starting and stopping matchmaking (#4536)
* [O3DE][GameLift] Add client side change for starting and stopping matchmaking

Signed-off-by: Junbo Liang <junbo@amazon.com>
2021-10-12 10:41:27 -07:00
Michael Pollind 7ca85460f7 Bug Fix: Improve display of Viewport UI (#4596)
- always show controls on top of main ui
- Tool window does not show visually in toolbar

issue: https://github.com/o3de/o3de/issues/4380

Signed-off-by: Michael Pollind <mpollind@gmail.com>
2021-10-12 09:41:11 +01:00
Scott Romero a95c609bd8 [development] Migrate Atom CPU timing stats tracking to use global stats profiler (#4549)
This change is a preparation for moving the CPU profiler/visualization system from Atom into its own Gem by removing the dependency on local time tracking object AZ::RHI::CpuTimingStatistics

Full changes include:
- Removed all usage of AZ::RHI::CpuTimingStatistics
-- Replaced with pushing to AZ::Statistics::StatisticalProfilerProxy global instance
- Promoted VariableTimer from AZ::RHI to AZ::Debug
- Removed now unused CpuTimingStatistics.h

Signed-off-by: AMZN-ScottR 24445312+AMZN-ScottR@users.noreply.github.com
2021-10-11 14:00:42 -07:00
Alex Peterson ef3470b0a9 Dependency confirmation screen and URL display fix
Signed-off-by: AMZN-alexpete <26804013+AMZN-alexpete@users.noreply.github.com>
2021-10-11 12:04:44 -07:00
nggieber 3698c3c3a7 Merge branch 'development' into Prism/ShowRepoList 2021-10-11 09:20:06 -07:00
Chris Burel 189aa5f3ac Disable the creation of the UserSettings.xml file in Xcb tests (#4593)
Signed-off-by: Chris Burel <burelc@amazon.com>
2021-10-11 08:50:05 -07:00
hultonha 5c859cb134 Fix camera drift issues (#4576)
* remove some unused code in RenderViewportWidget and make viewing devicePixelRatioF easier

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* updates to how cursor positions are calculate to handle the viewport widget moving

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* remove optional for previous position

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* add test to capture error with moving the widget

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* minor comment updates before publishing PR

Signed-off-by: hultonha <hultonha@amazon.co.uk>
2021-10-11 16:23:24 +01:00
Allen Jackson 3b89f7e1cd {lyn7283} added test for assetHint Json Serialzier callback logic (#4586)
* {lyn7283} adding unit test for the assetHint Json Serialzier callback logic

AssetTracker_Callback_Works will regress the functionality

Signed-off-by: jackalbe <23512001+jackalbe@users.noreply.github.com>

* clean up of the jsonRegistrationContext

Signed-off-by: jackalbe <23512001+jackalbe@users.noreply.github.com>
2021-10-11 09:55:28 -05:00
bosnichd 2d7dfe5047 Increase the max time in the iOS run loop from DBL_EPSILON to one millisecond to address issue where the virtual keyboard is sluggish. (#4580)
Signed-off-by: bosnichd <bosnichd@amazon.com>
2021-10-11 08:36:07 -06:00
jonawals 61533f68bf Merge pull request #4522 from aws-lumberyard-dev/LYN-5265_state_tracker_impl
LYN-7122: Remove redundant editor mode notifications.
2021-10-11 15:34:05 +01:00
John 3ef24d3a05 Header fix.
Signed-off-by: John <jonawals@amazon.com>
2021-10-11 14:28:27 +01:00
John e26d1f9ec5 Linux non-unity header fix (again).
Signed-off-by: John <jonawals@amazon.com>
2021-10-11 14:17:46 +01:00
John 6c8441713d Fix another missing header for Linux non-unity.
Signed-off-by: John <jonawals@amazon.com>
2021-10-11 14:02:56 +01:00
John 9baf76beab Add missing header for non-unity builds on Linux.
Signed-off-by: John <jonawals@amazon.com>
2021-10-11 13:28:33 +01:00
greerdv cd6fc66322 Merge pull request #4575 from aws-lumberyard-dev/triangle-mesh-warning
small improvements to triangle mesh rigid body warning
2021-10-11 12:40:24 +01:00
Artur K b91d503a82 Add AZStd::lerp math function, based on C++20 (#3468)
* Add AZStd::lerp math function, based on c++20

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Add unit test for AZStd::lerp, based on libc++ ones

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* written a reduced set of lerp tests, but now the license is correct

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Update Code/Framework/AzCore/AzCore/std/math.h

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

* Update Code/Framework/AzCore/Tests/AZStd/Math.cpp

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

* fix the github suggestion merge

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Copy some AZ::Lerp tests to std::lerp test suite + clang-format

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Cleanup lerp test cases

Remove comments that suggested very heavy tests that required things like `for every t1..`

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Fix unit test compilation issues

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* fix whitespace issue

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Use `TypeParam` in TYPED_TEST

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

* Remove unneeded new-lines

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* remove unused infinity

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
2021-10-11 11:55:24 +01:00
greerdv 622a9bc009 merge from development
Signed-off-by: greerdv <greerdv@amazon.com>
2021-10-11 10:23:42 +01:00
John 1cdb34326b Merge branch 'development' into LYN-5265_state_tracker_impl 2021-10-11 08:38:54 +01:00
lumberyard-employee-dm 7b1dd01d1d Implemented a deferred LoadLevel queue for the SpawnableLevelSystem (#4561)
* Moved the SettingsRegistryTests.cpp and
SettingsRegistryMergeUtilsTests.cpp to the Settings folder

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

* Implemented a deferred level load queue, that allows the
SpawnableLevelSystem to re-run the last LoadLevel command that occured
before it was constructed.

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

* Added SettingsRegistryVisitorUtils to reduce Array and Object visitor
boilerplate.

The VisitArray and VisitObject functions allows iteration over each
element of array and object respectively via a callback.

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

* Removed the queuing logic for levels that attempt to load before the SpawnableLevelSystem is available

Only the last level name that could not load is stored off and deferred until the SpawnableLevelsystem is created.

Made the FieldVisitor AggregateTypes constructor protected and added a comment specifying the expected values.

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

* Bring in the SettingsRegistry::Visitor::Visit functions into scope to fix MSVC compilation errors.

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

* Changed the list of supported SettingsRegistry types to visit to an enum to constrain the values to Array and/or Object.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
2021-10-08 20:09:22 -05:00
lumberyard-employee-dm e4d3ab118c Console changes: Added a new SettingsRegistry root key for executing (#4567)
console commands.

The new key is "/O3DE/Autoexec/ConsoleCommands" and the only difference
with the "/Amazon/AzCore/Runtime/ConosleCommands" key is that it isn't
excluded by the SettingsRegistryBuilder.

Due to not being excluded by the SettingsRegistryBuilder this key can be
used to forward console commands to the aggregate
`bootstrap.game.<config>.<platform>.setreg` files.

For GameLauncher specific console commands it is recommend to be put them in
.setreg file that uses the "game" specialization, such as
"autoexec.game.setreg".

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
2021-10-08 17:59:57 -05:00
lumberyard-employee-dm b7c2401056 Added a ThreadDispatch Policy to the EBus code (#4405)
* Added a ThreadDispatch Policy to the EBus code

The ThreadDispatch Policy can be configured by authors of an EBusTraits to
invoke a callback function after an EBus has finished it's dispatching
mechanism on a specific thread.

It takes into account recursive calls as well and will only invoke the
PostDispatch callback after all callstack entries for the current thread
are cleared.

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

* Clang build fix

The Traits type is dependent on the template parameter, therefore the compiler needs to be told that the ThreadDispatchPolicy is a type and not a value.

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

* Fixed DispatchLockGuard cxall in the TerrainWorldRendererComponent.cpp

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

* Added EBusTrait for configuring the DispatchLockGuard

Removed the ThreadPolicy trait, now that the DispatchLockGuard for the
EBus Context can be configured.

Used the DispatchLockGuard template along with the
IsInDispatchThisThread function to determine when an EBus has finished
dispatching on thread and released it's Context Mutex.

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

* Tweaked comment format for the IsInDispatch function


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

* Removed explicit GetContext call from ThreadDispatchTestBus.

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

* Clang EBus Test fix for DispatchLockGuard trait

Due to the clang compiler evalating constants within templates at the time of declaration, the LocklessDispatch value supplied to the template was always false resulting in the LocklessDispatch feature always locking.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
2021-10-08 15:14:22 -05:00
Steve Pham 73f8537030 Fix Issue saving new assets in Asset Editor on Linux (#4537)
* Add helper function to apply a selected file filter from a file dialog to the result filename if needed
* Add platform traits to restrict the use of the helper function on platforms that need to apply it
* Fix building of file filters of multiple extensions for a file type

Signed-off-by: Steve Pham <spham@amazon.com>
2021-10-08 11:41:46 -07:00
greerdv c562f0a807 small improvements to triangle mesh rigid body warning
Signed-off-by: greerdv <greerdv@amazon.com>
2021-10-08 16:56:53 +01:00
Terry Michaels 00b938b6a7 Merge pull request #4212 from ppinfel/component-doc-links
Fixes various component's help URL links to correct o3de.org page
2021-10-08 10:30:13 -05:00
Allen Jackson dcadfe6e1f Feature json assetloading assethints (#4554)
* capture assets using SerializedAssetTracker in LoadInstanceFromPrefabDom()
assign assets using asset hints where the asset ID is not valid
switch up SerializedAssetTracker to store pointers instead of copies of Asset<>

Signed-off-by: jackalbe <23512001+jackalbe@users.noreply.github.com>

* PoC for the AssetFixUp strategy


Signed-off-by: jackalbe <23512001+jackalbe@users.noreply.github.com>

* clean up of PoC

Signed-off-by: jackalbe <23512001+jackalbe@users.noreply.github.com>
2021-10-08 09:20:17 -05:00
FiniteStateGit 591854c384 Edit help menu lua documentation link (#4520) 2021-10-08 14:05:24 +01:00
Jeremy Ong e0a1164a92 Merge pull request #4424 from aws-lumberyard-dev/rgba16f/AZJobToIdle
Move Job system towards being used for Idle tasks
2021-10-07 17:31:05 -06:00
Qing Tao e64b9d3536 ATOM-16320 Remove PVRTC and ETC compressor (#4557)
Signed-off-by: Qing Tao <qingtao@amazon.com>
2021-10-07 16:23:13 -07:00
rgba16f 4b92aa34b7 Updated with PR feedback. Created a common function to calculate the number of worker threads.
Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>
2021-10-07 16:49:34 -05:00
John 863a7c8382 Address PR comments.
Signed-off-by: John <jonawals@amazon.com>
2021-10-07 17:21:45 +01:00
rgba16f a2c16fa24f adjust the default number of worker threads created by the TaskGraph & Job systems
Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>
2021-10-07 10:51:22 -05:00
AMZN-AlexOteiza d1947c68c9 Added extra output and callstack information for improving debugging automated tests (#4528)
Signed-off-by: AMZN-AlexOteiza <aljanru@amazon.co.uk>
2021-10-07 13:29:09 +01:00
hultonha 3d1ec83f78 Update naming to CameraInput types (#4527)
* rename public facing Pivot cameras to Orbit - previous rename was a mistake

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* some more comment and naming updates to improve camera documentation

Signed-off-by: hultonha <hultonha@amazon.co.uk>
2021-10-07 10:01:30 +01:00
hultonha 3f2881ea46 Simplify viewport interaction model reset functionality (#4524)
* simplify entity reset functionality

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* remove reference to removed shortcuts

Signed-off-by: hultonha <hultonha@amazon.co.uk>
2021-10-07 10:00:18 +01:00
Nicholas Lawson 6c4e16eab8 Merge pull request #4512 from aws-lumberyard-dev/burelc/xcbInputTextEvents
Generate text input events during XCB key press handling
2021-10-06 14:50:04 -07:00