Commit Graph

378 Commits (1431afb51a08535a0ceabc22f11a55c0e5f5bb93)

Author SHA1 Message Date
lumberyard-employee-dm 098005afbc
AZStd::basic_string improvements (#6438)
* AZStd::basic_string improvements

The AZStd::basic_string class has a better implementation of the Short
String Optimization, which increases the amount of characters that can
be stored in a `basic_string<char>` from 15 characters to 22
characters(not-including null-terminating characters). For a
`basic_string<wchar_t>` on Windows the amount of characters that can be
stored increases from 7 to 10. Using `basic_string<wchar_t>` on Unix
platforms SSO character amount from 3 to 4 characters.

An additional benefit is that the size of the AZStd::basic_string class
has been reduced from 40 bytes to 32 bytes when using the
AZStd::allocator.
When using a stateless allocator with no non static data members such as
AZStd::stateless_allocator, the size of the AZStd::basic_string is 24
bytes.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Corrected comments and updated type alias to usings for AZStd::basic_string

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Added Benchmarks for the basic_string and basic_fixed_string class

The benchmarks currently measure the speed of the `assign` overloads.
A benchmark has also been added to compare the speed swapping two
`basic_string` instances by 3 memcpy vs 3 pointer swap operations

Speed up string operation when in the iterator overload cases of the
`assign`, `append`, `insert` and `replace` function.
The code was always performing the logic to copy over a string that is
overlapping, without actually checking if the string was overlapping in
the first place.

Added an `az_builtin_is_constant_evaluated` macro that allows use of the
C++20 `std::is_constant_evaluated` feature to determine if an operation
is being performed at compile time vs run time.

That macro is being used to speed up the char_trait operations at run
time, by using the faster standard library functions.
For example char_traits::move now uses "memmove" at runtime, instead of
a for loop.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Simplified string logic in AWSMetricsServiceApiTest.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
4 years ago
Roman 55fb63da48
Debug render aabb now include node, mesh and static aabb. (#6685)
Signed-off-by: rhhong <rhhong@amazon.com>
4 years ago
tjmgd 4695d36ea5
Fix: Blend node applies both poses at value 1 (#6292)
Signed-off-by: T.J. McGrath-Daly <tj.mcgrath.daly@huawei.com>

Co-authored-by: Tobias Alexander Franke <tobias.alexander.franke@huawei.com>
4 years ago
Benjamin Jillich 40ca1dcbf9
EMotion FX: Extendable pose data and pose debug visualization (#6639)
* Added debug draw function to the pose class for sharable and easy-to-use pose debug visualization that includes pose data debug rendering.
* Extended the pose data factory with the ability to add pose data types from outside of the EMFX SDK and external gems.
* In order to get access to the pose data factory, it got added to the EMFX manager.

Signed-off-by: Benjamin Jillich <jillich@amazon.com>
4 years ago
Chris Galvan 6e2ccbc055
Merge pull request #6437 from pollend/chore/update-SafeNormalize-usage-EmotionFX
chore[EmotionFX]: replace usage of SafeNormalize
4 years ago
Benjamin Jillich 95245e2424
EMotion FX: Linear and angular velocity calculation and debug visualization helpers (#6613)
* Added helper functions for calculating linear and angular velocities.
* Added debug visualization helper for linear and angular velocities.

Signed-off-by: Benjamin Jillich <jillich@amazon.com>
4 years ago
Chris Galvan ece56055bf
Merge pull request #6290 from tjmgd/bug-lod-disable-38
Parameters of LOD distance component still take effect when anim graph disabled
4 years ago
Roman ee554f6464
ActorInstanceId default to -1 when no %lastresult matches (#6442)
* 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>
4 years ago
tjmgd 457007e037
Negative distances invalid (#6288)
Signed-off-by: T.J. McGrath-Daly <tj.mcgrath.daly@huawei.com>

Co-authored-by: Tobias Alexander Franke <tobias.alexander.franke@huawei.com>
4 years ago
Chris Burel f52d49834a
[EMotionFX] Prefer `#pragma once` (#6435)
Signed-off-by: Chris Burel <burelc@amazon.com>
4 years ago
Michael Pollind 68c756b6f4 mark duplicate methods under MCore::Vector as deprecated
Signed-off-by: Michael Pollind <mpollind@gmail.com>
4 years ago
Michael Pollind 411674e8fc chore[EmotionFX]: replace usage of SafeNormalize
ref: https://github.com/o3de/o3de/pull/6433
Signed-off-by: Michael Pollind <mpollind@gmail.com>
4 years ago
tjmgd cf9385fc39
Garbled name when using Chinese charaters (#6379)
Signed-off-by: T.J. McGrath-Daly <tj.mcgrath.daly@huawei.com>
4 years ago
Artur K 53b88d4752
Preapre codebase for FileRequest compiletime improvements (#6192)
* Preapre codebase for FileRequest compiletime improvements

This is preparing grounds for the next PR that will contain the 'meat'
of the changes.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Remove spurious newline.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
4 years ago
Tobias Alexander Franke ce0c62268a Parameters of the Simple LOD distance component still take effect after Enable anim graph is disabled.
Signed-off-by: T.J. McGrath-Daly <tj.mcgrath.daly@huawei.com>
4 years ago
Luis Sempé 3c624b6d96
Merge pull request #5935 from tjmgd/bug-render-anim-h
Fix for animation window render options not being persistent
4 years ago
Luis Sempé e146299a83
Merge pull request #5911 from tjmgd/bug-motion-set-removal-h
Bug motion set removal h
4 years ago
greerdv dbba71fe3a merge from development
Signed-off-by: greerdv <greerdv@amazon.com>
4 years ago
greerdv a44270e4df improvement suggested during PR
Signed-off-by: greerdv <greerdv@amazon.com>
4 years ago
Esteban Papp 7c30adb66c
Removes _vs2019 from jenkins jobs and documentation (#5855)
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
greerdv bb5c2ac462 fix alignment of autosized ragdoll colliders
Signed-off-by: greerdv <greerdv@amazon.com>
4 years ago
Benjamin Jillich 21cae1603a
EMotion FX: Added helper to sample a pose from a motion without an motion instance (#6005)
Signed-off-by: Benjamin Jillich <jillich@amazon.com>
4 years ago
Benjamin Jillich abf3e69b97
EMotion FX: Saving Anim Graph with CTRL+S displays unsaved changes prompt when no changes were made (#5936)
Saving an anim graph did not adjust the dirty flag and thus the saved changes dialog kept showing anim graphs that already saved the latest changes.

Signed-off-by: Benjamin Jillich <jillich@amazon.com>
4 years ago
Roman c59f973900
Add joint selection visual support (#5860)
* Render joint orientation

Signed-off-by: rhhong <rhhong@amazon.com>

* joint selection will affect rendering result in emfx atom debug draw

Signed-off-by: rhhong <rhhong@amazon.com>

* Render line skeleton with joint selection

Signed-off-by: rhhong <rhhong@amazon.com>

* bug fix

Signed-off-by: rhhong <rhhong@amazon.com>

* fix build error

Signed-off-by: rhhong <rhhong@amazon.com>

* CR feedback - checking the actor instances for joint selection

Signed-off-by: rhhong <rhhong@amazon.com>
4 years ago
T.J. McGrath-Daly f49a699ab4 Fix for animation window render options not being persistent
Signed-off-by: T.J. McGrath-Daly <tj.mcgrath.daly@huawei.com>
4 years ago
T.J. McGrath-Daly dfa6f77075 Fix for bug where, when removing a motion that is used by more than one motion set.
Signed-off-by: T.J. McGrath-Daly <tj.mcgrath.daly@huawei.com>
4 years ago
Artur K eca2e36687
Fix clang 13 compilation problems (#5791)
* Fix clang 13 compilation problems

Re-instated ShowPlayedSequencesDebug logic by introducing no-op lambda
which replaces missing `Draw2dLabel` functionality ( added TODO marker
there )

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* apply review suggestions

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Fix type in assert message

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
4 years ago
Benjamin Jillich 2fbb2a73c6
Animation Editor: Morph targets window shows duplicated morph targets (#5831)
Dialog stack wasn't deleting the morph target widgets after reinitializing the window which ended up in duplicated morph targets

Signed-off-by: Benjamin Jillich <jillich@amazon.com>
4 years ago
Roman a3a4038aca
Added joint orientation rendering (#5821)
* Render joint orientation

Signed-off-by: rhhong <rhhong@amazon.com>

* fix build error

Signed-off-by: rhhong <rhhong@amazon.com>

* CR feedback

Signed-off-by: rhhong <rhhong@amazon.com>
4 years ago
moraaar 5145fceedc
Fix some compilation errors due to warnings of potentially returning unitialized variables. (#5796)
Signed-off-by: moraaar <moraaar@amazon.com>
4 years ago
Benjamin Jillich 9e076db1fe
[EMotion FX] In-place option isn't working correctly (#5743)
The in-place option for the simple motion component, the motion anim graph node as well as in the motion window were not working in case the motion extraction node was not the root joint. The convention is to keep the motion extraction joint the root joint to make it work correctly - the isolated issue can be solved by only evaluating the motion extraction joint animation in case in-place is disabled and replace the is root joint check with one that checks if we are actually dealing with the motion extraction joint.

Resolves #5636

Signed-off-by: Benjamin Jillich <jillich@amazon.com>
4 years ago
Roman e52cbd2bb3
Render joint names (#5685)
* render solid skeleton option

Signed-off-by: rhhong <rhhong@amazon.com>

* Fix broken build

Signed-off-by: rhhong <rhhong@amazon.com>

* CR update

Signed-off-by: rhhong <rhhong@amazon.com>

* Render joint names

Signed-off-by: rhhong <rhhong@amazon.com>

* CR update

Signed-off-by: rhhong <rhhong@amazon.com>

* CR update

Signed-off-by: rhhong <rhhong@amazon.com>
4 years ago
Roman 9b6e2ed51d
render solid skeleton option (#5610)
* render solid skeleton option

Signed-off-by: rhhong <rhhong@amazon.com>

* Fix broken build

Signed-off-by: rhhong <rhhong@amazon.com>

* CR update

Signed-off-by: rhhong <rhhong@amazon.com>
4 years ago
Benjamin Jillich 84ba4afc54
EMotion FX: Deleting a corresponding anim graph when a Reference node is open crashes the Editor (#5612)
Signed-off-by: Benjamin Jillich <jillich@amazon.com>
4 years ago
amzn-sean 38a03817bb
Removal and Replacement of the CryTimer (gEnv->pTimer) (#5409)
Replaced and removed the CryTimer (gEnv->pTimer). The new TimeSystem is a merger of the current time functionality found in the engine.

* Rename TimeSystemComponent.h/.cpp to TimeSystem.h/.cpp
* Adding New TimeSystem
* remove old timer cvars
* small improvements to the time system.
 - updated parts to use the time conversion functions.
 - in AdvanceTickDeltaTimes applying t_simulationTickScale is now uses doubles instead of floats.
* Replace gEnv->pTimer / ITimer usages with TimeSystem
* Updating usages of AZ::TimeMs{ 0 } and AZ::TimeUs{ 0 } to AZ::Time::ZeroTimeMs and AZ::Time::ZeroTimeUs
* red code the CryTimer
* using TimeUs instead of TimeMs is some cases + updating usages of old cvars to new

Signed-off-by: amzn-sean <75276488+amzn-sean@users.noreply.github.com>
4 years ago
Guthrie Adams 246f174528 inverted game mode ptr check
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
Guthrie Adams 41a64b1346 Added a null pointer check to EMFX system component
Material editor and other tools load runtime dependencies from game projects. The EMFX system component is checking for game mode by getting a pointer to the editor interface, which will not exist outside of the main O3DE editor.

Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
Benjamin Jillich 838970206b
Animation Editor: Remove preview label (#5449)
Signed-off-by: Benjamin Jillich <jillich@amazon.com>
4 years ago
Roman aa229976f3
Render Colliders (#5434)
* Render Colliders

Signed-off-by: rhhong <rhhong@amazon.com>

* CR feedback

Signed-off-by: rhhong <rhhong@amazon.com>
4 years ago
Benjamin Jillich 669ac8bb61
EMotion FX: Fix for the Y motion coordinate not being editable in blend space nodes (#5406)
Signed-off-by: Benjamin Jillich <jillich@amazon.com>
4 years ago
Benjamin Jillich 0ce2a7b2f4
EMotion FX: Apply motion extraction only in game-mode and for anim editor entities (#5401)
* Motion extraction should only be applied when in game mode or for entities that belong to the Animation Editor. We don't want our entities to move in editor mode.
* Moved code into separate function that actually applies the trajectory delta to the entity/character controller.

Signed-off-by: Benjamin Jillich <jillich@amazon.com>
4 years ago
Benjamin Jillich f918b12b5a
EMotion FX: Taskify dual quat skinning deformer (#5368)
* Moved from job system to task graph for the multi-threaded dual quaternion skinning deformer.
* Prepare the task graph at init time and reuse it at runtime.

Signed-off-by: Benjamin Jillich <jillich@amazon.com>
4 years ago
Chris Burel d942c90c56 Merge branch stabilization/2110 into development
Signed-off-by: Chris Burel <burelc@amazon.com>
4 years ago
Chris Burel 4ba2c06386 Merge branch stabilization/2110 into development
Signed-off-by: Chris Burel <burelc@amazon.com>
4 years ago
Chris Burel a91f569625 Merge branch stabilization/2110 into development
Signed-off-by: Chris Burel <burelc@amazon.com>
4 years ago
AMZN-nggieber 4721ef8298
License Info is Displayed as Clickable Link in Gem Catalog + Other Inspector Improvements (#5272)
Signed-off-by: nggieber <nggieber@amazon.com>
4 years ago
Chris Burel bb1dfd44d2 Merge branch stabilization/2110 into development
Signed-off-by: Chris Burel <burelc@amazon.com>
4 years ago
lumberyard-employee-dm 627012840d
Update how Project Filepaths are calculated when not supplied via command line (#5194)
* Fixed the return value of the ConvertToAbsolutePath function

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Added the generated cmake_dependencies.*.setreg files to engine.pak (#5073)

* Copied the generated cmake_dependencies.*.setreg file to the Cache
directory

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Removed the platform name from the bootstrap.game.*.setreg

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Update how the project related file paths are determined when not
supplied.

The project-path determination now goes back to only detecting a "project.json" file.
It no longer attempts to detect a "Cache" directory

The project-cache-path determination now in addition to checking the
project_cache_path key searches for a "Cache" directory.

The project-path defaults to executable folder if it cannot be detected.

The copying of generated executable folder Registry directory contents
to the product cache is now removed after the archive step.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Updated the invocation of the AssetProcessor in Jenkins to supply an
absolute path to the project.

The project-path is no longer treated as relative to the engine root,
but instead relative to the current working directory at application
startup.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Added constant for the storing the name of Cache directory

Fixed typos and grammatical errors in the SettingsRegistryMergeUtils.cpp

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Updated UnitTest prepend the EngineRoot path to "AutomatedTesting" when
setting the project path.

This is needed now that the project-path isn't treated relative to the
EngineRoot if it is not absolute.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Fix AssetSeedManagerTest and PlatformAddressedAssetCatalogManagerTest

Instead of trying to used the AutomatedTesting directory as the project root, the temp directory created during the test is used as the project root.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Moved the setting of the project cache root folder and project
asset platform root folder into the `if (!projectCachePath.empty())`
block

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Removing the scan up logic for the "Cache" directory.

This is no longer needed to locate the project cache path in a Project Game Release Layout.

Because the project path defaults to the executable directory if, it is not found, the Cache directory will be set to the "Cache" directory within the executable directory.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
4 years ago
Benjamin Jillich 54506b6c6c
Animation Editor: Clicking Visualization in Anim Graph in the animation editor has no effect. (#5088)
asprintf() is returning a new QString and is also deprecated. Switched to use the AZStd::string::format() as that uses the small string optimization and doesn't result in an allocation.

Resolves #2429

Signed-off-by: Benjamin Jillich <jillich@amazon.com>
4 years ago
moraaar e553eb0116
Fixed editor crash dropping an fbx to entity inspector (#5242)
The issue was that EditorActorComponent (added by the drag and drop of the FBX into the entity) continued with the loading of an actor asset even though the component is not activated due to incompatible services, which ultimately lead to logic which should never have been reached and crashing.

Also fixed EditorActorComponent missing activation and deactivation of the base editor component class, which is necessary.

All tests from EMotionFX.Editor.Tests passed.

Signed-off-by: moraaar <moraaar@amazon.com>
4 years ago