Commit Graph

2062 Commits (7fc0f14a1b4f66e560a2ee770b9dbb28dfd54d6f)

Author SHA1 Message Date
lumberyard-employee-dm 357df2bb4b
Added anchor key parameter to the SettingsRegistry MergeSettings (#4650)
* Added anchor key parameter to the SettingsRegistry MergeSettings

This allows the MergeSettings function to write JSON data anchored
underneath the supplied anchor path.

Upgraded the SignalNotifiers calls in SetObject, MergeSettings and
MergeSettingsFileInternal to query the type of the merge value at the anchor path
and supply that as the type to the notification event.

Also the the above functions now supply the anchor key root as the
path that was modified instead of assuming root ""

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

* Fixed whitespace inconsistencies in SettingsRegistryImpl

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

* Added a queue for storing SignalNotifier calls when a thread is
currently signaling.

The queued calls are invoked by that thread after it has signaled it's
current queue of events

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
4 years ago
Allen Jackson fbedd8126d
{lyn7251} Add material component example in Python (#4724)
* {lyn7251} Add material component example in Python

adds a AZ::Render::EditorMaterialComponent as an example of how to
override the default material from the scene building pipeline

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

* Only set the cube to a gray material
Skip loading the asset, instead just set the outPrefabAssetPath for the Prefab system to load

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

* stablizing the sub-id of procedural prefab groups

Signed-off-by: jackalbe <23512001+jackalbe@users.noreply.github.com>
4 years ago
lumberyard-employee-dm 643c5c2f82
Removed AZ_ENABLE_TRACING from Archive::GetPakPriority (#4741)
The AZ_ENABLE_TRACING check was preventing the Archive System from using the sys_PakPriority value set from the CVar system

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
4 years ago
igarri d8b47a1448 More fixes
Signed-off-by: igarri <igarri@amazon.com>
4 years ago
igarri a3c3de4a76 AR fixes
Signed-off-by: igarri <igarri@amazon.com>
4 years ago
igarri f6945f1334 Fixed Viewport Interaction
Signed-off-by: igarri <igarri@amazon.com>
4 years ago
igarri 6050d2e16e merge develop
Signed-off-by: igarri <igarri@amazon.com>
4 years ago
John 363bc33fed Fix broken function name.
Signed-off-by: John <jonawals@amazon.com>
4 years ago
John cf41ff020a Fix merge conflicts.
Signed-off-by: John <jonawals@amazon.com>
4 years ago
nvsickle f0e6841ca8 Fix issues with invalid Outliner entries
The EntityOutlinerListModel was violating the QAbstractItemModel contract in a few cases, as reported by `QAbstractItemModelTester`. The important ones causing issues were:
- Entry order was not guaranteed, leading to model indices pointing at invalid data
- Parent/child relationships could be temporarily invalid due to a change I made in EditorEntityModel::RemoveEntity to try to avoid an unnecessary reparent operation - as it turned out, the parent/child data was being cached even for recreated entities and not clearing child data could cause issues
- `EntityOutlinerListModel::ProcessEntityUpdates` was emitting data changed between two indices that didn't necessarily share a parent, which is [undefined behavior](https://doc.qt.io/qt-5/qabstractitemmodel.html#dataChanged)

The other reported issues (that weren't really causing issues with `QTreeView`) were:
- The root index had flags other than `Qt::ItemIsDropEnabled`
- `rowCount` showed all columns as having children
- `parent` showed indices as being parented to a non-0 column

This change introduces fixes for the above issues, namely:
- Reverts my change to `EditorEntityModel::RemoveEntity` to ensure we don't have invalid parent/child references sitting in the cache
- Ensures `EditorEntityModelEntry` child ordering is guaranteed sorted by EntityId, to prevent the `EntityOutlinerListModel` from having indices pointed at invalid data*.
- Fixes various model sanity issues, such as `rowCount` being 0 for indices with a non-0 column

Two unit tests were added to reproduce the invalid behavior and validate the fix: TestCreateFlatHierarchyUndoAndRedoWorks and TestCreateNestedHierarchyUndoAndRedoWorks
This change focuses on correctness over performance. My subjective in-Editor outliner experience is about the same, but it may be worthwhile to expand the test coverage with a benchmarking suite to look into areas for optimization.

*As a rough illustration of the previous child ordering behavior, consider the following entity hierarchy:
```
Root (EID 9999)
|_ Child1 (EID 2)
|_ Child2 (EID 3)
|_ Child3 (EID 4)
```
With an representations like the following pseudocode:
```
// EditorEntityModel representation
EditorEntityModelEntry root;
root.children[0] = 2;
root.children[1] = 3;
root.children[2] = 4;

// EditorOutlinerListModel representation
// row, column, user data (64 bit uint)
child1 = QModelIndex(0, 0, 2)
child2 = QModelIndex(1, 0, 3)
child3 = QModelIndex(2, 0, 4)
```

When removing a child, the `EditorEntityModel` used to do roughly the following:
```
// Swap and pop the last child
int indexToRemove = 0;
swap(root.children[indexToRemove], root.children[root.children.size() - 1]);
root.children.resize(root.children.size() - 1);
model.notifyRemoved(root, indexToRemove); // model removes the row indicated

// Leading to this EditorEntityModel state
root.children[0] = 4;
root.children[1] = 3;

// And this EntityOutlinerListModel state, note that the row indices are swapped from the indices in the backing storage
child2 = QModelIndex(0, 0, 3)
child3 = QModelIndex(1, 0, 4)
```

A QModelIndex having a row that doesn't match its underlying data is undefined behavior, and was the source of an intermittent crash in our `QSortFilterProxyModel` as subsequent updates to the wrong row led to an invalid proxy state.

Signed-off-by: nvsickle <nvsickle@amazon.com>
4 years ago
Pratik Patel b58ae15d83
Merge pull request #4595 from yaakuro/yaakuro-development-patch-1
[GNU/Linux] Add basic mouse device implementation and fullscreen handling to GNU/…
4 years ago
Yaakuro 4c733d3f4c Add basic mouse device implementation and fullscreen handling to GNU/Linux.
Signed-off-by: Yaakuro <y1@codeposer.net>
4 years ago
amzn-mike dd47e1aa4e
Add EditorPrefabComponent to procedural prefab container entity (#4727)
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
4 years ago
puvvadar f6e53241a1 Add test demonstrating size savings of DeltaSerializer
Signed-off-by: puvvadar <puvvadar@amazon.com>
4 years ago
puvvadar b5739f6918 Merge branch 'development' of https://github.com/o3de/o3de into mp_deltaserializer_perf 4 years ago
hultonha 244e1b8e16 add a switch to enable/disable cursor lock (default off)
Signed-off-by: hultonha <hultonha@amazon.co.uk>
4 years ago
Esteban Papp 8829ceb0f8 Merge branch 'development' into issues/exception_handling
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

# Conflicts:
#	Code/Framework/AzFramework/Tests/Spawnable/SpawnableEntitiesManagerTests.cpp
4 years ago
Esteban Papp 7651ba621c
Remove old "Integ" functionality from tests (#4688)
* fixes some warnings for newer versions of VS2022

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

* more warning fixes

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

* remove integ test filters from AzTest

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

* remove integ test handling from AzTestRunner

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

* changes integ tests of gridmate to regular tests and disables failing ones

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

* removes the Integ from the EMotionFX tests, but leaves them disabled since they are failing

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

* removes the Integ from the HttpRequestor tests and disables it since is not passing

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

* changing integ tests for DISABLED, these ones are using files that are not there

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

* fixes linux build
gridmate tests that were Integ are now disabled

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

* fixes linux warnings

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
hultonha 67ccc438c4 remove redundant word from comment
Signed-off-by: hultonha <hultonha@amazon.co.uk>
4 years ago
hultonha 2158c8cfdf Merge branch 'development' into hultonha_LYN-7394_focus_cursor
Signed-off-by: hultonha <hultonha@amazon.co.uk>
4 years ago
hultonha c955880d9b ensure cursor position is mapped to the right widget space
Signed-off-by: hultonha <hultonha@amazon.co.uk>
4 years ago
hultonha 9aafc51ff5
Add first pass version of click feedback while in Focus Mode (#4693)
* add first pass version of click feedback while in Focus Mode

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

* add more WIP experimental feedback ideas for Focus Mode

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

* small updates after UX feedback to improve focus mode feedback

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

* refactor and improve invalid click feedback

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

* update comments from review feedback

Signed-off-by: hultonha <hultonha@amazon.co.uk>
4 years ago
hultonha 3d4c060fb5 updates to improve cursor lock behavior
Signed-off-by: hultonha <hultonha@amazon.co.uk>
4 years ago
srikappa-amzn 87533d80c1
Delay propagation for all template updates in detach prefab workflow (#4707)
* Delay propagation for all template updates in detach prefab workflow

Signed-off-by: srikappa-amzn <srikappa@amazon.com>

* Some minor changes to the PrefabUndo constructor

Signed-off-by: srikappa-amzn <srikappa@amazon.com>
4 years ago
amzn-mike 969a55170e
Procedural Prefabs: Entity parenting fixes (#4669)
* Parent top level entities to container entity when creating prefab

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Add to_json method to PythonProxyObject to allow serializing any AZ serialializable type

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Update scene_mesh_to_prefab.py to parent entities in a chain

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Remove redundant eval

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Improve error handling in ToJson

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Add maybe_unused for commonRoot since it's not used

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
4 years ago
hultonha 1d6542c274 initial wip code to update cursor states
Signed-off-by: hultonha <hultonha@amazon.co.uk>
4 years ago
hultonha 5c8a1b573e
Add support for border in Focus Mode (#4692)
* restore component mode border

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

* add viewport border for focus mode, remove dead code in ObjectManager

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

* ensure the focus mode border is restored when leaving component mode

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

* update FocusModeNotification call order after merge from development

Signed-off-by: hultonha <hultonha@amazon.co.uk>
4 years ago
John 396530b274 Address PR feedback.
Signed-off-by: John <jonawals@amazon.com>
4 years ago
ffarahmand-DPS 606de5427b
Fixes debug console autocomplete issues (#4223)
* Fixed a crash caused by large autocomplete results in the debug console. A fixed vector was growing beyond its allocated size.

Signed-off-by: ffarahmand-DPS <ffarahmand@digitalpilgrims.com>

* Fixes printing duplicate autocomplete results, caused by looping over multiple CVARs registered with the same name. Also adds an erase to prevent undefined behavior.

Signed-off-by: ffarahmand-DPS <ffarahmand@digitalpilgrims.com>

* Adds a test case for autocomplete duplication in the event of multiple cvars existing under the same name. Two matching cvars are created and checked against the number of matches produced by autocomplete.

Signed-off-by: ffarahmand-DPS <ffarahmand@digitalpilgrims.com>

* Added two safety checks and made a pointer const as per reviewer feedback.

Signed-off-by: ffarahmand-DPS <ffarahmand@digitalpilgrims.com>
4 years ago
AMZN-Igarri f7eb906516
Moved Max Number of Entries Shown in Asset Browser Search View to EditorViewportSettings (#4660)
* removed references to maxNumberOfItemsShownInSearch

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

* Move Max Number of Entries Shown in Asset Browser Search View to EditorViewportSettings

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

* Fixed extra spaces

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

* Code review feedback

Signed-off-by: igarri <igarri@amazon.com>
4 years ago
moraaar 3b9762142a
Triangle Mesh with a Kinematic PhysX Rigid Body warns the user instead of error. (#4657)
Using triangle mesh with a kinematic rigid body is allowed, but the options "Compute COM", "Compute Mass" and "Compute Inertia" are not supported by PhysX and an error in logged that default values for COM, Mass and Inertia will be used. Now this situation is captured and an explanatory warning is used instead.

- Improved RigidBody::UpdateMassProperties function to apply the same logic in the treatment of shapes for all three parameters: COM, Mass and Inertia.
- Improved UpdateMassProperties function by using references for the override parameters instead of pointers.
- Improved function that computes the Center of Mass UpdateCenterOfMass (renamed from UpdateComputedCenterOfMass), to include the same shapes that the compute mass and inertia functions in physx updateMassAndInertia, which is to include all shapes if includeAllShapesInMassCalculation is true, else include only the shapes with eSIMULATION_SHAPE flag.
- Removed unused private function RigidBody::ComputeInertia.
- Added unit test to check when the warnings are fired correctly when COM, Mass or Inertia are asked to be computed on a rigid body with triangle mesh shapes.
- Improved MassComputeFixture tests by not only using Box shape, but also sphere and capture, plus improved the PossibleMassComputeFlags parameters to include all possible variations of the MassComputeFlags flags.

Fixes #3322
Fixes #3979

Signed-off-by: moraaar <moraaar@amazon.com>
4 years ago
kberg-amzn 3040f74c41 Merging latest development
Signed-off-by: kberg-amzn <karlberg@amazon.com>
4 years ago
kberg-amzn a6e7a81b79 More fixes to migration, plus some quality of life fixes to TimeoutQueue to allow lambda based handlers and a quick fix to OctreeSystemComponent to more gracefully handle enumerate calls that lie outside the vis system bounds
Signed-off-by: kberg-amzn <karlberg@amazon.com>
4 years ago
Esteban Papp 17b5312ce5 PR comments
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
puvvadar 8a1d59934d Remove some includes
Signed-off-by: puvvadar <puvvadar@amazon.com>
4 years ago
puvvadar b295e674fc Update DeltaSerializer and tests with delta'd vectors
Signed-off-by: puvvadar <puvvadar@amazon.com>
4 years ago
Danilo Aimini bcf3980de6
LYN-7191 + LYN-7194 | Adjust Prefab operations to conform with Prefab Focus/Edit workflows. (#4684)
* Disable ability to delete container entity of focused prefab. Default entity creation to parent to container entity of focused prefab.

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

* Disable detach and duplicate operations for the container of the focused prefab. Update the context menu accordingly.

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

* Fix spacing

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

* Address minor issues from PR (error message, optimization in RetrieveAndSortPrefabEntitiesAndInstances).

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
4 years ago
Esteban Papp c5da705b46 fixes typo
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Esteban Papp a6c506c121 some warning fixes
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Esteban Papp 07a52d2dfc Merge branch 'development' into issues/exception_handling
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Esteban Papp 04a6744765 enables our exception handling and disables gtest's
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Esteban Papp e078580f2c Changes GTEST_OS_SUPPORTS_DEATH_TEST to the right define which is GTEST_HAS_DEATH_TEST
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Esteban Papp 3e729638b5 adds unhandled exception test
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Esteban Papp 88cc3c774a adds stack trace conversion from native
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
AMZN-koppersr aabb519452
Merge pull request #4565 from aws-lumberyard-dev/mnaumov/LYN-7227
Fixing crash creating new level when simulate mode is on
4 years ago
amzn-mike 63ece6e3ca
Change Asset Hint fixup code to not request assets be queued for load. (#4664)
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
4 years ago
Mikhail Naumov e36be1ee95 Merge branch 'development' of https://github.com/aws-lumberyard-dev/o3de into mnaumov/LYN-7227
Signed-off-by: Mikhail Naumov <mnaumov@amazon.com>
4 years ago
Chris Galvan 4d4f99767f
Merge pull request #4594 from pollend/chore/update-IntersectSegment-cleanup
Clean-up IntersectSegment  and improve documentation
4 years ago
Steve Pham 8d7b03c859
Implement open in file browser for Linux (#4677)
* Add support to open folder browser for Linux
* PAL'ified DesktopUtilities.cpp

Signed-off-by: Steve Pham <spham@amazon.com>
4 years ago
Chris Burel 5967b419a2
Only enable the Keyboard device in the XcbKeyboard unit tests (#4682)
This prevents other input devices from interfering with the expected calls
that the Keyboard tests should make.

Signed-off-by: Chris Burel <burelc@amazon.com>
4 years ago
igarri d12c6beb40 Added Default Camera Location to the Viewport Setting Registry
Signed-off-by: igarri <igarri@amazon.com>
4 years ago
Michael Pollind 5a204dc80b chore: remove equality from boolean expression
Signed-off-by: Michael Pollind <mpollind@gmail.com>
4 years ago
Vincent Liu 6823ea2274
Add GameLift matchmaking backfill server support (#4622)
* Add GameLift matchmaking backfill server support

Signed-off-by: onecent1101 <liug@amazon.com>
4 years ago
puvvadar ba7ff3c8e8 Add Network Input unit tests
Signed-off-by: puvvadar <puvvadar@amazon.com>
4 years ago
puvvadar 65e124809c Merge branch 'development' of https://github.com/o3de/o3de into mp_deltaserializer_perf 4 years ago
amzn-phist 80dcc34e6f
Add "Registry" folders as scan folders (#4583)
* Add "Registry" folders as scan folders

For projects, Gems, and Engine, add the "Registry" folder as scan
folders.

Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>

* Change params for adding scan folder

Also add trailing newlines to setreg files.

Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>

* Adjust the priority order for project templates

Scan folder orders were way too high, they should be very low to become
highest priority order.

Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>

* Removes change of default assets folder to Assets

Need to revert this change so it can be done separately.
Renamed the scan folder to 'Project/Assets' to prep for Assets folder
change later on.

Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>

* Update platform configuration test to pass

Adjusted expectation of scan folder count from 1 to 2 per Gem for
'Assets' and 'Registry' now.

Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
4 years ago
Esteban Papp 6a2020ec6c fixes some warnings for newer versions of VS2022
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Danilo Aimini f7e2d07a4b
LYN-7333 | Fix multiple selection by dragging to take focus mode and containers into account. (#4620)
* Change FocusModeNotificationBus's OnEditorFocusChanged arguments to also pass the previous focus root entity id.

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

* Add focus mode and container entity states to the visibility cache for the viewport. Use that data to correctly select entities when a rect is dragged on the viewport.

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

* Minor code adjustments

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

* Minor fixes and optimizations

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
4 years ago
Danilo Aimini 3c3cde99be
LYN-7189 | Outliner - Disable context menu if right clicking on disabled entity (#4651)
* Don't allow right clicking on a non selectable entity in the Outliner

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

* Also check that the index is valid to still allow the right click context menu to appear on empty areas of the widget.

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

* Change if check to a more readable bool.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
4 years ago
nvsickle fcd6360c26 Merge remote-tracking branch 'upstream/development' into nvsickle/OutlinerDuplicateEntryFixes 4 years ago
amzn-phist 29b62c7b84
Various updates to get pak builds working (#4552)
* Various updates to get pak builds working

-Fix basing config file merges off engine root.
-Merge command-line in relelase to make sure they override defaults.
-Fix nullptrs.
-Exclude more paths from being sent to bootstrap setreg.

Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>

* Reverting a change that caused some test failures.

Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>

* Change tabs to spaces

Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
4 years ago
Danilo Aimini da3a39a6a0
LYN-7121 | Focus Mode - Make editing a prefab an undoable operation (#4582)
* Refactor the PrefabFocusInterface to differentiate between Public and Internal functions. Introduce PrefabFocusUndo nodes to allow undoing Prefab Edit operations.

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

* Fix selection code to avoid warning message

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

* Removed changed property from PrefabFocusUndo node

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

* Switch from size == 0 to empty in EntityOutlinerWidget::OnSelectionChanged

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

* condense if check on Prefab Edit context menu item setup

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

* Correct interface usage in PrefabIntegrationManager (interface was renamed to public)

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

* Remove rej file that was included by mistake

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

* Fix missing interface initialization in PrefabFocusTests

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
4 years ago
John f9740ae25c Remove undefined behavior.
Signed-off-by: John <jonawals@amazon.com>
4 years ago
John 06910a7c82 Add API comments.
Signed-off-by: John <jonawals@amazon.com>
4 years ago
John 3c2c52910f Merge branch 'development' into LYN-5265_state_tracker_impl 4 years ago
John 2e7c8a0fd2 Double click entity in prefab to enter FocusMode.
Signed-off-by: John <jonawals@amazon.com>
4 years ago
John 65f3f26339 Fix issue with activating/deactivating FocusMode.
Signed-off-by: John <jonawals@amazon.com>
4 years ago
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>
4 years ago
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>
4 years ago
Michael Pollind 63da5847c1 chore: correct documentation and correct method return.
- change return for IntersectSegmentTriangleCCW to bool
- change return for IntersectSegmentTriangle to bool

Signed-off-by: Michael Pollind <mpollind@gmail.com>
4 years ago
Steve Pham ccd60513f1
Fix prefab close dialog Editor crash on Linux (#4623)
Signed-off-by: Steve Pham <spham@amazon.com>
4 years ago
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>
4 years ago
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
4 years ago
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&
4 years ago
Guthrie Adams 4f539b0eb7 fixed comments
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
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>
4 years ago
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>
4 years ago
puvvadar a273899f1b Add DeltaSerializer unit tests
Signed-off-by: puvvadar <puvvadar@amazon.com>
4 years ago
Guthrie Adams 8487373b0c Updated thumbnail notification bus to use const QPixmap&
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
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>
4 years ago
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>
4 years ago
Michael Pollind 02d8596d87 chore: improject documentation for IntersectSegment
- change return of IntersectRayDisk to bool
- change return of IntersectRayBox to bool
- move [out] after @param

Signed-off-by: Michael Pollind <mpollind@gmail.com>
4 years ago
Mikhail Naumov 7af448c9b7 PR feedback
Signed-off-by: Mikhail Naumov <mnaumov@amazon.com>
4 years ago
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
4 years ago
Chris Burel 189aa5f3ac
Disable the creation of the UserSettings.xml file in Xcb tests (#4593)
Signed-off-by: Chris Burel <burelc@amazon.com>
4 years ago
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>
4 years ago
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>
4 years ago
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>
4 years ago
jonawals 61533f68bf
Merge pull request #4522 from aws-lumberyard-dev/LYN-5265_state_tracker_impl
LYN-7122: Remove redundant editor mode notifications.
4 years ago
Michael Pollind 1c3b293cd3 fix comments replace /** with //!
Signed-off-by: Michael Pollind <mpollind@gmail.com>
4 years ago
greerdv cd6fc66322
Merge pull request #4575 from aws-lumberyard-dev/triangle-mesh-warning
small improvements to triangle mesh rigid body warning
4 years ago
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>
4 years ago
greerdv 622a9bc009 merge from development
Signed-off-by: greerdv <greerdv@amazon.com>
4 years ago
John 1cdb34326b Merge branch 'development' into LYN-5265_state_tracker_impl 4 years ago
Michael Pollind afa8bb9226 chore: update intersect and improve documentation
Signed-off-by: Michael Pollind <mpollind@gmail.com>
4 years ago
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>
4 years ago
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>
4 years ago
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>
4 years ago
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>
4 years ago
greerdv c562f0a807 small improvements to triangle mesh rigid body warning
Signed-off-by: greerdv <greerdv@amazon.com>
4 years ago