Commit Graph

70 Commits

Author SHA1 Message Date
yuriy0 12c7391bd7 Bug fix: correct RTTI for AttributeInvocable (#1004)
* Bug fix: correct RTTI for AttributeInvocable

* Allow test case to crash if RTTI is wrong

* Revert "Allow test case to crash if RTTI is wrong"

Based on PR feedback, this change adds no value to the test and is confusing.

This reverts commit 6c36065c3759d857cc16ab011d09167261181141.

* Remove perhaps confusing comments and add a more to the point comment

Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
2021-06-14 17:29:19 -05:00
AMZN-koppersr c46c82079c Fixed string format bug in JsonRegistrationContext 2021-06-09 18:35:04 -07:00
AMZN-koppersr e3fe4705f6 Post merge and Linux fixes. 2021-06-09 13:44:18 -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
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
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
greerdv 16c8ae5a3a refactor vector scale on Transform to float scale 2021-05-28 19:13:56 +01:00
greerdv 0577c0f0dd update transform serialization to handle migration to uniform scale 2021-05-28 15:24:02 +01:00
Terry Michaels 9b1be43367 Renamed osx_gl to mac and es3 to android for cache folders (#949) 2021-05-26 19:17:17 -05:00
pruiksma e903915867 Merge branch 'main' into pruiksma/halton_update 2021-05-26 13:05:50 -05:00
pruiksma 1924937150 Fixes from PR review 2021-05-26 13:05:07 -05:00
greerdv 1c7d5e5615 Merge branch 'main' into transform-float-scale-continued 2021-05-26 10:27:18 +01:00
pruiksma ab84a43a83 Update to HaltonSequence to make it easier to fill your own custom structures with halton sequences. 2021-05-25 21:34:53 -05:00
Chris Burel 03ec6465b5 Support deserializing non-reflected enums (#815)
The serialize context allows users to reflect fields that are enums to
a class without reflecting the enum type itself with the EnumBuilder. In
this case, the serialize context stores the mapping of the enum's typeid
to the underlying type's typeid. When asking for the class data for the
enum typeid, the underlying type's class data is returned. This was
throwing off the json serializer, which would then see that the type was
"unsigned int" instead of an enum, and attempt to load the unsigned int
value. The unsigned int deserializer would then complain, because the
incoming typeid was the typeid of the enum, and not equal to the typeid
of unsigned int.

This change adds support for detecting the non-reflected enum, and
loading it properly.
2021-05-25 18:49:06 -07:00
greerdv bdf9ac31fb update to use uniform scale calls to Transform 2021-05-25 22:31:41 +01:00
greerdv 92311ddf0d more tidying up 2021-05-25 15:43:04 +01:00
greerdv 5ef515813e fix another test 2021-05-24 23:01:02 +01:00
greerdv adb37b4a76 fix physx editor tests 2021-05-24 21:38:53 +01:00
greerdv 76202e4000 fix azcore tests 2021-05-24 14:39:18 +01:00
greerdv 945f55378e merge from main 2021-05-24 11:27:43 +01:00
pruiksma 35ef2004a6 Halton sequence added to AzCore/Math/Random.h with unit tests. This work is in support of ATOM-13988 for generating sub-pixel camera offsets for TAA jitter. 2021-05-21 15:00:39 -05:00
greerdv 7def4741cd merge from main 2021-05-19 12:14:25 +01:00
lumberyard-employee-dm 0b35d27833 Added support to the AZ Console to be notified when the Settings Registry modifies a particular path (#691)
* Updated the SettingsRegistry CommandLineArgumentSettings delimiter function to no longer work on a character basis, but on a line basis.
This provides more control by the user to determine how to the argument into the JSON pointer and JSON value parts

Added function o the Settings Registry to specify the JSON Apply Patch settings to use when performing a JSON Patch/Merge Patch operation

Fixed the SettingsRegistryImpl::CommandLineArgument function to properly set unsigned 64-bit values into the SettingsRegistry by checking the ERRNO of strtoll and strtoull

* Updated the reporting of the JSON Patching operations to supply a JSON pointer of the patched element to the Issue Reporting callback when the patch operation is successful. This allows using the Issue Reporting callback as a notification system when field is updated during a patch operation

* Added support to the AZ Console to be able to run Console Commands based
on notifications from the Settings Registry when a field underneath the
"/Amazon/AzCore/Runtime/ConsoleCommands" object is modified.

This takes advantage of the Settings Registry RegisterNotifier API to
determine when a field is modified as well as the JSON Merger
JsonApplyPatchSettings Issue Reporting Callback to determine when a
field is modified or updated.

As a Side Note also fixed an issue with the AZ Console incorrectly
converting unsigned 64-bit types using strtoll

* Making the Console constructor which accepts an AZ::SettingsRegistryInterface explicit

* Updating string format calls which use *.s for formatting string_views, to use the AZ_STRING_ARG macro

* Addressed typos in comments around the SettingsRegistry AZ Console functions

* Fixed the SettingsRegistryTest that look for an empty value

* clang 6.0.0 constexpr build fix. For some reason clang cannot make a constexpr AZStd::string_view out of a constexpr AZStd::fixed_string despite there being a valid constexpr operator AZStd::string_view

* Mac build fix

* SettingsRegistryTest.MergeSettingsFolder_ConflictingSpecializations_ReportsErrorAndReturnsFalse test fix on Mac

* Updated the LoadSettingsFile test to validate running a console with 0 arguments

Replace the static_cast in the ConsoleTypeHelpers.inl code to convert a str to long long with an aznumeric_cast

* Added printf logging to the ConsoleCommandKeyNotificationHandler to determine if the console commands are being performed on the Jenkins Linux node

* Fixed Dangling string_view reference in the ConsoleCommandKeyNotificationHandler that was causing command execution from a file to fail.

Renamed the second TestFreeFunc function in the ConsoleTests.cpp to validate thath the first TestFreeFunc function is being tested

* Updated the Component Application AZ Console to use the SettingsRegistry as the backend when loading config and Settings Rgistry json files
2021-05-15 16:16:49 -05:00
Mike Balfour 0ae123eae6 Fix AssetContainer behavior with immediate load errors
The AssetContainer was getting "stuck" in the case that it tried to load a missing asset that was already registered with the AssetManager as missing. This fixes the bug, as well as adding a unit test for the specific condition.
2021-05-13 16:08:47 -05:00
mbalfour 7866178f3e Fix AssetContainer behavior with immediate load errors
The AssetContainer was getting "stuck" in the case that it tried to load a missing asset that was already registered with the AssetManager as missing.  This fixes the bug, as well as adding a unit test for the specific condition.
2021-05-13 14:10:45 -05:00
sharmajs-amzn 7f5962d1ba disable AssetJobsFloodTest.ContainerCoreTest_BasicDependencyManagement_Success test (#703) 2021-05-11 15:23:43 -07:00
sconel 2e32b2ee57 Merge pull request #671 from aws-lumberyard-dev/Prefabs/AssetPreload
Asset Preload fix for json serialization and prefab game mode
2021-05-11 09:35:06 -07:00
sconel 12fb07c3e3 Fix for failing AssetJsonSerializer conformity tests 2021-05-10 18:56:29 -07:00
karlberg 1df2fe1d48 Merging latest origin 2021-05-07 16:28:11 -07:00
karlberg 05a39a4412 Fix several build failures 2021-05-07 09:54:49 -07:00
jackalbe 347073cbcd {LYN-2257} Helios - Add Matrix math type for JSON Serialization system (#561)
* {LYN-2257} Helios - Add Matrix math type to the JSON Serialization system

* Helios/Systems - Add Matrix math type to the JSON Serialization system
* supports both YPR+scale+translation and array of values
* supports Matrix3x3, Matrix3x4, Matrix4x4

Jira: https://jira.agscollab.com/browse/LYN-2257
Tests: Added Serialization/Json/MathMatrixSerializerTests.cpp

* clang compile fixes

* removed typename

* fixing both tests and some default conformity impls

* stablized the comformity test values; rotations drift too much
2021-05-07 09:31:48 -05:00
karlberg c21b4a577d Merge remote-tracking branch 'origin' into MultiplayerComponents 2021-05-06 19:40:09 -07:00
jonbeer bf38935e85 Updating conformity tests 2021-05-06 14:49:44 -07:00
karlberg 751d13dd7b Merge remote-tracking branch 'origin' into MultiplayerComponents 2021-05-05 20:07:49 -07:00
AMZN-koppersr 4661da23bb Cleaned up the flags in the BaseJsonSerializer.h 2021-05-05 17:51:22 -07:00
AMZN-koppersr ec52e51476 Additional unit tests for the Json Serialization to make sure custom json serializer work if they're the first used through the higher Load/Store calls. 2021-05-05 17:22:57 -07:00
AMZN-koppersr 2d4a17a2fb Merge branch 'main' into JsonSerializationPointerFix 2021-05-04 13:53:03 -07:00
AMZN-koppersr afcbe4e02b Small updates based on PR feedback. 2021-05-04 13:51:08 -07:00
Aaron Ruiz Mora f770e4aa7a Unifying operators in Matrix3x3, Matrix3x4 and Matrix4x4
- Add operators +, -, * and / too all matrix classes
- Add RetrieveScaleSq and GetReciprocalScaled to all matrix classes
- Add unit tests to all matrix classes
- Fix a bug that causes release configuration not to compile.
2021-05-04 19:12:01 +01:00
AMZN-koppersr 11b79f567a Smart and raw pointer support in Json Serialization now behave similarly.
The behavior of smart pointers was not updated after the changes to raw pointers, in particular with how default JSON Objects were handled. They both now treat an empty JSON Object (a.k.a. the id for default instances) as meaning to create a default instance on the pointer even if the default is a nullptr. To have a nullptr a JSON Null has to be explicitly written.
2021-05-04 11:10:46 -07:00
Mike Balfour 31746705eb Merge pull request #541 from aws-lumberyard-dev/mbalfour/lyn-3464
[LYN-3464] Vegetation unit tests intermittently failed due to AssetManager bug
2021-05-04 11:50:49 -05:00
mbalfour 53a6e5ac6b Addressed feedback. 2021-05-04 10:08:59 -05:00
mbalfour 5df82caef6 [LYN-3464] Vegetation unit tests intermittently failed due to an AssetManager bug. Inside the AssetContainer, if the root asset finished loading during the container initialization, the CheckReady() call at the end of initialization would detect the loaded asset, but would skip sending out notifications because the initialized flag wasn't set yet. This would lead to an extra asset reference remaining in the AssetManager itself, would would then cause errors when the asset handler for that asset got removed.
By setting the initialization flag before the CheckReady() call, the notifications get sent correctly, and no extra asset references remain.  This checkin also includes a unit test for the AssetManager that specifically forces this condition to happen and validates that it works correctly.
2021-05-04 09:04:18 -05:00
Aaron Ruiz Mora 70bd3ea0ff Performance pass to Cloth CPU Skinning
- Added operator+(Matrix3x4), operator*(float), RetrieveScaleSq and GetReciprocalScaled to Matrix3x4. Used by Cloth CPU Linear Skinning. These operation will be performant as they use SIMD.
- Modified so there are no virtual functions calls at vertex level.
- Caching indices to simplify the loop when applying skinning.
- Caching static variables Matrix3x4 zero and DualQuaternion zero to avoid creating it for every vertex.
- Removing branching to skip joints when the weight is zero, these cases are rarely and this improves performance by removing branching from loops at vertex level.
- Changing skinning influences so it's a continuous block of memory.
- Caching the vector size() if a variable instead of directly using it in a for loop.
2021-05-04 12:09:56 +01:00
karlberg d0a561fa01 merging latest origin 2021-05-03 21:27:27 -07:00
karlberg 822368ef01 Changes to get visibility system working again in-game 2021-05-03 16:26:11 -07:00
greerdv b113f09a71 first pass of changing transform to use float for scale internally rather than Vector3 2021-04-27 18:12:46 +01:00
AMZN-koppersr 6dfa33816b Fixed a bug with type ids for inherited classes with a custom serializer.
The code that adds a $type field for pointers where needed was still assuming that custom serializer were always for primitives, which isn't the case anymore. This changes updates the behavior to allow $type to be added to those as well as long as they use an object. This does now however rely more heavily on earlier checks that the data needs a $type because it otherwise can't tell the difference between a primitive getting a default value (an empty object). In the original code this situation would have resulted in failed serialization though, so it's unlikely to be a problem.
2021-04-26 15:26:18 -07:00
Chris Burel 61fe298319 Merge pull request #197 from aws-lumberyard-dev/filesEndInNewlines
Add newlines to the end of all files
2021-04-23 12:11:40 -07:00
Chris Burel 28170ffe41 Add newlines to the end of all files 2021-04-23 09:43:40 -07:00