Commit Graph

729 Commits

Author SHA1 Message Date
cgalvan deb3c5e74a [LYN-2446] Implemented support for duplicating instances. (#1097)
* [LYN-2446] Implemented support for duplicating instances.

* [LYN-2446] Addressed PR feedback.

* [LYN-2446] Addressed additional PR feedback.
2021-06-03 16:20:59 -07:00
carlitosan 96572888a9 Merge pull request #1125 from aws-lumberyard-dev/carlitosan-beta-fixes
Demo support updates and fixes to be integrated into main
2021-06-03 15:24:52 -07:00
Eric Phister 3634277317 Project dll is not loaded by the AP when opened from the launcher (#1123)
* Fixes locating the project dll when using SDK

SDK engine usage has project dll in the project build path, but
searching for module filepaths for loading would have a passing
SystemFile::Exists check but no full filepath was amended to the module.
This causes the module to fail to load.

* Fix locating project module for UnixLike platforms

Fixes the issue with project-centric workflows running GameLauncher, and
it opens AP which can't find the project dynamic module.  From AP's
perspective, the project module is not in the executable directory,
which is in engine bin.  The SystemFile::Exists check is true on the
file because it uses the 'cwd'.  In that situation, an absolute path
must be obtained for the module to be loaded.

* Add missing header to fix UnixLike builds

* Applies a suggested change from PR

Use operator-> on the AZStd::optional

* Add semicolon to a class macro line

Prevent auto formatting indenting the following line.
2021-06-03 16:15:46 -05:00
Danilo Aimini fda28bb7b2 LYN-1818 | [USE CASE] Reparenting between different prefab instances by drag/drop in the Outliner (#1088)
* 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.
2021-06-03 14:02:40 -07:00
Mike Balfour d90a3d46a7 Support for nested slice conversions (#1121)
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.
2021-06-03 15:59:45 -05:00
chcurran 46afeef77b Merge branch 'main' into carlitosan-beta-fixes 2021-06-03 13:14:33 -07:00
chcurran 0a9d6f5f0f Bug fixes and improvements brought over from demo work.
* Generic Multi Function Call ability added to extensible nodes
* Code gen improvements, including allowing for more manually codewritten extension of codegen facilities
* CVAR to disable automatic update of deprecated node
* Fixed variable sorting error that can apply to parser/runtime added variables
* Made Edit/SerializeContext ClassBuilder public, as it was needlessly private
* Fixed dangerous Datum::GetValueAddress(), it now checks for an empty storage AZSTd::any, as does Datum::Empty()
2021-06-03 13:13:22 -07:00
Esteban Papp 5d7aae9bd8 SPEC-2513 Fixes to enable w4459 (#1107)
* fixing w4459

* Fixes for nounity

* putting OLD_APARAM_USER in a common place to avoid duplicated declarations
2021-06-03 11:12:54 -07:00
rgba16f 54fdca353b Fix editor axis gizmo text rendering above gizmo
Add AzToolsFramework utility function to query the display scale for a viewport.
Use new function to fix the text location on the axis gizmo.
2021-06-03 12:54:14 -05:00
Esteban Papp 29c71b4e53 SPEC-2513 Fixes to enable w4701 (#1105)
* Some fixes

* more fixes

* fixes for debug
2021-06-03 09:30:33 -07:00
AMZN-puvvadar e340f3ca56 Merge pull request #1102 from aws-lumberyard-dev/MultiplayerPipeline
Fixed ctrl+g port number
2021-06-03 08:50:29 -07:00
pereslav e445c64321 Fixed TimedThread bled %d ms logging to not spam the console 2021-06-03 01:21:27 +01:00
srikappa 574563adaf Merge branch 'main' into DetachPrefab 2021-06-02 15:09:40 -07:00
Danilo Aimini 8a7f156e2c LYN-4133 | Prefab Container Transform stores non-default values to template on Create Prefab (#1038)
* 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
2021-06-02 14:45:43 -07:00
Hasareej 274e1972f3 Adding a shortcut to hide clusters. (#1071)
Adding the shortcut "U" to hide the TransformModeSelection & SpaceSelection clusters from the viewport.
2021-06-02 15:54:30 +01:00
srikappa 9fd690f004 Changed a function parameter name 2021-06-01 17:03:50 -07:00
Vincent Liu dfd63737c3 [SPEC-6720] Update session common interfaces (#956) 2021-06-01 15:59:43 -07:00
Alex Peterson afe20906db Add Project Manager File menu options to Editor 2021-06-01 15:30:14 -07:00
AMZN-koppersr b32507bd4b Merge pull request #973 from aws-lumberyard-dev/SpawnablePriorityQueue
Spawnable priority queue
2021-06-01 14:09:24 -07:00
Nicholas Van Sickle 087677b326 Fix several viewport issues (#1045)
* Fix some FOV calculation viewport issues:
-Avoid calculating FOV if we've got an invalid viewport
-Don't override game mode FOV, let the active camera components manage it instead

* Fix viewport font positioning

This updates code in a few places to respect an API change/fix made to AtomFont - also switched the default value of m_virtual800x600ScreenSize to false as it's really behavior you want to opt into

* Don't activate CameraComponentController when in the Editor / not in game mode
2021-06-01 12:20:15 -07:00
srikappa a9d030b454 Merge branch 'main' into DetachPrefab 2021-06-01 11:12:52 -07:00
srikappa e8e9096dda Changed a function name and removed a comment 2021-06-01 11:11:13 -07:00
AMZN-koppersr c0dade8883 Merge branch 'main' into SpawnablePriorityQueue 2021-06-01 09:57:27 -07:00
Mike Balfour 895bbafa9e Fixed CreatePrefab to use correct absolute path (#1044)
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.
2021-06-01 10:50:10 -05:00
Tom Hulton-Harrop 99ba89a02b Add console function to print entity name from entity id (#1021)
* Add console function to print entity name from entity id

* update name of console function an improve description
2021-06-01 09:37:02 +01:00
Tom Hulton-Harrop 3947dcf213 Add some extra cvars to control orbit point appearance and remove unused ones (#1032) 2021-06-01 09:36:00 +01:00
michabr aedc270304 Fix path not showing up in asset property control (#1037) 2021-05-28 13:40:08 -07:00
greerdv 2c36d6a19a Merge pull request #1039 from aws-lumberyard-dev/transform-float-scale-3
refactor vector scale in Transform to float scale
2021-05-28 21:20:03 +01:00
sconel 57b961c113 Merge pull request #997 from aws-lumberyard-dev/Spawnable/ScriptCanvas/Integration
Add dynamic spawn node to Script Canvas
2021-05-28 13:09:25 -07:00
Terry Michaels e79c65d454 Clear dirty flag after doing an initial save or save as in Asset Editor (#1033) 2021-05-28 14:28:36 -05:00
Aaron Ruiz Mora 00e860f326 Physics material system for spectra launch
- Invalidate 'Physics Materials From Mesh' boolean from collider component
- Removed material library from material selector. Default material library will always be used instead.
- Marking failing automated test as xfail
- Added default material to physics configuration.
- Moved material library asset from physx configuration to physics configuration, as it doesn't need to be physx specific.
- Refactor physics material system having into account that there is only one material library in the project.
- Renaming code from DefaultMaterialLibrary to MaterialLibrary.
- All queries about physics materials unified under PhysicsMaterialRequests bus.
- PhysXSystem only manages the material library asset.
- Saving and reloading the same physics material asset with different content didn't trigger a events that the material library has changed.
- Changing Physics Material Request interface to use shared_ptr instead of weak_ptr to be simpler to handle the returned materials and having a more consistent code.
- Refactored Material Manager to improve its implementation. Still following the same approach of "creating materials on the fly as they are requested", but now it's doing it consistently across the interface, with private helpers functions FindOrCreateMaterial that simplify vastly the implementation.
- Material Manager now listens to change event of material library asset and default material configuration so it updates its materials accordingly.
- Complete Material move constructor and operator.
2021-05-28 20:16:25 +01:00
chiyteng da0ab84f1c Add helper function to update entity aliases in link patch 2021-05-28 11:42:36 -07:00
chiyteng de4cfdb5d7 Add helper function to update entity aliases in link patch 2021-05-28 11:33:58 -07:00
Esteban Papp ff9a052ce6 Merge pull request #1011 from aws-lumberyard-dev/ly-as-sdk/LYN-2948
Integration of the LY as an SDK work
2021-05-28 11:30:13 -07:00
greerdv 34abf7376e Merge branch 'main' into transform-float-scale-3 2021-05-28 19:14:45 +01:00
greerdv 16c8ae5a3a refactor vector scale on Transform to float scale 2021-05-28 19:13:56 +01:00
chiyteng 984db9c1b4 Remove selection command and update undo batch in DetachPrefab function 2021-05-28 10:56:03 -07:00
Vincent Liu eee7bb219a [LYN-3996] Update core editor menu (#1030) 2021-05-28 10:50:23 -07:00
sconel 0a32951e7e Merge branch 'main' of https://github.com/aws-lumberyard/o3de into Spawnable/ScriptCanvas/Integration 2021-05-28 10:48:44 -07:00
Terry Michaels e73541c751 Allow selected click to edit entity names in the outliner (#1028) 2021-05-28 12:23:49 -05:00
greerdv 7f8bd83d4a remove SetScale and CreateScale vector scale functions from Transform 2021-05-28 17:54:30 +01:00
greerdv 55d3d18c9b update transform component to remove vector scale transform function 2021-05-28 16:44:09 +01:00
greerdv faa2d4ea6a fix initialization of uniform scale in editor transform component 2021-05-28 16:36:48 +01:00
pappeste eece07efd3 Merge branch 'main' into ly-as-sdk/LYN-2948 2021-05-28 08:29:29 -07:00
greerdv 8d0051bae9 update editor transform component to uniform scale 2021-05-28 16:25:58 +01:00
greerdv 4442ca5485 remove registration of custom transform scale UI handler 2021-05-28 16:16:21 +01:00
greerdv 1a0152c063 remove custom transform scale UI handler 2021-05-28 16:06:05 +01:00
greerdv fc0a720468 add version converter for editor transform to handle migration to uniform scale 2021-05-28 16:01:03 +01:00
pereslav 090234f1f0 Merge branch 'main' into MultiplayerPipeline 2021-05-28 16:00:09 +01:00
Mike Balfour 96905a26d7 Add support for AP-compliant relative paths (#998)
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.
2021-05-28 09:57:17 -05:00