* preparatory work to allow for more viewport integration tests
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* minor grammatical fix
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* fix for missed bus call update
Signed-off-by: hultonha <hultonha@amazon.co.uk>
- Protected python execution of OnEventGenericHook by trying to lock the GIL and show a descriptive error when it was not possible to lock.
- Improved mechanism to lock python mutex and GIL in PhytonSystemComponent. Acquiring/releasing GIL once per thread.
- Added unit test to verify errors are fired when trying to execute OnEventGenericHook from another thread (as it should not able to acquire the GIL).
- Improved python threading tests to actually using python buses.
Signed-off-by: moraaar moraaar@amazon.com
* add a new implementation for cone/ray intersect to simplify and fix existing issue
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* move new ray/cone intersection function to AzToolsFramework - repond to PR comments
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* updates following PR feedback
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* add additional comment to give more context to the intersection function
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* update google test expect usage
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* Modernization + small fix.
Modernize ( `bool`/`override`/other) code in AzCore, AzFramework, AzQtComponents, AzToolsFramework, etc.
Replaced a `bind` or two, use `using` in a few places as well.
Fix nullptr comparison of AZStd::function.
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
* Apply review-based changes
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
- Fixed cloth asset, which stopped working due to Updated skeleton logic: #2957 which changes how fbx graph nodes are collected (affecting its names, which is used by cloth modifier).
- Fixed cloth test suite active call to base's run_test function. It stopped working when its signature was changed here: 182d410#diff-3f5d93b0a76c838893693f19f2eacfe3e67040d445d6463c5c425ef5075cb409
- Renamed nvcloth TestSuite_Active.py to TestSuite_Main.py to be consistent with the other test folders.
- Fixed ModelAsset creator clone function. It was missing to copy the material slots, ultimately causing Material Component to show 0 material slots.
- Fixed crash where the revert overrides menu was not created when checking changes for selected component and selected entities.
Signed-off-by: moraaar moraaar@amazon.com
-Fix a missing QPainter::restore call
-Remove 0px font sizes from our qss, which was just getting ignored by Qt and triggering a warning
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Release build fix for Windows
* Release build fix for Android
* Release build fix for Windows
* Release build fix for Android
* Release build fix for Linux
* Release build fix for Mac
* Release build fix for iOS
Signed-off-by: Steve Pham <spham@amazon.com>
Changes in this commit :
- Added AreDirtyTemplatesPresent() method to PrefabSystemComponentInterface
- Added ConstructSaveLevelDialog() helper method to create the save level dialog
- Added ExecuteSavePrefabsDialog() helper method to create and execute the save prefabs dialog
Signed-off-by: srikappa-amzn <srikappa@amazon.com>
* Add linux equivalents for all the places that enumerate platforms
Signed-off-by: Chris Burel <burelc@amazon.com>
* Fix the AssetFileInfoListComparisonTest fixture to not hardcode the PC platform
Signed-off-by: Chris Burel <burelc@amazon.com>
NOTE: The memory driller is still intact for now to avoid needing to
modify allocators, but the frame/cpu portions of driller and the
standalone executable are now gone.
Signed-off-by: Jeremy Ong <jcong@amazon.com>
* updates to camera tests to support different delta times and some further tidy-up
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* support variable delta time in mouse move test
Signed-off-by: hultonha <hultonha@amazon.co.uk>
This is the initial Terrain Gem. In this PR, it doesn't do anything, but it contains all of the initial code, icons, and build scripts for the gem to compile and build successfully. The follow-up PR will contain the first round of functioning code.
Also, with the creation of the gem, the TerrainSurfaceDataSystemComponent is getting relocated from the SurfaceData Gem to the Terrain Gem. This should have no impact, as that component has provided no active functionality in o3de. (It will start working again with the initial terrain system code in the next PR)
This also adds a couple of null guards to prefab code to prevent AP crashes, and fixed an incorrect service dependency in the VegetationSystemComponent that was exposed by moving the TerrainSurfaceDataSystemComponent.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
* fix for drift accumulating in the viewport camera
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* fix typo and update how events are stored
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* respond to PR feedback and fix linux and windows build issues
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* fix failing unit tests in camera input
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* fix for events that should have been consumed by manipulators making their way to the main viewport handler
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* add missing include for SANDBOX_API macro
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* add dependency on Qt::Test for AzToolsFrameworkTestCommon
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* fix order of buttons passed to QMouseEvent
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* potential fix for vtable error on linux
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* potential fix for vtable error on linux again
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* Sever dependency on legacy resource selector host
Audio resource selectors (browse dialogs) no longer need to be
registered with the legacy IResourceSelectorHost system. Set up a new
EBus specifically to handle browse button presses and directly invokes
the dialog.
Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
* Hook up legacy audio control selector to new EBus
Remaining use of legacy audio selectors (trackview) need to be able to
bypass ResourceSelectorHost now.
Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
* Removes ResourceSelectorHost and legacy selectors
This removes various Variable types that were tied to resource
selectors, such as GeomCache, Model, Animation, File. Removes the
ResourceSelectorHost completely. The two things that still appeared to
have selectors in TrackView are Audio Controls and Texture. Fixed the
audio control selector to work via EBus and the Texture selector didn't
seem to work at all, but left it in as it was.
Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
* Make the default audio selector return old value
Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
* Fix some signed/unsigned comparison warnings
Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
* Remove deleted function from Editor Mock
Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
* Change audio selector api to use string_view
Per feedback.
Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
Adds a new ebus for prefab apis and refactored the apis
Removed an empty test level
Auto delete tmp level when teardown tests
Add Base test level in Prefab folder
Removed unused comments
Checked if absolute path as an input of Create Prefab functions
Changed created prefab file path to support all platfroms
Added missing includes
Signed-off-by: chiyteng <chiyteng@amazon.com>
* Update storage of Prefab Dom info to be best effort
Signed-off-by: sconel <sconel@amazon.com>
* Update IssueReporter to Skipped instead of PartialSkip
Signed-off-by: sconel <sconel@amazon.com>
* Address PR feedback
Signed-off-by: sconel <sconel@amazon.com>
* Fix failing Prefab Unit Test that expected default values to be stripped
Signed-off-by: sconel <sconel@amazon.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>
* add an integration test to validate pick mode crash
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* update to test after review feedback
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* Fixed AzToolsFramework unit tests.
Signed-off-by: moraaar <moraaar@amazon.com>
* Include missing header.
Signed-off-by: moraaar <moraaar@amazon.com>
* Using util's class to generate temp directory, instead of qt.
Signed-off-by: moraaar <moraaar@amazon.com>
* Added empty line
Signed-off-by: moraaar <moraaar@amazon.com>
* Fixed warning in MessageTest fixture that CacheProjectRootFolder was not set
Signed-off-by: moraaar <moraaar@amazon.com>
* Additional checks in CreateDefaultEditorEntity helper function.
Signed-off-by: moraaar <moraaar@amazon.com>
* Updated the AzToolsFrameworkTest logic to set the project cache path
The Project Cache Path and Project Path is set through the CommandLine functionality of the ComponentApplication.
This allows those Project Cache Path and Project Path to be set within the Settings Registry during the ComponentApplication constructor
Removed the explicitly calls to delete the temporary directory and fixed the ScopedTemporaryDirectory class to recursively delete the temporary directory
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Setup correctly @assets@ alias for PlatformAddressedAssetCatalogManagerTest and AssetSeedManagerTest fixtures.
- These 2 test fixtures need to manually set the @asset@ alias to not include the platform at the end (which it does by default), because they are looping over platforms in their setup.
- Also initializing pointers to nullptr, so if setup fail in the future the teardown doesn't crash trying to delete garbage.
Signed-off-by: moraaar <moraaar@amazon.com>
Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Clear prefab templates on new level creations and loads
Signed-off-by: srikappa-amzn <srikappa@amazon.com>
* Fixed failing prefab unit tests after change to clear templates
Signed-off-by: srikappa-amzn <srikappa@amazon.com>
* Fix a bug in patching templates and improve error messaging
* Fixed incorrect order of function arguments
* Fix build errors regarding c style strings and casting entity ids
Signed-off-by: srikappa-amzn <srikappa@amazon.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>
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>
* Remove dirty entities correctly when prefab entities get destroyed
Signed-off-by: srikappa-amzn <srikappa@amazon.com>
* Remove call to clear dirty entity for single entity delete
Signed-off-by: srikappa-amzn <srikappa@amazon.com>
* Removed couple of asserts because order of operations is not fixed
Signed-off-by: srikappa-amzn <srikappa@amazon.com>
The issue is due to RootAssetBrowserEntry::UpdateChildPaths not taking
the RootAssetBrowserEntry fullpath into account when appending the child
path entry
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* External Gem and Projects now appear in Editor AssetBrowser
Optimized logic populating the FolderAssetBrowserEntries in the Editor AssetBrowser.
Added an "[External]" tag to scan folders which reside outside of the Engine Root
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fixed conversion of fixed_string to string when normalizing an added AssetBrowser file path.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* RootAssetBrowserEntry.cpp Linux conditional expression fix
Because an AZ::IO::PathView is convertible to an AZ::IO::FixedMaxPath and vice-versa, the conversion of the second part of the ternary expression absolutePathView needs to explicitly convert to an AZ::IO::FixedMaxPath
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
Porting over @AMZN-daimini 's work to clean up unneeded data from prefabs by removing cached transform data from json serialization. This is done by writing an explicit json serializer for the Editor Transform component and opting not to store or load the cached Transform fields.
Tested by creating new prefabs, loading and as well as resaving old prefabs which included patches aimed at cached transform data.
Signed-off-by: sconel <sconel@amazon.com>
Fixed unresolved product dependency query to be able to handle much larger queries (tested with 100,000 products) by storing queried products in a temp table first
Signed-off-by: amzn-mike <80125227+amzn-mike@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>
* Make Viewport input events fully Qt based.
This should fix an issue with Qt touch event -> mouse event translation in the Editor, and may also fix issues with the Mac Editor and remote desktop (though, lacking the requisite hardware, I can test precisely none of these things personally).
See https://github.com/o3de/o3de/issues/1889
- Adapted LegacyViewportCameraController to use Movement::X & Y (mostly for testing purposes, it's on the slate for being removed soon)
- Moved cursor capture logic from RenderViewportWidget into QtEventToAzInputManager so that it can make sure it generates correct movement deltas
- Removed ViewportMouseCursorRequests::PreviousViewportCursorScreenPosition to have our viewport controllers use our dedicated Movement::X and Y channels instead, which will work in the launcher
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Address review feedback
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Fix Linux build
Signed-off-by: nvsickle <nvsickle@amazon.com>
* fix outliner sorting using incorrect types for comparisons, fixes for [LY-122258] and [LYN-3666]
Signed-off-by: Alex Montgomery <alexmont@amazon.com>
* fix annoying but necessary Qt type cast
Signed-off-by: Alex Montgomery <alexmont@amazon.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>
* Clarify ImGui activation in Editor viewport
Signed-off-by: John Jones-Steele <jjjoness@amazon.com>
* All working following changes from comments in PR
Signed-off-by: John Jones-Steele <jjjoness@amazon.com>
* One more change
Signed-off-by: John Jones-Steele <jjjoness@amazon.com>
* fixes from comments in PR.
Signed-off-by: John Jones-Steele <jjjoness@amazon.com>
* Fixed git merge error
Signed-off-by: John Jones-Steele <jjjoness@amazon.com>
* Added header to ImGuiBus.h
Signed-off-by: John Jones-Steele <jjjoness@amazon.com>
* Fix for Jenkins error
Signed-off-by: John Jones-Steele <jjjoness@amazon.com>
* Minor typo fix
Signed-off-by: John Jones-Steele <jjjoness@amazon.com>
* Cherry Picking (lyn1751)
Problem with DCO so we need to cherry pick this branch.
Signed-off-by: aaguilea <aaguilea@amazon.com>
* Cherry picking #2
Signed-off-by: aaguilea <aaguilea@amazon.com>
* Cherry picking 3
Signed-off-by: aaguilea <aaguilea@amazon.com>
* Changed variables reverseurls
This was just changing some name variables.
Signed-off-by: aaguilea <aaguilea@amazon.com>
* Changes from past PR
Signed-off-by: aaguilea <aaguilea@amazon.com>
* changes from past PR and fixed small bug:
Also removed some legacy code from Resources.h
Signed-off-by: aaguilea <aaguilea@amazon.com>
* couple of changes from actual PR
Signed-off-by: aaguilea <aaguilea@amazon.com>
* fixed copyright issues for AR
Signed-off-by: aaguilea <aaguilea@amazon.com>
* rewrite of the filter code to fix [LYN-4156][LYN-4545]
Signed-off-by: Alex Montgomery <alexmont@amazon.com>
* improved onRowCountChanged() per comments
Signed-off-by: Alex Montgomery <alexmont@amazon.com>
This has a small bundle of bugfixes and improvements all based around improving prefab TrackView support:
* JsonMerger - improved the error message when patch remove operations fail to make the specific failure more obvious
Instance - swapped the order of destroying entities vs clearing the lookup tables so that lookups still produce valid results during destruction. (This could happen while creating undo caches)
* InstanceEntityIdMapper - in the case where an id isn't found, it now returns an invalid id instead of an "attempted-valid" one that still generally turned out to be not-valid
* PrefabUndo - downgraded a potential crash to an error message if for some reason the patch contains changes to an entity that doesn't currently have an alias. (This case can be caused occasionally by other bugs and error conditions)
* EditorSequenceComponent - downgraded a potential crash to an assert for the times when it tries to remove components, fails, but thinks it succeeded. (This case can currently be caused by using Maestro with Prefabs enabled)
* EditorSequenceAgentComponent - added an undo cache refresh whenever the component deletes itself, so that deleting itself during an EditorSequenceComponent destruction chain of events leaves the undo cache in the correct state.
* SliceConverter - fixed the conversion of entity references in top-level slice instance entities that refer down to nested slice entities. There was a chicken-and-egg problem in terms of which entities need to be created first to make the references and the prefab patching & serialization happy. This was worked around by creating placeholder top-level entities, then the nested slice entities, then replacing the top-level entities with the fully-realized ones.
Specific changes:
* Added more informative error message.
Signed-off-by: mbalfour <mbalfour@amazon.com>
(cherry picked from commit 672608a6c833c07295996cd9b3449825222b74d0)
* Changed the error condition to produce a "valid" invalid id instead of a deterministic but not-valid id
Signed-off-by: mbalfour <mbalfour@amazon.com>
(cherry picked from commit 3673950c949de8e067b32ddafaffd07e648a13d8)
* Guard against invalid reference assert/crash
Signed-off-by: mbalfour <mbalfour@amazon.com>
(cherry picked from commit 268d4ef3447f268a1372d07e028b9e67bac5c64e)
* Downgrade an invalid reference crash to an assert
Signed-off-by: mbalfour <mbalfour@amazon.com>
(cherry picked from commit 38c9303770845f4e863273dd6fb8fc7e83380425)
* Improved logic for handling entity references across nested slices.
Signed-off-by: mbalfour <mbalfour@amazon.com>
(cherry picked from commit 7e89a016d95fb72cb5f119e1e3768daa60e6bfb4)
* Changed order of entities.clear() call so that instance lookups are still valid during entity destruction.
Signed-off-by: mbalfour <mbalfour@amazon.com>
* Add undo cache notification when removing Maestro components.
Signed-off-by: mbalfour <mbalfour@amazon.com>
* Final update copyright headers to reference license files at the repo root
Signed-off-by: spham <spham@amazon.com>
* Fix copyright validator unit tests to support the stale O3DE header scenario
Signed-off-by: spham <spham@amazon.com>