* 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>
* 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>
* Fixed: Item returning null in drag and drop when column is hidden
* Added explanation about why this approach is needed
Signed-off-by: John <jonawals@amazon.com>
Remove warning when entities that aren't registered to instances get passed to the Prefab Undo Cache (just ignore them to avoid noise in the console).
Also avoid marking templates dirty when they are added.
* When loading a template to memory, store the current Source (potentially overriding what was stored to disk)
* Before storing the prefab disk, remove the Source parameter from the Dom (as it's no longer necessary to save it).
* updates to better support showing/hiding viewport ui when grid snapping is enabled/disabled
* connect up editor settings callbacks
* minor polish changes
* api rename
* updates following review feedback
* first pass of adding grid snapping button
* update to request current grid size
* show/hide snapping option based on selection
* small tidy-up changes
* small updates following review feedback
* added some unit tests for snapping functionality and some small tidy-up/refactoring
* small refactor to ensure snap to grid ui only appears with snapping enabled
* add missing include to resolve build error
* fixes for build
* add & to make compiler happy
* Restore the code that display the dirty marker on the Level container. Ensure the dirty marker is cleared on level save.
* Moving call one level up to allow usage of the SaveTemplateToString function without clearing the dirty flag.
* Addressed feedback from previous PR
* Change missing entity aliases to be deterministic.
When converting slices, this helps produce the same results on multiple reconversions of the same data.
* Exposed the asset filter callback.
This allows the slice converter to specifically load nested slices as opposed to not loading *any* referenced assets.
* Added support for multiply-nested slice instance conversion.
(cherry picked from commit 86136ddfa6)
* Addressed feedback from previous PR
* Change missing entity aliases to be deterministic.
When converting slices, this helps produce the same results on multiple reconversions of the same data.
* Exposed the asset filter callback.
This allows the slice converter to specifically load nested slices as opposed to not loading *any* referenced assets.
* Added support for multiply-nested slice instance conversion.
- Added button to PhysX Collider Component in PhysX Mesh's field to open FBX Settings.
- Added button Material Selection to open the physics material library in Asset Editor.
- Default Material in PhysX configuration is read only and consistent with the text in combo boxes.
- Material configuration field "Surface Type" renamed to "Name"
- Fixed bug in EditorColliderComponent where the material selection was not updated when changing the library.
- Fixed bug where the materials selection was not set to default when a physics material from the asset was not found in the library.
- Added attributes 'BrowseButtonEnabled' and 'BrowseButtonVisible' to PropertyAssetCtrl.
- Updated physx configuration setreg files of AutomatedTesting project.
* Add instanceToIgnore to calls leading to instances being added to the queue for propagation.
* Change PrefabUndoEntityUpdate to make it so that the instance triggering the prefab template change is not reloaded on propagation, since it will already be up to date due to the way we generated the patch to begin with.
* Add FindPrefabDomValue utility function for paths
* Expose the level root prefab template id in the Prefab EOS Interface
* Fix Instance Alias Path generation to work with the new FindValueInPrefabDom function
* Stop reloading ancestors on propagation, and fix instance reloading so that the level dom is used (and overrides are preserved)
* Remove commented out code, refactor FindPrefabDomValue for paths (was handling an edge case incorrectly, and it's not even triggered)
* Fix issue with PathView reference - with PathView already being a reference, this resulted in a copy and triggered a warning during automated review builds.
* Additional fix to the build warning, remove redundant error message
* Revert changes to Instance::GetAbsoluteInstanceAliasPath(), as they were impacting serialization.
* Remove the dependency to the level root prefab template in the propagation code, climb up the hierarchy instead. This allows tests to work despite not using the EOS properly.
Also use PrefabDomPaths to retrieve the instance dom from the root dom instead of iterating.
* Remove now unused PrefabDomUtils function, extend optimization to link updates.
* Trigger a full instance propagation to correctly refresh alias references.
This is an issue in the test because some operations are called from the backend API and will not trigger propagation properly. Tests will soon be rewritten to more properly represent frontend workflows.
* Fixes lingering issues with propagation:
- Restores code that fixes the selection if entityIds have changed;
- Fixes Do() function on link update. Prefab containers will propagate correctly while still being stable during editing.
* Remove GetRootPrefabInstanceTemplateId (no longer necessary after the code has been rewritten)
* Fix optimization code to account for instances being removed and propagation being run out of order in Create Prefab undo.
* Renamed variable, added comments for clarity.
* Restore asserts on instance not being found; Rename Do to Redo for clarity; Add comments.
* Fixed incomplete comment.
Switch EditorContextMenu back to using popup instead of exec
The switch to exec was a deliberate change, but upon further testing with the latest version of our camera input controllers (both the Legacy and Modern variants) it is no longer necessary to call exec, and doing so can cause a bug in which the cursor is still hidden when the context menu appears.
* formatting changes to AzToolsFramework viewport related types + API comment style updates
* minor format change - include ordering
* improve formatting by moving comment
* fix compile error and switch to use AZ_Printf
* small polish changes after review feedback
* Add the last known parent to the prefab undo cache to detect changes in the owning instance.
Still WIP.
* Progress in handling reparenting. Still WIP, need a change in CreateLink that will be addressed in a separate branch and then merged back.
* A few fixes, reparenting now works with entities. Still working on instances.
* Fix assert crashing the Editor because of the arguments being in the wrong order.
* Handle moving the patches when removing and recreating links when reparenting nested instances.
* Rearrange some code to prevent including instance removal in instance update undo node, as it would be redundant and cause errors in some edge cases.
* Reorder instance reparenting to account for correct order of operation during undo/redo
* Fix order of operations to support multiple operations in one edit (reparenting to non-container entities while changing instance)
* Add function to refresh patches on links to allow aliases to be restored correctly on reparenting.
* Removed RefreshEntityPatchOnLink function. Introduced a simpler way of handling porting patches.
* Removing unnecessary code that was left after testing.
* Minor fixes to naming and comments.
* Restore previous error, no longer printing the failed patch.
* Remove unused includes.
* Restore include removed by mistake.
* Simplified patches retrieval by using internal function. Renamed some internal functions and variables to be more accurate.
This set of changes enables conversions for singly-nested slices. Multiple nesting hierarchies are only partially supported at this point. Conversion is also significantly more deterministic, which makes it easier to convert single slices without needing to reconvert every slice or level that relies on it as well.
Changes:
- Added version of Instance::AddInstance() that takes in an alias to allow for deterministic aliases
- Added a "SliceConverterEditorEntityContextComponent" that's used to specifically disable entity activation on creation. The disabling is done this way vs adding a new public API, because the disable shouldn't be required in any normal case outside of this tool.
- Disabled more AWS gems for the SliceConverter, as they're unneeded and cause issues if they're around in the tool.
- Added a small null check to the Camera Controller.
- Added the actual support for slice instance conversion. This instantiates the entities, applies the data patches, turns them into a prefab instance, and generates a JSON patch out of the changes.
* Show container transforms, reset container transform to zero before saving a prefab after create.
* Fix order of operations to prevent patching issues
* Reset the entity to the Identity Transform instead of the default constructor to correctly set the scale to 1.0
The initial CreatePrefab flow was trying to go from absolute -> relative -> absolute path before the file had ever been saved, so the relative -> absolute path conversion generated an error and always produced a project-relative path, even if the initial path was in a gem. For example, trying to save "c:/o3de/Gems/Camera/Assets/Entity1.prefab" would instead create "c:/o3de/AutomatedTesting/Entity1.prefab". This change preserves the absolute path throughout the initial creation flow so that the file is saved in the correct location.
The method "PrefabLoader::GetRelativePathToProject" has been changed to "PrefabLoader::GenerateRelativePath", and reworked to get a correct relative path. GetFullPath has also been modified to get correct relative paths too. This requires an Asset Processor connection - if one isn't available (like during unit tests), the methods have fallback logic to produce project-relative paths.
With this change, SliceConverter can't use SaveTemplate() to save the file any more, because GetFullPath now expects to find an existing path, which doesn't work for not-yet-created files. Instead, it now has to use the same technique as the Editor and call SaveTemplateToString then save the string out as a file.
* Clarify ViewportWorldToScreen being in widget space and add DeviceScalingFactor
* -Fix viewport icons being draw wrong on high DPI displays
-Fix loading viewport icons from absolute paths, which
* Address review feedback, fix build
* provide the ability for component adapters to support multiple components per entity
* add missing explicit keywords
* updates following review feedback - update how template logic works
* small updats (fix typo, remove redundant includes)
* add missing this->
* naming change, common -> controller
* add [[maybe_unused]]
This introduces an EditorViewportIconDisplayInterface that will eventually be used to outright remove CIconManager, it provides a simple interface for loading 2D image assets and rendering them on-screen. It also introduces AtomBridge::PerViewportDynamicDraw for getting a dynamic draw instance on a per-viewport basis
Spawnables had support for moving, but as the base class AZ::Data::AssetData doesn't support moving this was causing subtle issues. Moving spawnables wasn't used so it was removed.
There are already APIs for getting a relative product path from an absolute source path, or getting a relative source path for an *existing* source file, but there were no APIs for getting a relative source path for a *new* source file. Prefabs will need this ability to be able to correctly generate a relative source path inside the prefab file before the file has been saved.
The logic for relative source paths is a little bit tricky because the paths are relative to the watch folders, and the watch folders can be nested, with different priorities to explain which should take precedence. The input paths can also include specifiers like "." and "..", which need to be reconciled before creating the final correct relative path. The included unit tests test all of the tricky edge cases that I was able to identify.
* Started update for prefab based initial asset inclusion
* Newly Created levels now use a template prefab
* Review feedback changes
* Moved to better asset-based queries to generate the full path.
* Removed pesky pragma
* Replaced with const name instead of literal string
* Framework for setting default directory in asset picker
* Asset Picker will default to a passed in default directory in the selection model
* Added comment to the property to help define what is expected.
* Fixed string assignment
* Removed commented out #pragma
* Addressed review feedback
* Addressed review feedback
* Work in progress on adapting the DebugDraw gem to use AzFramework::DebugDisplayRequests API
* Cleanup fixes for DebugDisplayRequestBus & DebugDraw gem.
Remove SandboxIntegration implementation of the DebugDisplayRequestBus
Add DrawWireCylinder & DrawWireCone to the DebugDisplayRequestBus interface
Remove SetFillMode & DrawTexture functions from the DebugDisplayRequestBus interface
Fixup uses of the SetFillMode api, replace with new Draw[Wire|Solid]X functions.
Fixes to the DebugDraw gem to get it compiling with new warnings settings.
* Changes to get the DebugDraw gem working with Atom/RHI/Code/Include/Atom/RHI
Add GetWidth, GetHeight, GetDepth utility accessors to RHI::Viewport
Start cleaning out unnecessary Cry includes from DebugDraw gem
Fixes for AtomFont FFont.cpp 3d screen aligned text drawing.
Clean out no longer supported code for 3d text to render multiple strings for the same entity location
* Cleanup some unused or commented code
* Update with PR feedback from Nick Van Sickle