Updated AnimNode registration in LyShine and Maestro to register to a member variable map (#6786)
* Updated the Maestro MovieSystem and LyShine AnimationSystem to register Anim Nodes and Anim Params into a member variable map Previously the registration was occuring in a global variable map inside of Movie.cpp and UiAnimationSystem.cpp Rolled back the changes to update the CUiAnimNode and CAnimParamType to use the stateless allocator in their m_name string member. This was only needed because those types were used in global memory. Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> * Updated the AZStd::hash specializations for basic_string and basic_fixed_string to be transparent. This allows hashing of types that aren't basic_string or basic_fixed_string using the hash specializations for those types without needing to create an instance of those types. Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> * Adding call to disable saving of the UserSettings.xml in the DisplaySettingsPythonBindingsFixture to avoid race condition running the test in parallel Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
4392c8963c
commit
b62d130475
@@ -14,6 +14,8 @@
|
||||
#include <AzCore/std/containers/map.h>
|
||||
#include <AzCore/Time/ITime.h>
|
||||
|
||||
#include <CryCommon/StlUtils.h>
|
||||
|
||||
struct PlayingUIAnimSequence
|
||||
{
|
||||
//! Sequence playing
|
||||
@@ -134,12 +136,10 @@ public:
|
||||
void SerializeParamType(CUiAnimParamType& animParamType, XmlNodeRef& xmlNode, bool bLoading, const uint version) override;
|
||||
void SerializeParamData(UiAnimParamData& animParamData, XmlNodeRef& xmlNode, bool bLoading) override;
|
||||
|
||||
static const char* GetParamTypeName(const CUiAnimParamType& animParamType);
|
||||
const char* GetParamTypeName(const CUiAnimParamType& animParamType);
|
||||
|
||||
void OnCameraCut();
|
||||
|
||||
static void StaticInitialize();
|
||||
|
||||
static void Reflect(AZ::SerializeContext* serializeContext);
|
||||
|
||||
void NotifyTrackEventListeners(const char* eventName, const char* valueName, IUiAnimSequence* pSequence) override;
|
||||
@@ -187,5 +187,21 @@ private:
|
||||
// A sequence which turned on the early animation update last time
|
||||
uint32 m_nextSequenceId;
|
||||
|
||||
|
||||
using UiAnimParamSystemString = AZStd::string;
|
||||
template <typename KeyType, typename MappedType, typename Compare = stl::less_stricmp<KeyType>>
|
||||
using UiAnimSystemOrderedMap = AZStd::map<KeyType, MappedType, Compare>;
|
||||
template <typename KeyType, typename MappedType, typename Hasher = AZStd::hash<KeyType>, typename EqualKey = AZStd::equal_to<>>
|
||||
using UiAnimSystemUnorderedMap = AZStd::unordered_map<KeyType, MappedType, Hasher, EqualKey>;
|
||||
|
||||
UiAnimSystemUnorderedMap<int, UiAnimParamSystemString> m_animNodeEnumToStringMap;
|
||||
UiAnimSystemOrderedMap<UiAnimParamSystemString, EUiAnimNodeType> m_animNodeStringToEnumMap;
|
||||
|
||||
UiAnimSystemUnorderedMap<int, UiAnimParamSystemString> m_animParamEnumToStringMap;
|
||||
UiAnimSystemOrderedMap<UiAnimParamSystemString, EUiAnimParamType> m_animParamStringToEnumMap;
|
||||
|
||||
void RegisterNodeTypes();
|
||||
void RegisterParamTypes();
|
||||
|
||||
void ShowPlayedSequencesDebug();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user