You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
o3de/AutomatedTesting
Nicholas Van Sickle 4ee2f341dc
Fix several Prefab outliner ordering issues (#5747)
* Fix several Prefab outliner ordering issues

This change does a few things to address instability in entity order when prefabs are enabled:
- Changes ordering behavior on entity add to always be "insert after the last selected sibling of the new entity, or at the end if there is no selected sibling"
- Adds some logic to ensure selection stays frozen during prefab propagation to allow this behavior to be used
- Alters delta generation in `PrefabPublicHandler::CreateEntity` to use the template instead of reserializing the DOM - this avoids a whole bunch of patching issues caused by EditorEntitySortComponent doing post-hoc order fix-up and should generally be safer/faster as we're producing patches for the actual target for those patches
- Because the duplicate action is DOM-driven, and there's some thorniness around making changes that will affect the template during propagation, this adds `PrefabPublicHandler::AddNewEntityToSortOrder` to directly patch the DOM for the duplicate case

Two bits of this come from patches from the incredibly helpful @AMZN-daimini
- Alters `PrefabPublicHandler::GenerateUndoNodesForEntityChangeAndUpdateCache` behavior for determining what's an override: we now check to see if we're part of the current focused instance but *not* owned by the focus instance directly. This lets entity order for nested prefabs get saved to the owning prefab instead of as an override. I'm putting this up for discussion without a feature flag gating it, but we may wish to make this a toggle or disable it outright for stabilization (in which case entity order won't be saved to the owning prefab)
- Adds a custom serializer for EditorEntitySortComponent. This isn't strictly necessary now, but it was very useful for debugging and ended up receiving much more manual testing its migration path and save/load path more than I've tested without using the serializer.

Signed-off-by: Nicholas Van Sickle <nvsickle@amazon.com>

* Add missing serializers

Signed-off-by: Nicholas Van Sickle <nvsickle@amazon.com>

* Address some review feedback

Signed-off-by: Nicholas Van Sickle <nvsickle@amazon.com>

* Generate patch in `PrefabPublicHandler::CreateEntity` using the instance's fully evaluated template in-memory

Signed-off-by: Nicholas Van Sickle <nvsickle@amazon.com>

* Fix up comment

Signed-off-by: Nicholas Van Sickle <nvsickle@amazon.com>

* Fix Linux build

Signed-off-by: Nicholas Van Sickle <nvsickle@amazon.com>

* Try to make test less timing dependent (haven't been able to repro failure locally)

Signed-off-by: Nicholas Van Sickle <nvsickle@amazon.com>

* Fix another build issue

Signed-off-by: Nicholas Van Sickle <nvsickle@amazon.com>

* Fix unit test failures

Signed-off-by: Nicholas Van Sickle <nvsickle@amazon.com>

* Fix a duplicate issue with sanitization that was causing sporadic test failure (thanks, test!)

Signed-off-by: Nicholas Van Sickle <nvsickle@amazon.com>

* One more Linux fix...

Signed-off-by: Nicholas Van Sickle <nvsickle@amazon.com>
4 years ago
..
Animations Cleaning motion asset infos (#2197) 4 years ago
Assets Fixed casing of all .fbx.assetinfo files to match their .fbx (#5490) 4 years ago
Config Hair - Adding the Hair Gem to the automated testing (#4498) 4 years ago
Editor/Scripts {lyn7251} Add material component example in Python (#4724) 4 years ago
Fonts Integrating latest 47acbe8 5 years ago
Gem Fix several Prefab outliner ordering issues (#5747) 4 years ago
Levels Terrain Supports Physics test (#5706) 4 years ago
LightingPresets ATOM-13950 Material Editor: Removing auto select option from lighting and model presets 5 years ago
LuaScripts Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
Materials Made material property auto-rename procedure apply to Material Component at runtime. This ensures that an material property overrides and any gameplay scripts that work with property overrides can get the benefit of the material type version update procedure. 4 years ago
Objects Move wrinkle mask data out of default object srg (#4578) 4 years ago
Passes Reenable support for UI Elements that use Render Targets (#2352) 4 years ago
Registry Deleted PhysXSamples gem (#4753) 4 years ago
ScriptCanvas Fixed Physics SC tests (#4001) 4 years ago
ShaderLib Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
Slices Updating test asset for DistanceBetweenFilter tests 5 years ago
TestAssets Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
UI Integrating latest from github/staging 5 years ago
libs Integrating latest 47acbe8 5 years ago
multiple_mesh_one_material Squashed commit of Procedural Prefab work (#4481) 4 years ago
physicssurfaces Integrating up through commit 90f050496 5 years ago
sounds Updating to support Wwise SDK 2021.1.1.X (#686) 5 years ago
textures ATOM-16575 clean up image builder presets files (#4611) 4 years ago
AssetProcessorGamePlatformConfig.setreg MaterialEditor BasicTests added to AutomatedTesting for AR (#3022) 4 years ago
AutomatedTesting_Dependencies.xml Archive Component - Rewrite and additional work on Archive and Asset Bundler (#4332) 4 years ago
CMakeLists.txt Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
EngineFinder.cmake Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
UtilTest_PhysxConfig_Override.physxconfiguration Integrating latest 47acbe8 5 years ago
default.blastconfiguration Reenable Blast Automated tests (#42) 5 years ago
game.cfg Fixed All Physics automated tests (#129) 5 years ago
preview.png Updated Project Manager O3DE Logos with Rotated Squares Version (#1595) 5 years ago
project.json Integrating latest 47acbe8 5 years ago
test1.lua Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
test2.lua Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
test123.scriptcanvas Integrating latest 47acbe8 5 years ago