Commit Graph

222 Commits

Author SHA1 Message Date
Benjamin Jillich 7d5a7b47ac [LYN-3717] When pulling in an actor FBX, two entities are spawned & [ATOM-15258] Clicking and Dragging fbx file into viewport produces 2 entities (#1392)
* [LYN-3717] When pulling in an actor FBX, two entities are spawned & [ATOM-15258] Clicking and Dragging fbx file into viewport produces 2 entities
* Added another operation to the CanSpawnEntityForProduct that checks the other products and can veto the creation process.
* The model product will not create an entity in case there is already an actor exported, which prevents the issue reported by two different teams/users.
2021-06-22 14:12:42 +02:00
Chris Burel 6d0ef1cf57 Avoid reading from a destroyed variable (#1347)
This code iterates over the items in a vector, and if one case is met,
it mutates that same vector. This invalidates the object, as the place
where that object used to be has been moved.
2021-06-17 17:54:10 -07:00
lumberyard-employee-dm 7dabe8b6e9 Updated Several Engine Gem's CMakeLists.txt to add themselves as required Gems (#1262)
* Fixed organization of the AssetProcessor SourceAssetBrowser

Assets within the Engine Root were grouped under a '/' entry.
That has been fixed to use the relative path within the engine root for
those assets
Assets outside of the Engine Root, but on the same drive were using
absolute paths before. Now there are child entries that navigate up the
directory hierarchy to those asset locations

* Added ly_enable_gems call to Atom gems targets that are required

The DefaultLevel.prefab contains several Atom components, that require
the Atom RHI, RPI, Common_Feature, ShaderBuilder and AtomLyIntegration CommonFeatures
gems to be enabled in order to successfully process in the
AssetProcessor.

* Added ly_enable_gems call to make the Camera gem required in Tools,
Builders and Clients.

This is needed as the DefaultLevel.prefab contains an Editor Camera
Component

* Adding the ly_enable_gem call to make the Maestro gem required

CrySystem currently requires Maestro to be enabled in order to
initialize

* Added ly_enable_gems call to the SceneProcessing gem to make it required

The SceneCore and SceneData libraries that are part of the core engine
Code folder requires the SceneProcessing gem to be enabled in order to
invoke the InitializeDynamicModule hooks in DllMain.cpp in order to
initialize those libraries.

* Fixed bad argument in comment for Prefab CMakeLists.txt

* Fixed Assert in Asset Builders due to the Atom RPI Builder

The Atom RPI Builder was enabling the Asset Catalog for the ScriptAsset a second time

The Atom Feature Common EditorSystemCommonComponent.cpp which also loads
in the AssetBuilder is enabling the Asset Catalog for the ScriptAsset

Added BehaviorContext reflection to the OutputDeviceTransformType enum
to fix the BehaviorContext errors about reflecting a method that returns
such an enum

* Added TypeId output to the JsonDeserializer report message about missing
ClassData

Previously the report callback would indicate that the target type was
missing Serialization class data, but didn't indicate the TypeId of the
target type

* Added support to the ly_enable_gems function to be able to support
0 gems being enabled.

Updated the Install step for CMake to propagate any ly_enable_gems
within a CMakeLists.txt for a target into the generated CMakeLists.txt
that is made for each installed IMPORTED target

* Adding newline to the end of the Camera Gem CMakeLists.txt

* Fixing target TYPE parameter for actual Gem Modules to use the GEM_MODULE tag instead of MODULE

* Reverting change to the DESTINATION directory for the installed CMakeLists.txt to use the relative path to the installed directory

* Adding the Atom_Bootstrap gem as a required gem

The Client and GameLaunchers required the Atom_Bootstrap gem in order to create the NativeWindow
Added Atom_Feature_Common client module as a runtime dependency of the AtomLyIntegration CommonsFeature client module

* Fixed register.py --all-projects-path and --all-gems-path arguments to
NOT register projects or gems that are within a template folder
Fixed reading of old pre-1.0 o3de_manifest.json files where the
"engines" key was a json array

* Changed how the relative target source directory is calculated when that source directroy resides outside of the engine root.
The final dirname component is used with a unique SHA256 has to form a <dirname>-<8 char SHA256> folder for installing files into

* Adding newline to the end of Atom_Bootstrap CMakeLists.txt

* Moving ly_enable_gems variants for Tools and Builders inside of PAL_TRAIT_BUILD_HOST_TOOLS block

* Adding a comment to AWSCore.ResourceMappingTool target to indicate that it is not a GEM_MODULE.
Furthermore it cannot be loaded with the Gem system because the library is in a different directory the executable
2021-06-17 13:58:20 -05:00
AMZN-koppersr 6b08ab6e03 Merge branch 'stabilization/2106' into JsonSerialization/ArrayDefaultsFix 2021-06-17 09:32:43 -07:00
AMZN-koppersr 1b1a5a28f4 Using zero-initializer for defaults in the Json Serializer instead of explicit values 2021-06-16 17:26:14 -07:00
AMZN-koppersr ddc60041d3 Addressing PR feedback 2021-06-16 16:40:46 -07:00
AMZN-koppersr 780dd0df9f Container fixes for the Json Serialization
These changes fix the following:
- Containers treat new values as new objects and make sure they're initialized.
- Fixed sized containers behave slightly different and will initialize all values when a new fixed sized container is created.
- Loading any values to a container will now return PartialDefaults instead of defaults used as adding any value to a container no longer makes the container a default as the default is always an empty container.
- The previous doesn't apply to fixed sized containers as those containers are always considered to have the exact number of values they can hold.
2021-06-15 14:14:27 -07:00
AMZN-koppersr f00fa26e12 Separated initializing new and all objects in the Json Serialization
Introduced OperationFlags::InitializeNewInstance to the Json Serialization which allows custom json serializers to indicate that they need to set defaults only to new instances. Objects created to fill in a pointer are considered new objects and serializer can use the new ContinuationFlags::LoadAsNewInstance to also inform that the load is happening on a new object. Serializer that use the InitializeNewInstance flag know that a new object is begin initialized if they're called with an explicit default object.
2021-06-15 14:14:24 -07:00
AMZN-koppersr 08abc497f3 Fixed initialization of math types for Json Serialization
Several math types in AzCore deliberately don't initialize through a constructor. This set of changes make sure that they still get properly initialized in the Json Serialization instead having random values.
2021-06-15 14:14:16 -07:00
AMZN-koppersr 716e99a8a7 Reverted string change because it cause incorrect string sizes. 2021-06-15 14:14:08 -07:00
AMZN-koppersr a98355e000 Fix PODs not initializing in Json Serialization
When pointers are used new instances are created for pod types, which will have random values at that point. The Json Serialization did not set a value for these if they were explicitly set to defaults. This change adds initialization for explicit defaults in the bool, integer and double serializer plus unit tests to verify.
2021-06-15 14:14:04 -07:00
AMZN-koppersr 6f50207b06 Updated the unit tests for the Json Serialization array fix 2021-06-15 14:14:00 -07:00
Yuriy Toporovskyy 3c46a72672 Bug fix: handle the case where a container has only default elements 2021-06-15 14:13:56 -07:00
chcurran 9f7f6e84a4 Merge branch 'stabilization/2106' of https://github.com/aws-lumberyard/o3de into carlito/stabilization/2106 2021-06-15 12:10:10 -07:00
Mike Balfour ab3aa904f0 Fixed misc slice conversion bugs
* Fixed crash caused by nesting the same slice twice
If the same slice is nested at multiple levels in the same slice hierarchy, the second conversion would reregister the prefab and crash.  Now that case is detected and the slice isn't reconverted.

* Fixed json array patches where multiple elements are removed.
The patches now generate removals from back to front, instead of front to back, so that the indices remain valid as each patch is applied.
2021-06-15 14:00:47 -05:00
Alex Peterson ecded991b5 Display error when unable to start Python
Added AzFramework Application, logging, unit tests
2021-06-14 17:02:22 -07:00
chcurran 10081fefb9 Remove unwanted entries from node palette 2021-06-11 16:28:34 -07:00
greerdv 3895c93e04 avoid some divisions by zero in simd math types 2021-06-11 22:05:37 +01:00
AMZN-koppersr c46c82079c Fixed string format bug in JsonRegistrationContext 2021-06-09 18:35:04 -07:00
AMZN-koppersr ccbb0f45f5 Merge branch 'stabilization/2106' into JsonSerialization/UnsupportedWarnings 2021-06-09 12:12:39 -07:00
AMZN-koppersr 6063e3a391 Simplified Json Serializer registration code
Updated the Json Serializer registeration code in the RegistrationContext.cpp to use try_emplace instead of find + end check + insert.
2021-06-09 11:07:28 -07:00
srikappa-amzn 20dc47e6d0 Merge pull request #1198 from aws-lumberyard-dev/Prefab/RemoveFileSizeLimits
Remove file size limits when loading prefabs and prefab-based-levels
2021-06-09 10:05:45 -07:00
srikappa b23c95cab3 Removed the new added flavor of ReadFile and reused existing one 2021-06-08 17:58:59 -07:00
AMZN-koppersr dba1832821 Improved reporting on unsupported types by the Json Serialization
The Json Serialization currently doesn't support AZStd::any, AZStd::variant and AZStd::optional due to various JSON formatting concerns. This wasn't properly reported resulting in confusion about whether the missing functionality is intentional or a bug. This change makes this explicit with an error message.
As this solution uses a custom json serializer to report the issue, an option was added so it's possible to overwrite a serializer for a specific type.
This doesn't mean that the three listed types will never be supported. If/when a suitable format is found an implementation will be added.
2021-06-08 17:53:26 -07:00
srikappa 9dec723e33 Remove file size limits when loading prefabs and prefab-based-levels 2021-06-08 17:28:23 -07:00
chcurran 8cb6ef0721 Fix tmeplate arg names 2021-06-08 16:39:36 -07:00
chcurran a766e3af5c Fixes for internal if-branch node parser bug (LYN-4347) and exposing properties for AZStd::tuple (LYN-3910) 2021-06-08 13:54:25 -07:00
Tom Hulton-Harrop cf8a6761bf Formatting-only change - Update Manipulator and Viewport AzToolsFramework files (#1143)
* 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
2021-06-07 14:50:49 +01:00
AMZN-koppersr febf53671e Addressed PR feedback. 2021-06-04 11:09:44 -07:00
AMZN-koppersr ce7b81e2e7 Merge branch 'main' into SpawnableEntityIdMapping 2021-06-04 10:11:47 -07:00
lumberyard-employee-dm 4a1d713227 Fix recursive attempts to open the log file in the GameLauncher (#1114)
* Fix recursive attempts to open the log file in the GameLauncher

The AzFramework Application has been updated to default the @user@ and
@log@ aliases to the <engine-root>/user and <engine-root>/user/log
folder respectively if a project isn't set.

Fixed the SystemFile class to support negative offsets if Seek() as per
standard seek function such as fseek

Updated the CrySystem CLog class to use SystemFile instead of FileIOBase
to avoid any asserts that would cause CLog::OpenFile to be recursively
called infinitely

* Removing unused Force Closed variable

* AZ::IO::SystemFile build fixes for Unix platforms. Added a copy constructor for LUAEditorContextInterface.h to fix the LuaEditor build

* Adding missing includes to the WindowsAPI and Android SystemFile headers
2021-06-03 22:36:34 -05: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
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 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
AMZN-koppersr 1e7ac60949 Reintroduced spawning multiple instances of the same entity
The following was changed:
- The remapper in AZ::IdUtils now has an additional argument to tell it what to do when it encounters the same source entity id. The original behavior of ignoring the new entity id and returning the first occurrence is the default. The alternative behavior is to store the last known entity id and return that instead.
- Split the optional arguments for SpawnAllEntities and SpawnEntities.
- SpawnEntities now has an option to continue with the entity mapping from a previous spawn call or to start with a fresh mapping. The latter is the default as the former will come at a performance cost since the mapping table has to be reconstructed.
- Entities spawned using SpawnEntities and ReloadEntities now also get the correct entity mapping applied.
- Added several new unit tests to cover most of the new functionality.
- Fixed some places where the older API version was still called.
2021-06-03 10:56:34 -07: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
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
greerdv 16c8ae5a3a refactor vector scale on Transform to float scale 2021-05-28 19:13:56 +01: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
greerdv 7f8bd83d4a remove SetScale and CreateScale vector scale functions from Transform 2021-05-28 17:54:30 +01:00
greerdv 0577c0f0dd update transform serialization to handle migration to uniform scale 2021-05-28 15:24:02 +01:00
greerdv d73566565e remove most vector scale functions from transform bus 2021-05-28 14:18:26 +01:00
greerdv e1b9c4f22e remove some vector scale functions from Transform 2021-05-28 13:44:12 +01:00
pappeste 8b9f5230f6 Merge branch 'main' into ly-as-sdk/LYN-2948 2021-05-28 00:16:26 -07:00
phistere b73bc09ce7 Fixes a name comparison issue during module load
A name like Camera.dll was matching against
Atom_Component_DebugCamera.dll so it thought the module was already seen
and wouldn't add it to the list of dynamic modules to load.
2021-05-28 01:20:24 -05:00
Terry Michaels b600dd9b71 Fixed issues with mac build caused by a double define of "MAC" (#996)
* fixed missed reference to name change

* Fixed MAC double define issue, changed to MAC_ID
2021-05-27 12:49:16 -05:00
pappeste 01933f45b1 Merge branch 'main' into ly-as-sdk/LYN-2948
# Conflicts:
#	Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/gem.json
2021-05-27 10:39:37 -07:00
pappeste f1b688f435 Merge branch 'main' into ly-as-sdk/LYN-2948
# Conflicts:
#	CMakeLists.txt
#	Code/Tools/ProjectManager/Source/GemCatalog/GemInfo.h
#	Gems/AtomLyIntegration/AtomViewportDisplayInfo/gem.json
#	cmake/LYWrappers.cmake
#	cmake/SettingsRegistry.cmake
#	scripts/o3de/tests/unit_test_current_project.py
2021-05-27 10:29:19 -07:00
greerdv 34c59a81b8 update rigid body to use non-deprecated function and remove many deprecated transform bus functions 2021-05-27 10:51:36 +01:00