* Avoid undoing twice when undo is hit for CreateNewEditorEntity
Signed-off-by: srikappa-amzn <82230713+srikappa-amzn@users.noreply.github.com>
* Moved an assert immediately after entity creation
Signed-off-by: srikappa-amzn <82230713+srikappa-amzn@users.noreply.github.com>
* Spinboxes now correct when rounding.
Signed-off-by: John Jones-Steele <82226755+jjjoness@users.noreply.github.com>
* Changes from PR
Signed-off-by: John Jones-Steele <82226755+jjjoness@users.noreply.github.com>
* Fixed tests after change to rounding in spinbox
Signed-off-by: John Jones-Steele <82226755+jjjoness@users.noreply.github.com>
* bugfix: correct mouseMove under AzToolsFrameworkHelper
REF: https://github.com/o3de/o3de/issues/6481
Signed-off-by: Michael Pollind <mpollind@gmail.com>
* chore: added unit test
Signed-off-by: Michael Pollind <mpollind@gmail.com>
* chore: address comments
Signed-off-by: Michael Pollind <mpollind@gmail.com>
* chore: correct fixture
Signed-off-by: Michael Pollind <mpollind@gmail.com>
* chore: tweak mouse move logic
Signed-off-by: Michael Pollind <mpollind@gmail.com>
* updates to track mouse/cursor position via events instead of using QCursor::pos()
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* rename AzToolFrameworkTestHelperTest.cpp to AzToolsFrameworkTestHelpersTest.cpp
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
Co-authored-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
When a PrefabDOM was taken from a PrefabDocument the Instance would continue to have the data from the original Prefab, which means they'd no longer be in sync as the Prefab would be empty. This was fixed by resetting the Instance so they're both clear.
Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
The new PrefabDocument handles the Prefab and the Instance. This reduces the number of times the Instance has to be reloaded from the Prefab and keeps the entity ids stable between steps. The intention is for all the PrefabDocument to conceptually manipulate the Prefab DOM, although behind the scenes it will manipulate the Instance for now. The Instance should only be directly used in case the PrefabDocument doesn't provide the functionality yet.
Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
This fixes issues with entities that are moved to another Prefab and have a parent that was also moved to the same Prefab. Entities that have their parent moved to another Prefab continue to work as is because a placeholder entity is always left behind. Entities that are moved to another Prefab but have a parent that's still in the original Prefab will currently not work correctly. This will be a addressed in a future commit.
Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
In some cases entities created for use as a Spawnable Entity Alias would share an entity id with their original. This is no longer working due to a reverse lookup from an entity id to its PrefabDOM. Upon further investigation this turned out to not matter as instances that are created by the PrefabCatchmentProcessor would create new entity ids any way. This cause unexpected behavior at runtime as entity relations may be broken. This will be addressed in a future fix.
Testing the above also highlighted a possible double delete in the builder when aliases were registered. This has also been fixed.
Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
While processing prefabs into spawnables new prefabs can be added for later processing. Because the new prefabs were immediately added to the list of prefabs it could happen that the new prefabs would be added to the active processor for processing, which could lead to infinite recursion. Adding prefabs while iterating prefabs now delays the addition until the iteration has completed.
Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
* wip fixes for entity viewport icons displaying in the correct order and handling selection correctly
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* add additional comment about z value
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* move manual sorting and some small tidy-up
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* update comment
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* updates following initial round of PR feedback
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* additional changes to support tests for entity icon intersection
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* add support to enable/disable icons separately from helpers
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* final tests added and small tidy-up to display EntityId correctly
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* update some manipulator test framework calls after utility functions were moved
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* fix for implicit cast
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* move icon scale values to AZ_CVARS
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* fix failing tests caught in AR and update some naming conventions for tests
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* update naming convention for members of ProjectedViewportRay
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* update other references to ProjectedViewportRay
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* update more references to ProjectedViewportRay change
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* update menus for python tests
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* Prefab hotloading - load and maintain asset references
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Working hotloading
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Clean up code, add comments
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Add missing includes
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Add event for template removal.
Clear ProceduralPrefabSystemComponent lookup when templates are removed.
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Add unit test.
Fix missing include, make sure source name is set
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Fix missing include
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Fix missing include
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Update comments to make ebus event behavior more clear
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Fix missing include
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Fix missing includes
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Fix missing include
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Fix temp directory usage which doesn't work on linux
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Fix temp directory usage which doesn't work on linux
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Use AZ::IO::Path for comparison. Print paths on failure
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Fix unit test - register asset with catalog so it can be looked up later
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Disable feature flag - redirect proc prefab check to IsPrefabSystemEnabled.
Procedural Prefabs are now on by default when the prefab system is enabled.
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Bump scene builder version to cause all procedural prefabs to rebuild
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Switch to lambda for ebus call
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Remove unused const
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Set Procedural Prefab Transform ComponentId to the hash of the file path.
Procedural prefabs needs to have a deterministic transform component ID in order for saved patches still work when the prefab is regenerated.
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Switch to Cityhash instead of XXHash since prefab system is using that elsewhere
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Added unit test
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Fix missing include
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Preapre codebase for FileRequest compiletime improvements
This is preparing grounds for the next PR that will contain the 'meat'
of the changes.
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
* Remove spurious newline.
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
Fixes#4366
- Added support for sending text events from the Qt event mapper
- Fixed several issues found while running the Profiler gem in debug
- Added ability to track AZ-consumed events in the Qt event mapper
- Minor clean up to input handling in ImGuiManager
- Select ImGui mouse events can now be properly consumed during AZ-input processing in the editor viewport
- Added tests for the Qt event mapper
Signed-off-by: AMZN-ScottR 24445312+AMZN-ScottR@users.noreply.github.com
- Change the test Archive Folder name, Extract Folder Name, and File List file to be all lowercase to prevent the 'ResolvePath' function in LocalFileIO when executed to cause issues on case sensitive file systems (#6277)
- Fix memory corruption in profile builds on Linux when using AZ::IO::PathView by using AZ::IO::FixedMaxPath instead
Signed-off-by: Steve Pham <82231385+spham-amzn@users.noreply.github.com>
* add temporary debug logging
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* improvement for box select sometimes getting stuck on
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* add temporary debug logging
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* improvement for box select sometimes getting stuck on
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* remove temporary logging
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* fixes for camera pitch issues
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* missed file with camera pitch fixes
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* remove debug logs
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* add some tests for new pitch constraint updates
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>