disable saving procedural prefabs in the Editor since the templates are backed by asset files that will change outside the Editor
Signed-off-by: jackalbe <23512001+jackalbe@users.noreply.github.com>
* Move the RootAliasPath class definition to the Prefab EOS. Introduce utility functions to enable using the path as an instance handler in UI.
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Refactor the PrefabFocusHandler to use the utility functions that were introduced to the Prefab EOS. Remove the m_instanceFocusHierarchy from the Focus Handler, and simplify calls for performance.
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Minor adjustments after PR discussion
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Silly mistake in function simplification. Turns out == and != are different.
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Fixed doxygen comments
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Add numeric cast when storing result of AZStd::distance to int.
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Restore additional checks in FocusOnparentOfFocusedPrefab that got removed during merge.
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* debug information for lua script error
Signed-off-by: carlitosan <82187351+carlitosan@users.noreply.github.com>
* actual fix for script properties not being loaded in play-in-editor unless modified or editor restarted
Signed-off-by: carlitosan <82187351+carlitosan@users.noreply.github.com>
* remove debugging artifacts
Signed-off-by: carlitosan <82187351+carlitosan@users.noreply.github.com>
* Add function to Prefab Instances allowing to get a reference to a nested instance by alias.
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Refactor the Prefab Focus Handler to use RootAliasPaths to store the reference to the currently focused prefab instance instead of the previous method (entityId of the prefab container).
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Use existing FindNestedInstance method instead of adding new one.
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Minor fixes to style and comments
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Removing indexing in GetInstanceReferenceFromRootAliasPath, turn variables into constants where possible.
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Modified the Prefab Focus test fixture to ensure the entity hierarchy is generated under the Prefab EOS, allowing tests to work with the new implementation of the focus mode handler.
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Ensure RootAliasPath is iterated by reference in GetInstanceReferenceFromRootAliasPath
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Update sqlite package for windows
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Add assert to make sure sqlite header and lib version match
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Update linux
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Update Builting Package / Mac for Sqlite 3.37.2-rev1
Signed-off-by: spham <82231385+spham-amzn@users.noreply.github.com>
* Re-add newline at end of file
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Inclusivity: change sqlite_master to sqlite_schema alias
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
Co-authored-by: spham <82231385+spham-amzn@users.noreply.github.com>
* fix incorrect icon rendering
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* add redundant parens
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* add tests for icon display fixes
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* update references to EditorVisibleEntityDataCache to EditorVisibleEntityDataCacheInterface
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* updates following review feedback and remaining updates for EditorVisibleEntityDataCacheInterface
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
These calls didn't have any practical effect and created confusion, so they were removed.
Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
- Deduplicated code for StoreInstanceInPrefabDom.
- Used QueueLoad to load an asset instead of starting a load by getting a new asset instance.
- Extended the error information when failing to load an asset.
- RefreshPrefabDom no longer returns a boolean as it wasn't used.
Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
- Fix gcc error caused by implicit conversion of Qt::ByteArray to const char*
- Fix Linker errors to QtTest in AtomToolsFramework.Tests and ScriptCanvasDeveloper.Editor
Signed-off-by: Steve Pham <82231385+spham-amzn@users.noreply.github.com>
* Add icon support for the Breadcrumbs UI Component, use it in the prefab focus mode breadcrumb.
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Simplified iconAt logic
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* small bugfix
Signed-off-by: rhhong <rhhong@amazon.com>
* ActorInstanceId default to -1 when no %lastresult matches
Signed-off-by: rhhong <rhhong@amazon.com>
* CR feedback - wrap function to get the first available editor actor instance.
Signed-off-by: rhhong <rhhong@amazon.com>
* Remove mcore inline
Signed-off-by: rhhong <rhhong@amazon.com>
* Fixed the bug that delete an instance from actor manager crashes the editor.
Signed-off-by: rhhong <rhhong@amazon.com>
* Move the manipulator controller.
Signed-off-by: rhhong <rhhong@amazon.com>
* Add manipulator icon
Signed-off-by: rhhong <rhhong@amazon.com>
* Add manipulators
Signed-off-by: rhhong <rhhong@amazon.com>
* move more option to renderOption, and loading all going through the plugin
Signed-off-by: rhhong <rhhong@amazon.com>
* code cleanup
Signed-off-by: rhhong <rhhong@amazon.com>
* code cleanup
Signed-off-by: rhhong <rhhong@amazon.com>
* more code cleanup
Signed-off-by: rhhong <rhhong@amazon.com>
* CR FEEDBACK
Signed-off-by: rhhong <rhhong@amazon.com>
* Fix profile_nounity build
Signed-off-by: rhhong <rhhong@amazon.com>
* CR feedback - move more code to azToolsframework and share them between animation editor and editorlib
Signed-off-by: rhhong <rhhong@amazon.com>
* Using the MouseViewportRequests in viewportMessage and remove the custom bus
Signed-off-by: rhhong <rhhong@amazon.com>
* Update sqlite package for windows
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Add assert to make sure sqlite header and lib version match
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Update linux
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Update Builting Package / Mac for Sqlite 3.37.2-rev1
Signed-off-by: spham <82231385+spham-amzn@users.noreply.github.com>
* Re-add newline at end of file
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
Co-authored-by: spham <82231385+spham-amzn@users.noreply.github.com>
At the root the problem is that some editor-only components store information to construct an asset for the runtime component but not the asset itself. This behavior caused the assets to not be correctly detected in two places.
The first place was due to the recent move to PrefDocument to avoid repeated (de)serialization of the PrefabDOM when converting to spawnables. Due to the caching the change from editor-only component to runtime component didn't record the new asset. This has been fixed by allowing assets to be collected on store as well and to check the cache validity when retrieving the list of referenced assets.
The second problem was with loading assets from the in-memory spawnable that's created for Play-In-Editor. Because the newly created assets wouldn't be loaded they need to be explicitly loaded. The original code used the collected list of assets from the PrefabDocument and checked if they were loaded, depending on hot-reloading to trigger a reload on the actual asset. This turned out to not be universally applicable, so instead the Serialize Context is now used to find all the assets that aren't loaded yet and queues a load. This is a bit more expensive to do, but to offset this cost checks are done to only do any operations on assets that haven't been loaded yet which reduces the number of calls to the Asset Manager.
Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
* initial fix for geometry being intersected when not visible
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* add tests for shape intersection with helpers enabled/disabled
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* update moved cmake file after merge
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* updates following PR feedback
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* WIP
Signed-off-by: John Jones-Steele <82226755+jjjoness@users.noreply.github.com>
* Commit before merging
Signed-off-by: John Jones-Steele <82226755+jjjoness@users.noreply.github.com>
* Added new pngs
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 CRC errors
Signed-off-by: John Jones-Steele <82226755+jjjoness@users.noreply.github.com>
* Adding partial implementation of C++20 concepts and range functions for AZStd::span
The new concepts to discovered existing issues with the PathIterator and deque::iterator classes
PathIterator wasn't properly an input_iterator and therefore the Path classes weren't a range due to an incorrect const_iterator alias
The deque::iterator classes was missing the operator+ friend function that accepted a (ptrdiff_t, deque::iterator) to fulfill the random_access_iterator concepts
The AZStd implementations of (uninitialized_)copy(_n), (uninitialized_)move(_n) and (uninitialized_)file(_n) have been optimized to use memcpy and memset based on fulfilling the contiguous_iterator concept
Fixed invalid AZStd::vector inserts in FrameGraphExecuter.cpp and SliceditorEntityOwnershipService.cpp
The code was trying to copy the underlying addresses for vector<unique_ptr> to a vector<raw pointer> using insert, which it was doing by using memcpy.
relates to #6749
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fixed the `fixed_vector` emplace function to not move initialized
elements using uninitialized_move.
This was causing initialized elements of the fixed_vector to be
overwritten with the element at the emplace position.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fixed clang warnings about variables that are set, but never read
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updated the `az_has_builtin_is_constant_evaluated` define to not have
"()" as is not a macro.
This helps prevent users from using `az_has_builtin_is_constant_evaluated`
define in a situation where they want to know if the function is being
evaluated in a compile time context.
In that case they need to use the `az_builtin_is_constant_evaluated()`
macro (which of course looks quite similiar) but does not have the word
"has" in it..
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updated the AZStd span class to be C++20 compliant.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Changed phrase "DoesNotCompiles" to be more grammatically correct.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Added more unit test for AZStd span
Fixed an the the return type of the subspan template overload to account
for the source span having a dynamic extent.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Removed unused variable from span unit test.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fixes to the viewport top toolbar.
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Additional checks to prevent issues if widgets aren't set up correctly.
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Add asserts to catch UI changes that would break this class.
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Add a ray cast API to the terrain system, implement it, and use it so entities can be placed on top of terrain.
Still to do:
- Unit tests
- Profiling/benchmarks
- Optimization (if needed, may not be now after updating to use the iterative approach, but one option could be to use SIMD to ray cast against both triangles at once)
Signed-off-by: bosnichd <bosnichd@amazon.com>
* Fix typos.
Signed-off-by: bosnichd <bosnichd@amazon.com>
* Added a FindNearestIntersectionIterative to use in place of the first-pass FindnearestIntersectionRecursive attempt.
Signed-off-by: bosnichd <bosnichd@amazon.com>
* Remove some functions that are no longer being used.
Signed-off-by: bosnichd <bosnichd@amazon.com>
* Remove a unicode character from a comment to fix the validation build.
Signed-off-by: bosnichd <bosnichd@amazon.com>
* Remove another unicode character from a comment to fix the validation build.
Signed-off-by: bosnichd <bosnichd@amazon.com>
* Update to bail out as soon as t > 1.0f
Signed-off-by: bosnichd <bosnichd@amazon.com>
* Ensure to fire OnEditorEntityCreated notification in SandboxIntegrationManager::CreateNewEntityAtPosition
Signed-off-by: chiyenteng <82238204+chiyenteng@users.noreply.github.com>
* Ensure to fire OnEditorEntityCreated notification in SandboxIntegrationManager::CreateNewEntityAtPosition
Signed-off-by: chiyenteng <82238204+chiyenteng@users.noreply.github.com>
* convert test AreaNodes_DependentComponentsAdded to use prefab system
Signed-off-by: chiyenteng <82238204+chiyenteng@users.noreply.github.com>
* Prevent SetupEditorEntity being called twice
Signed-off-by: chiyenteng <82238204+chiyenteng@users.noreply.github.com>
* Refactor the sanitation of the selection for prefab operations to prevent read-only entities from being deleted or duplicated.
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Fix comment.
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
Removes aztoolsframework_win_files.cmake (aztoolsframework_windows_files.cmake is the actual used one)
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>