Merge pull request #3428 from aws-lumberyard-dev/cgalvan/FixedTrackViewNodeCrash

Fixed memory stomping leading to Track View nodes with invalid labels and crash.
This commit is contained in:
Chris Galvan
2021-08-25 19:14:26 -05:00
committed by GitHub
57 changed files with 144 additions and 153 deletions
+3 -3
View File
@@ -376,7 +376,7 @@ struct IAnimTrack
virtual int GetSubTrackCount() const = 0;
// Retrieve pointer the specfied sub track.
virtual IAnimTrack* GetSubTrack(int nIndex) const = 0;
virtual const char* GetSubTrackName(int nIndex) const = 0;
virtual AZStd::string GetSubTrackName(int nIndex) const = 0;
virtual void SetSubTrackName(int nIndex, const char* name) = 0;
//////////////////////////////////////////////////////////////////////////
@@ -623,7 +623,7 @@ public:
, valueType(_valueType)
, flags(_flags) {};
const char* name; // parameter name.
AZStd::string name; // parameter name.
CAnimParamType paramType; // parameter id.
AnimValueType valueType; // value type, defines type of track to use for animating this parameter.
ESupportedParamFlags flags; // combination of flags from ESupportedParamFlags.
@@ -736,7 +736,7 @@ public:
// Returns name of supported parameter of this animation node or NULL if not available
// Arguments:
// paramType - parameter id
virtual const char* GetParamName(const CAnimParamType& paramType) const = 0;
virtual AZStd::string GetParamName(const CAnimParamType& paramType) const = 0;
// Description:
// Returns the params value type
@@ -440,7 +440,7 @@ struct IUiAnimTrack
virtual int GetSubTrackCount() const = 0;
// Retrieve pointer the specfied sub track.
virtual IUiAnimTrack* GetSubTrack(int nIndex) const = 0;
virtual const char* GetSubTrackName(int nIndex) const = 0;
virtual AZStd::string GetSubTrackName(int nIndex) const = 0;
virtual void SetSubTrackName(int nIndex, const char* name) = 0;
//////////////////////////////////////////////////////////////////////////
@@ -632,7 +632,7 @@ public:
virtual void SetName(const char* name) = 0;
//! Get node name.
virtual const char* GetName() = 0;
virtual AZStd::string GetName() = 0;
// Get Type of this node.
virtual EUiAnimNodeType GetType() const = 0;
@@ -708,13 +708,13 @@ public:
// Returns name of supported parameter of this animation node or NULL if not available
// Arguments:
// paramType - parameter id
virtual const char* GetParamName(const CUiAnimParamType& paramType) const = 0;
virtual AZStd::string GetParamName(const CUiAnimParamType& paramType) const = 0;
// Description:
// Returns name of supported parameter of this animation node or NULL if not available
// Arguments:
// paramType - parameter id
virtual const char* GetParamNameForTrack(const CUiAnimParamType& paramType, [[maybe_unused]] const IUiAnimTrack* track) const { return GetParamName(paramType); }
virtual AZStd::string GetParamNameForTrack(const CUiAnimParamType& paramType, [[maybe_unused]] const IUiAnimTrack* track) const { return GetParamName(paramType); }
// Description:
// Returns the params value type