Gems/Maestro

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-09-10 20:22:23 -07:00
parent 6e51bbcd53
commit bd7bd3648b
20 changed files with 355 additions and 355 deletions
@@ -63,7 +63,7 @@ public:
Vec3 GetScale() override;
//////////////////////////////////////////////////////////////////////////
void Serialize(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks);
void Serialize(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks) override;
// this is an unfortunate hold-over from legacy entities - used when a SceneNode overrides the camera animation so
// we must disable the transform and camera components from updating animation on this entity because the SceneNode
@@ -86,7 +86,7 @@ public:
// EditorSequenceAgentComponentNotificationBus::Handler Interface
void OnSequenceAgentConnected() override;
void Serialize(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks);
void Serialize(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks) override;
const AZ::Uuid& GetComponentTypeId() const { return m_componentTypeId; }
+16 -16
View File
@@ -46,7 +46,7 @@ public:
//////////////////////////////////////////////////////////////////////////
void SetName(const char* name) override { m_name = name; };
const char* GetName() { return m_name.c_str(); };
const char* GetName() override { return m_name.c_str(); };
void SetSequence(IAnimSequence* sequence) override { m_pSequence = sequence; }
// Return Animation Sequence that owns this node.
@@ -60,7 +60,7 @@ public:
int GetFlags() const override;
bool AreFlagsSetOnNodeOrAnyParent(EAnimNodeFlags flagsToCheck) const override;
IMovieSystem* GetMovieSystem() const { return gEnv->pMovieSystem; };
IMovieSystem* GetMovieSystem() const override { return gEnv->pMovieSystem; };
virtual void OnStart() {}
void OnReset() override {}
@@ -85,23 +85,23 @@ public:
virtual Matrix34 GetReferenceMatrix() const;
//////////////////////////////////////////////////////////////////////////
bool IsParamValid(const CAnimParamType& paramType) const;
bool IsParamValid(const CAnimParamType& paramType) const override;
AZStd::string GetParamName(const CAnimParamType& param) const override;
virtual AnimValueType GetParamValueType(const CAnimParamType& paramType) const;
virtual IAnimNode::ESupportedParamFlags GetParamFlags(const CAnimParamType& paramType) const;
virtual unsigned int GetParamCount() const { return 0; };
AnimValueType GetParamValueType(const CAnimParamType& paramType) const override;
IAnimNode::ESupportedParamFlags GetParamFlags(const CAnimParamType& paramType) const override;
unsigned int GetParamCount() const override { return 0; };
bool SetParamValue(float time, CAnimParamType param, float val);
bool SetParamValue(float time, CAnimParamType param, const Vec3& val);
bool SetParamValue(float time, CAnimParamType param, const Vec4& val);
bool GetParamValue(float time, CAnimParamType param, float& val);
bool GetParamValue(float time, CAnimParamType param, Vec3& val);
bool GetParamValue(float time, CAnimParamType param, Vec4& val);
bool SetParamValue(float time, CAnimParamType param, float val) override;
bool SetParamValue(float time, CAnimParamType param, const Vec3& val) override;
bool SetParamValue(float time, CAnimParamType param, const Vec4& val) override;
bool GetParamValue(float time, CAnimParamType param, float& val) override;
bool GetParamValue(float time, CAnimParamType param, Vec3& val) override;
bool GetParamValue(float time, CAnimParamType param, Vec4& val) override;
void SetTarget([[maybe_unused]] IAnimNode* node) {};
IAnimNode* GetTarget() const { return 0; };
void StillUpdate() {}
void StillUpdate() override {}
void Animate(SAnimContext& ec) override;
virtual void PrecacheStatic([[maybe_unused]] float startTime) {}
@@ -114,7 +114,7 @@ public:
IAnimNodeOwner* GetNodeOwner() override { return m_pOwner; };
// Called by sequence when needs to activate a node.
virtual void Activate(bool bActivate);
void Activate(bool bActivate) override;
//////////////////////////////////////////////////////////////////////////
void SetParent(IAnimNode* parent) override;
@@ -149,7 +149,7 @@ public:
void SetId(int id) { m_id = id; }
const char* GetNameFast() const { return m_name.c_str(); }
virtual void Render(){}
void Render() override{}
void UpdateDynamicParams() final;
@@ -177,7 +177,7 @@ protected:
CMovieSystem* GetCMovieSystem() const { return (CMovieSystem*)gEnv->pMovieSystem; }
virtual bool NeedToRender() const { return false; }
bool NeedToRender() const override { return false; }
// nodes which support sounds should override this to reset their start/stop sound states
virtual void ResetSounds() {}
@@ -37,32 +37,32 @@ public:
//-----------------------------------------------------------------------------
//!
virtual void SerializeAnims(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks);
void SerializeAnims(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks) override;
//-----------------------------------------------------------------------------
//!
virtual unsigned int GetParamCount() const;
virtual CAnimParamType GetParamType(unsigned int nIndex) const;
unsigned int GetParamCount() const override;
CAnimParamType GetParamType(unsigned int nIndex) const override;
//-----------------------------------------------------------------------------
//!
//-----------------------------------------------------------------------------
//!
virtual void CreateDefaultTracks();
void CreateDefaultTracks() override;
virtual void OnReset();
void OnReset() override;
//-----------------------------------------------------------------------------
//!
virtual void Animate(SAnimContext& ac);
void Animate(SAnimContext& ac) override;
void InitPostLoad(IAnimSequence* sequence) override;
static void Reflect(AZ::ReflectContext* context);
protected:
virtual bool GetParamInfoFromType(const CAnimParamType& paramId, SParamInfo& info) const;
bool GetParamInfoFromType(const CAnimParamType& paramId, SParamInfo& info) const override;
typedef std::map< AnimNodeType, _smart_ptr<CFXNodeDescription> > FxNodeDescriptionMap;
static StaticInstance<FxNodeDescriptionMap> s_fxNodeDescriptions;
@@ -32,32 +32,32 @@ public:
//-----------------------------------------------------------------------------
//! Overrides from CAnimNode
virtual void Animate(SAnimContext& ac);
void Animate(SAnimContext& ac) override;
virtual void CreateDefaultTracks();
void CreateDefaultTracks() override;
virtual void OnReset();
void OnReset() override;
virtual void Activate(bool bActivate);
void Activate(bool bActivate) override;
virtual void Serialize(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks);
void Serialize(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks) override;
//-----------------------------------------------------------------------------
//! Overrides from IAnimNode
virtual unsigned int GetParamCount() const;
virtual CAnimParamType GetParamType(unsigned int nIndex) const;
unsigned int GetParamCount() const override;
CAnimParamType GetParamType(unsigned int nIndex) const override;
void SetFlags(int flags) override;
virtual void Render();
void Render() override;
bool IsAnyTextureVisible() const;
static void Reflect(AZ::ReflectContext* context);
protected:
virtual bool GetParamInfoFromType(const CAnimParamType& paramId, SParamInfo& info) const;
bool GetParamInfoFromType(const CAnimParamType& paramId, SParamInfo& info) const override;
virtual bool NeedToRender() const { return true; }
bool NeedToRender() const override { return true; }
private:
CAnimScreenFaderNode(const CAnimScreenFaderNode&);
@@ -40,48 +40,48 @@ public:
// Movie system.
IMovieSystem* GetMovieSystem() const { return m_pMovieSystem; };
void SetName(const char* name);
const char* GetName() const;
uint32 GetId() const { return m_id; }
void SetName(const char* name) override;
const char* GetName() const override;
uint32 GetId() const override { return m_id; }
void ResetId() override;
float GetTime() const { return m_time; }
void SetLegacySequenceObject(IAnimLegacySequenceObject* legacySequenceObject) override { m_legacySequenceObject = legacySequenceObject; }
virtual IAnimLegacySequenceObject* GetLegacySequenceObject() const override { return m_legacySequenceObject; }
IAnimLegacySequenceObject* GetLegacySequenceObject() const override { return m_legacySequenceObject; }
void SetSequenceEntityId(const AZ::EntityId& sequenceEntityId) override;
const AZ::EntityId& GetSequenceEntityId() const override { return m_sequenceEntityId; }
virtual void SetActiveDirector(IAnimNode* pDirectorNode);
virtual IAnimNode* GetActiveDirector() const;
void SetActiveDirector(IAnimNode* pDirectorNode) override;
IAnimNode* GetActiveDirector() const override;
virtual void SetFlags(int flags);
virtual int GetFlags() const;
virtual int GetCutSceneFlags(const bool localFlags = false) const;
void SetFlags(int flags) override;
int GetFlags() const override;
int GetCutSceneFlags(const bool localFlags = false) const override;
virtual void SetParentSequence(IAnimSequence* pParentSequence);
virtual const IAnimSequence* GetParentSequence() const;
virtual bool IsAncestorOf(const IAnimSequence* pSequence) const;
void SetParentSequence(IAnimSequence* pParentSequence) override;
const IAnimSequence* GetParentSequence() const override;
bool IsAncestorOf(const IAnimSequence* pSequence) const override;
void SetTimeRange(Range timeRange);
Range GetTimeRange() { return m_timeRange; };
void SetTimeRange(Range timeRange) override;
Range GetTimeRange() override { return m_timeRange; };
void AdjustKeysToTimeRange(const Range& timeRange);
void AdjustKeysToTimeRange(const Range& timeRange) override;
//! Return number of animation nodes in sequence.
int GetNodeCount() const;
int GetNodeCount() const override;
//! Get specified animation node.
IAnimNode* GetNode(int index) const;
IAnimNode* GetNode(int index) const override;
IAnimNode* FindNodeByName(const char* sNodeName, const IAnimNode* pParentDirector);
IAnimNode* FindNodeByName(const char* sNodeName, const IAnimNode* pParentDirector) override;
IAnimNode* FindNodeById(int nNodeId);
virtual void ReorderNode(IAnimNode* node, IAnimNode* pPivotNode, bool next);
void ReorderNode(IAnimNode* node, IAnimNode* pPivotNode, bool next) override;
void Reset(bool bSeekToStart);
void ResetHard();
void Pause();
void Resume();
bool IsPaused() const;
void Reset(bool bSeekToStart) override;
void ResetHard() override;
void Pause() override;
void Resume() override;
bool IsPaused() const override;
virtual void OnStart();
virtual void OnStop();
@@ -90,49 +90,49 @@ public:
void TimeChanged(float newTime) override;
//! Add animation node to sequence.
bool AddNode(IAnimNode* node);
IAnimNode* CreateNode(AnimNodeType nodeType);
IAnimNode* CreateNode(XmlNodeRef node);
bool AddNode(IAnimNode* node) override;
IAnimNode* CreateNode(AnimNodeType nodeType) override;
IAnimNode* CreateNode(XmlNodeRef node) override;
void RemoveNode(IAnimNode* node, bool removeChildRelationships=true) override;
//! Add scene node to sequence.
void RemoveAll();
void RemoveAll() override;
virtual void Activate();
virtual bool IsActivated() const { return m_bActive; }
virtual void Deactivate();
void Activate() override;
bool IsActivated() const override { return m_bActive; }
void Deactivate() override;
virtual void PrecacheData(float startTime);
void PrecacheData(float startTime) override;
void PrecacheStatic(const float startTime);
void PrecacheDynamic(float time);
void StillUpdate();
void Animate(const SAnimContext& ec);
void Render();
void StillUpdate() override;
void Animate(const SAnimContext& ec) override;
void Render() override;
void InitPostLoad() override;
void CopyNodes(XmlNodeRef& xmlNode, IAnimNode** pSelectedNodes, uint32 count);
void PasteNodes(const XmlNodeRef& xmlNode, IAnimNode* pParent);
void CopyNodes(XmlNodeRef& xmlNode, IAnimNode** pSelectedNodes, uint32 count) override;
void PasteNodes(const XmlNodeRef& xmlNode, IAnimNode* pParent) override;
//! Add/remove track events in sequence
virtual bool AddTrackEvent(const char* szEvent);
virtual bool RemoveTrackEvent(const char* szEvent);
virtual bool RenameTrackEvent(const char* szEvent, const char* szNewEvent);
virtual bool MoveUpTrackEvent(const char* szEvent);
virtual bool MoveDownTrackEvent(const char* szEvent);
virtual void ClearTrackEvents();
bool AddTrackEvent(const char* szEvent) override;
bool RemoveTrackEvent(const char* szEvent) override;
bool RenameTrackEvent(const char* szEvent, const char* szNewEvent) override;
bool MoveUpTrackEvent(const char* szEvent) override;
bool MoveDownTrackEvent(const char* szEvent) override;
void ClearTrackEvents() override;
//! Get the track events in the sequence
virtual int GetTrackEventsCount() const;
virtual char const* GetTrackEvent(int iIndex) const;
virtual IAnimStringTable* GetTrackEventStringTable() { return m_pEventStrings.get(); }
int GetTrackEventsCount() const override;
char const* GetTrackEvent(int iIndex) const override;
IAnimStringTable* GetTrackEventStringTable() override { return m_pEventStrings.get(); }
//! Call to trigger a track event
virtual void TriggerTrackEvent(const char* event, const char* param = NULL);
void TriggerTrackEvent(const char* event, const char* param = NULL) override;
//! Track event listener
virtual void AddTrackEventListener(ITrackEventListener* pListener);
virtual void RemoveTrackEventListener(ITrackEventListener* pListener);
void AddTrackEventListener(ITrackEventListener* pListener) override;
void RemoveTrackEventListener(ITrackEventListener* pListener) override;
SequenceType GetSequenceType() const override { return m_sequenceType; }
@@ -52,24 +52,24 @@ public:
//////////////////////////////////////////////////////////////////////////
virtual int GetSubTrackCount() const { return 0; };
virtual IAnimTrack* GetSubTrack([[maybe_unused]] int nIndex) const { return 0; };
AZStd::string GetSubTrackName([[maybe_unused]] int nIndex) const { return AZStd::string(); };
virtual void SetSubTrackName([[maybe_unused]] int nIndex, [[maybe_unused]] const char* name) { assert(0); }
int GetSubTrackCount() const override { return 0; };
IAnimTrack* GetSubTrack([[maybe_unused]] int nIndex) const override { return 0; };
AZStd::string GetSubTrackName([[maybe_unused]] int nIndex) const override { return AZStd::string(); };
void SetSubTrackName([[maybe_unused]] int nIndex, [[maybe_unused]] const char* name) override { assert(0); }
void SetNode(IAnimNode* node) override { m_node = node; }
// Return Animation Node that owns this Track.
IAnimNode* GetNode() override { return m_node; }
virtual const CAnimParamType& GetParameterType() const { return m_nParamType; };
virtual void SetParameterType(CAnimParamType type) { m_nParamType = type; };
const CAnimParamType& GetParameterType() const override { return m_nParamType; };
void SetParameterType(CAnimParamType type) override { m_nParamType = type; };
virtual void GetKeyValueRange(float& fMin, float& fMax) const { fMin = m_fMinKeyValue; fMax = m_fMaxKeyValue; };
virtual void SetKeyValueRange(float fMin, float fMax){ m_fMinKeyValue = fMin; m_fMaxKeyValue = fMax; };
void GetKeyValueRange(float& fMin, float& fMax) const override { fMin = m_fMinKeyValue; fMax = m_fMaxKeyValue; };
void SetKeyValueRange(float fMin, float fMax) override{ m_fMinKeyValue = fMin; m_fMaxKeyValue = fMax; };
ISplineInterpolator* GetSpline() const { return m_spline.get(); };
ISplineInterpolator* GetSpline() const override { return m_spline.get(); };
virtual bool IsKeySelected(int key) const
bool IsKeySelected(int key) const override
{
if (GetSpline() && GetSpline()->IsKeySelectedAtAnyDimension(key))
{
@@ -78,7 +78,7 @@ public:
return false;
}
virtual void SelectKey(int key, bool select)
void SelectKey(int key, bool select) override
{
if (GetSpline())
{
@@ -86,22 +86,22 @@ public:
}
}
int GetNumKeys() const
int GetNumKeys() const override
{
return m_spline->num_keys();
}
void SetNumKeys(int numKeys)
void SetNumKeys(int numKeys) override
{
m_spline->resize(numKeys);
}
bool HasKeys() const
bool HasKeys() const override
{
return GetNumKeys() != 0;
}
void RemoveKey(int num)
void RemoveKey(int num) override
{
if (m_spline && m_spline->num_keys() > num)
{
@@ -113,7 +113,7 @@ public:
}
}
void GetKey(int index, IKey* key) const
void GetKey(int index, IKey* key) const override
{
assert(index >= 0 && index < GetNumKeys());
assert(key != 0);
@@ -131,7 +131,7 @@ public:
tcbkey->SetValue(k.value);
}
void SetKey(int index, IKey* key)
void SetKey(int index, IKey* key) override
{
assert(index >= 0 && index < GetNumKeys());
assert(key != 0);
@@ -148,71 +148,71 @@ public:
Invalidate();
}
float GetKeyTime(int index) const
float GetKeyTime(int index) const override
{
assert(index >= 0 && index < GetNumKeys());
return m_spline->time(index);
}
void SetKeyTime(int index, float time)
void SetKeyTime(int index, float time) override
{
assert(index >= 0 && index < GetNumKeys());
m_spline->SetKeyTime(index, time);
Invalidate();
}
int GetKeyFlags(int index)
int GetKeyFlags(int index) override
{
assert(index >= 0 && index < GetNumKeys());
return m_spline->key(index).flags;
}
void SetKeyFlags(int index, int flags)
void SetKeyFlags(int index, int flags) override
{
assert(index >= 0 && index < GetNumKeys());
m_spline->key(index).flags = flags;
}
virtual EAnimCurveType GetCurveType() { assert(0); return eAnimCurveType_Unknown; }
virtual AnimValueType GetValueType() { assert(0); return static_cast<AnimValueType>(0xFFFFFFFF); }
EAnimCurveType GetCurveType() override { assert(0); return eAnimCurveType_Unknown; }
AnimValueType GetValueType() override { assert(0); return static_cast<AnimValueType>(0xFFFFFFFF); }
virtual void GetValue(float time, float& value, bool applyMultiplier = false) { assert(0); }
virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] Vec3& value, [[maybe_unused]] bool applyMultiplier = false) { assert(0); }
virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] Vec4& value, [[maybe_unused]] bool applyMultiplier = false) { assert(0); }
virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] Quat& value) { assert(0); }
virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] bool& value) { assert(0); }
virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] Maestro::AssetBlends<AZ::Data::AssetData>& value) { assert(0); }
void GetValue(float time, float& value, bool applyMultiplier = false) override { assert(0); }
void GetValue([[maybe_unused]] float time, [[maybe_unused]] Vec3& value, [[maybe_unused]] bool applyMultiplier = false) override { assert(0); }
void GetValue([[maybe_unused]] float time, [[maybe_unused]] Vec4& value, [[maybe_unused]] bool applyMultiplier = false) override { assert(0); }
void GetValue([[maybe_unused]] float time, [[maybe_unused]] Quat& value) override { assert(0); }
void GetValue([[maybe_unused]] float time, [[maybe_unused]] bool& value) override { assert(0); }
void GetValue([[maybe_unused]] float time, [[maybe_unused]] Maestro::AssetBlends<AZ::Data::AssetData>& value) override { assert(0); }
virtual void SetValue(float time, const float& value, bool bDefault = false, bool applyMultiplier = false) { assert(0); }
virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Vec3& value, [[maybe_unused]] bool bDefault = false, [[maybe_unused]] bool applyMultiplier = false) { assert(0); }
virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Vec4& value, [[maybe_unused]] bool bDefault = false, [[maybe_unused]] bool applyMultiplier = false) { assert(0); }
virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Quat& value, [[maybe_unused]] bool bDefault = false) { assert(0); }
virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const bool& value, [[maybe_unused]] bool bDefault = false) { assert(0); }
virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Maestro::AssetBlends<AZ::Data::AssetData>& value, [[maybe_unused]] bool bDefault = false) { assert(0); }
void SetValue(float time, const float& value, bool bDefault = false, bool applyMultiplier = false) override { assert(0); }
void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Vec3& value, [[maybe_unused]] bool bDefault = false, [[maybe_unused]] bool applyMultiplier = false) override { assert(0); }
void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Vec4& value, [[maybe_unused]] bool bDefault = false, [[maybe_unused]] bool applyMultiplier = false) override { assert(0); }
void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Quat& value, [[maybe_unused]] bool bDefault = false) override { assert(0); }
void SetValue([[maybe_unused]] float time, [[maybe_unused]] const bool& value, [[maybe_unused]] bool bDefault = false) override { assert(0); }
void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Maestro::AssetBlends<AZ::Data::AssetData>& value, [[maybe_unused]] bool bDefault = false) override { assert(0); }
virtual void OffsetKeyPosition([[maybe_unused]] const Vec3& value) { assert(0); };
virtual void UpdateKeyDataAfterParentChanged([[maybe_unused]] const AZ::Transform& oldParentWorldTM, [[maybe_unused]] const AZ::Transform& newParentWorldTM) { assert(0); };
void OffsetKeyPosition([[maybe_unused]] const Vec3& value) override { assert(0); };
void UpdateKeyDataAfterParentChanged([[maybe_unused]] const AZ::Transform& oldParentWorldTM, [[maybe_unused]] const AZ::Transform& newParentWorldTM) override { assert(0); };
bool Serialize(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks);
bool SerializeSelection(XmlNodeRef& xmlNode, bool bLoading, bool bCopySelected, float fTimeOffset);
bool Serialize(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks) override;
bool SerializeSelection(XmlNodeRef& xmlNode, bool bLoading, bool bCopySelected, float fTimeOffset) override;
void GetKeyInfo(int key, const char*& description, float& duration)
void GetKeyInfo(int key, const char*& description, float& duration) override
{
description = 0;
duration = 0;
}
//! Sort keys in track (after time of keys was modified).
void SortKeys()
void SortKeys() override
{
m_spline->sort_keys();
};
//! Get track flags.
int GetFlags() { return m_flags; };
int GetFlags() override { return m_flags; };
//! Check if track is masked by mask
virtual bool IsMasked([[maybe_unused]] const uint32 mask) const { return false; }
bool IsMasked([[maybe_unused]] const uint32 mask) const override { return false; }
//! Set track flags.
void SetFlags(int flags)
void SetFlags(int flags) override
{
m_flags = flags;
if (m_flags & eAnimTrackFlags_Loop)
@@ -234,12 +234,12 @@ public:
m_spline->flag_set(Spline::MODIFIED);
};
void SetTimeRange(const Range& timeRange)
void SetTimeRange(const Range& timeRange) override
{
m_spline->SetRange(timeRange.start, timeRange.end);
}
int FindKey(float time)
int FindKey(float time) override
{
// Find key with given time.
int num = m_spline->num_keys();
@@ -255,7 +255,7 @@ public:
}
//! Create key at given time, and return its index.
int CreateKey(float time)
int CreateKey(float time) override
{
ValueType value;
@@ -275,12 +275,12 @@ public:
return m_spline->InsertKey(time, tmp);
}
int CloneKey(int srcKey)
int CloneKey(int srcKey) override
{
return CopyKey(this, srcKey);
}
int CopyKey(IAnimTrack* pFromTrack, int nFromKey)
int CopyKey(IAnimTrack* pFromTrack, int nFromKey) override
{
ITcbKey key;
pFromTrack->GetKey(nFromKey, &key);
@@ -329,16 +329,16 @@ public:
m_defaultValue = value;
}
virtual ColorB GetCustomColor() const
ColorB GetCustomColor() const override
{ return m_customColor; }
virtual void SetCustomColor(ColorB color)
void SetCustomColor(ColorB color) override
{
m_customColor = color;
m_bCustomColorSet = true;
}
virtual bool HasCustomColor() const
bool HasCustomColor() const override
{ return m_bCustomColorSet; }
virtual void ClearCustomColor()
void ClearCustomColor() override
{ m_bCustomColorSet = false; }
void SetMultiplier(float trackMultiplier) override
@@ -346,12 +346,12 @@ public:
m_trackMultiplier = trackMultiplier;
}
void SetExpanded([[maybe_unused]] bool expanded)
void SetExpanded([[maybe_unused]] bool expanded) override
{
AZ_Assert(false, "Not expected to be used.");
}
bool GetExpanded() const
bool GetExpanded() const override
{
return false;
}
+52 -52
View File
@@ -28,20 +28,20 @@ public:
TAnimTrack();
virtual EAnimCurveType GetCurveType() { return eAnimCurveType_Unknown; };
virtual AnimValueType GetValueType() { return kAnimValueUnknown; }
EAnimCurveType GetCurveType() override { return eAnimCurveType_Unknown; };
AnimValueType GetValueType() override { return kAnimValueUnknown; }
void SetNode(IAnimNode* node) override { m_node = node; }
// Return Animation Node that owns this Track.
IAnimNode* GetNode() override { return m_node; }
virtual int GetSubTrackCount() const { return 0; };
virtual IAnimTrack* GetSubTrack([[maybe_unused]] int nIndex) const { return 0; };
int GetSubTrackCount() const override { return 0; };
IAnimTrack* GetSubTrack([[maybe_unused]] int nIndex) const override { return 0; };
AZStd::string GetSubTrackName([[maybe_unused]] int nIndex) const override { return AZStd::string(); };
virtual void SetSubTrackName([[maybe_unused]] int nIndex, [[maybe_unused]] const char* name) { assert(0); }
void SetSubTrackName([[maybe_unused]] int nIndex, [[maybe_unused]] const char* name) override { assert(0); }
virtual const CAnimParamType& GetParameterType() const { return m_nParamType; };
virtual void SetParameterType(CAnimParamType type) { m_nParamType = type; };
const CAnimParamType& GetParameterType() const override { return m_nParamType; };
void SetParameterType(CAnimParamType type) override { m_nParamType = type; };
//////////////////////////////////////////////////////////////////////////
// for intrusive_ptr support
@@ -49,7 +49,7 @@ public:
void release() override;
//////////////////////////////////////////////////////////////////////////
virtual bool IsKeySelected(int key) const
bool IsKeySelected(int key) const override
{
AZ_Assert(key >= 0 && key < (int)m_keys.size(), "Key index is out of range");
if (m_keys[key].flags & AKEY_SELECTED)
@@ -59,7 +59,7 @@ public:
return false;
}
virtual void SelectKey(int key, bool select)
void SelectKey(int key, bool select) override
{
AZ_Assert(key >= 0 && key < (int)m_keys.size(), "Key index is out of range");
if (select)
@@ -96,59 +96,59 @@ public:
}
//! Return number of keys in track.
virtual int GetNumKeys() const { return static_cast<int>(m_keys.size()); };
int GetNumKeys() const override { return static_cast<int>(m_keys.size()); };
//! Return true if keys exists in this track
virtual bool HasKeys() const { return !m_keys.empty(); }
bool HasKeys() const override { return !m_keys.empty(); }
//! Set number of keys in track.
//! If needed adds empty keys at end or remove keys from end.
virtual void SetNumKeys(int numKeys) { m_keys.resize(numKeys); };
void SetNumKeys(int numKeys) override { m_keys.resize(numKeys); };
//! Remove specified key.
virtual void RemoveKey(int num);
void RemoveKey(int num) override;
int CreateKey(float time);
int CloneKey(int fromKey);
int CopyKey(IAnimTrack* pFromTrack, int nFromKey);
int CreateKey(float time) override;
int CloneKey(int fromKey) override;
int CopyKey(IAnimTrack* pFromTrack, int nFromKey) override;
//! Get key at specified location.
//! @param key Must be valid pointer to compatible key structure, to be filled with specified key location.
virtual void GetKey(int index, IKey* key) const;
void GetKey(int index, IKey* key) const override;
//! Get time of specified key.
//! @return key time.
virtual float GetKeyTime(int index) const;
float GetKeyTime(int index) const override;
//! Find key at given time.
//! @return Index of found key, or -1 if key with this time not found.
virtual int FindKey(float time);
int FindKey(float time) override;
//! Get flags of specified key.
//! @return key time.
virtual int GetKeyFlags(int index);
int GetKeyFlags(int index) override;
//! Set key at specified location.
//! @param key Must be valid pointer to compatible key structure.
virtual void SetKey(int index, IKey* key);
void SetKey(int index, IKey* key) override;
//! Set time of specified key.
virtual void SetKeyTime(int index, float time);
void SetKeyTime(int index, float time) override;
//! Set flags of specified key.
virtual void SetKeyFlags(int index, int flags);
void SetKeyFlags(int index, int flags) override;
//! Sort keys in track (after time of keys was modified).
virtual void SortKeys();
void SortKeys() override;
//! Get track flags.
virtual int GetFlags() { return m_flags; };
int GetFlags() override { return m_flags; };
//! Check if track is masked
virtual bool IsMasked([[maybe_unused]] const uint32 mask) const { return false; }
bool IsMasked([[maybe_unused]] const uint32 mask) const override { return false; }
//! Set track flags.
virtual void SetFlags(int flags)
void SetFlags(int flags) override
{
m_flags = flags;
}
@@ -157,37 +157,37 @@ public:
// Get track value at specified time.
// Interpolates keys if needed.
//////////////////////////////////////////////////////////////////////////
virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] float& value, [[maybe_unused]] bool applyMultiplier = false) { assert(0); };
virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] Vec3& value, [[maybe_unused]] bool applyMultiplier = false) { assert(0); };
virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] Vec4& value, [[maybe_unused]] bool applyMultiplier = false) { assert(0); };
virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] Quat& value) { assert(0); };
virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] bool& value) { assert(0); };
virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] Maestro::AssetBlends<AZ::Data::AssetData>& value) { assert(0); }
void GetValue([[maybe_unused]] float time, [[maybe_unused]] float& value, [[maybe_unused]] bool applyMultiplier = false) override { assert(0); };
void GetValue([[maybe_unused]] float time, [[maybe_unused]] Vec3& value, [[maybe_unused]] bool applyMultiplier = false) override { assert(0); };
void GetValue([[maybe_unused]] float time, [[maybe_unused]] Vec4& value, [[maybe_unused]] bool applyMultiplier = false) override { assert(0); };
void GetValue([[maybe_unused]] float time, [[maybe_unused]] Quat& value) override { assert(0); };
void GetValue([[maybe_unused]] float time, [[maybe_unused]] bool& value) override { assert(0); };
void GetValue([[maybe_unused]] float time, [[maybe_unused]] Maestro::AssetBlends<AZ::Data::AssetData>& value) override { assert(0); }
//////////////////////////////////////////////////////////////////////////
// Set track value at specified time.
// Adds new keys if required.
//////////////////////////////////////////////////////////////////////////
virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const float& value, [[maybe_unused]] bool bDefault = false, [[maybe_unused]] bool applyMultiplier = false) { assert(0); };
virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Vec3& value, [[maybe_unused]] bool bDefault = false, [[maybe_unused]] bool applyMultiplier = false) { assert(0); };
virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Vec4& value, [[maybe_unused]] bool bDefault = false, [[maybe_unused]] bool applyMultiplier = false) { assert(0); };
virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Quat& value, [[maybe_unused]] bool bDefault = false) { assert(0); };
virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const bool& value, [[maybe_unused]] bool bDefault = false) { assert(0); };
virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Maestro::AssetBlends<AZ::Data::AssetData>& value, [[maybe_unused]] bool bDefault = false) { assert(0); }
void SetValue([[maybe_unused]] float time, [[maybe_unused]] const float& value, [[maybe_unused]] bool bDefault = false, [[maybe_unused]] bool applyMultiplier = false) override { assert(0); };
void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Vec3& value, [[maybe_unused]] bool bDefault = false, [[maybe_unused]] bool applyMultiplier = false) override { assert(0); };
void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Vec4& value, [[maybe_unused]] bool bDefault = false, [[maybe_unused]] bool applyMultiplier = false) override { assert(0); };
void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Quat& value, [[maybe_unused]] bool bDefault = false) override { assert(0); };
void SetValue([[maybe_unused]] float time, [[maybe_unused]] const bool& value, [[maybe_unused]] bool bDefault = false) override { assert(0); };
void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Maestro::AssetBlends<AZ::Data::AssetData>& value, [[maybe_unused]] bool bDefault = false) override { assert(0); }
virtual void OffsetKeyPosition([[maybe_unused]] const Vec3& value) { assert(0); };
virtual void UpdateKeyDataAfterParentChanged([[maybe_unused]] const AZ::Transform& oldParentWorldTM, [[maybe_unused]] const AZ::Transform& newParentWorldTM) { assert(0); };
void OffsetKeyPosition([[maybe_unused]] const Vec3& value) override { assert(0); };
void UpdateKeyDataAfterParentChanged([[maybe_unused]] const AZ::Transform& oldParentWorldTM, [[maybe_unused]] const AZ::Transform& newParentWorldTM) override { assert(0); };
/** Assign active time range for this track.
*/
virtual void SetTimeRange(const Range& timeRange) { m_timeRange = timeRange; };
void SetTimeRange(const Range& timeRange) override { m_timeRange = timeRange; };
/** Serialize this animation track to XML.
Do not override this method, prefer to override SerializeKey.
*/
virtual bool Serialize(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks = true);
bool Serialize(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks = true) override;
virtual bool SerializeSelection(XmlNodeRef& xmlNode, bool bLoading, bool bCopySelected = false, float fTimeOffset = 0);
bool SerializeSelection(XmlNodeRef& xmlNode, bool bLoading, bool bCopySelected = false, float fTimeOffset = 0) override;
/** Serialize single key of this track.
@@ -204,33 +204,33 @@ public:
int GetActiveKey(float time, KeyType* key);
#ifdef MOVIESYSTEM_SUPPORT_EDITING
virtual ColorB GetCustomColor() const
ColorB GetCustomColor() const override
{ return m_customColor; }
virtual void SetCustomColor(ColorB color)
void SetCustomColor(ColorB color) override
{
m_customColor = color;
m_bCustomColorSet = true;
}
virtual bool HasCustomColor() const
bool HasCustomColor() const override
{ return m_bCustomColorSet; }
virtual void ClearCustomColor()
void ClearCustomColor() override
{ m_bCustomColorSet = false; }
#endif
virtual void GetKeyValueRange(float& fMin, float& fMax) const { fMin = m_fMinKeyValue; fMax = m_fMaxKeyValue; };
virtual void SetKeyValueRange(float fMin, float fMax){ m_fMinKeyValue = fMin; m_fMaxKeyValue = fMax; };
void GetKeyValueRange(float& fMin, float& fMax) const override { fMin = m_fMinKeyValue; fMax = m_fMaxKeyValue; };
void SetKeyValueRange(float fMin, float fMax) override{ m_fMinKeyValue = fMin; m_fMaxKeyValue = fMax; };
void SetMultiplier(float trackMultiplier) override
{
m_trackMultiplier = trackMultiplier;
}
void SetExpanded([[maybe_unused]] bool expanded)
void SetExpanded([[maybe_unused]] bool expanded) override
{
AZ_Assert(false, "Not expected to be used.");
}
bool GetExpanded() const
bool GetExpanded() const override
{
return false;
}
@@ -28,14 +28,14 @@ public:
CBoolTrack();
virtual AnimValueType GetValueType();
AnimValueType GetValueType() override;
virtual void GetValue(float time, bool& value);
virtual void SetValue(float time, const bool& value, bool bDefault = false);
void GetValue(float time, bool& value) override;
void SetValue(float time, const bool& value, bool bDefault = false) override;
void SerializeKey([[maybe_unused]] IBoolKey& key, [[maybe_unused]] XmlNodeRef& keyNode, [[maybe_unused]] bool bLoading) {};
void GetKeyInfo(int key, const char*& description, float& duration);
void SerializeKey([[maybe_unused]] IBoolKey& key, [[maybe_unused]] XmlNodeRef& keyNode, [[maybe_unused]] bool bLoading) override {};
void GetKeyInfo(int key, const char*& description, float& duration) override;
void SetDefaultValue(const bool bDefaultValue);
@@ -26,21 +26,21 @@ public:
//////////////////////////////////////////////////////////////////////////
// Overrides from CAnimNode
//////////////////////////////////////////////////////////////////////////
void SetName(const char* name);
void Animate(SAnimContext& ec);
void CreateDefaultTracks();
void OnReset();
void OnResume();
void SetName(const char* name) override;
void Animate(SAnimContext& ec) override;
void CreateDefaultTracks() override;
void OnReset() override;
void OnResume() override;
virtual unsigned int GetParamCount() const;
virtual CAnimParamType GetParamType(unsigned int nIndex) const;
unsigned int GetParamCount() const override;
CAnimParamType GetParamType(unsigned int nIndex) const override;
int GetDefaultKeyTangentFlags() const override;
static void Reflect(AZ::ReflectContext* context);
protected:
virtual bool GetParamInfoFromType(const CAnimParamType& paramId, SParamInfo& info) const;
bool GetParamInfoFromType(const CAnimParamType& paramId, SParamInfo& info) const override;
private:
float m_value;
@@ -36,41 +36,41 @@ public:
// Return Animation Node that owns this Track.
IAnimNode* GetNode() override { return m_node; }
virtual int GetSubTrackCount() const { return m_nDimensions; };
virtual IAnimTrack* GetSubTrack(int nIndex) const;
AZStd::string GetSubTrackName(int nIndex) const;
virtual void SetSubTrackName(int nIndex, const char* name);
int GetSubTrackCount() const override { return m_nDimensions; };
IAnimTrack* GetSubTrack(int nIndex) const override;
AZStd::string GetSubTrackName(int nIndex) const override;
void SetSubTrackName(int nIndex, const char* name) override;
virtual EAnimCurveType GetCurveType() { return eAnimCurveType_BezierFloat; };
virtual AnimValueType GetValueType() { return m_valueType; };
EAnimCurveType GetCurveType() override { return eAnimCurveType_BezierFloat; };
AnimValueType GetValueType() override { return m_valueType; };
virtual const CAnimParamType& GetParameterType() const { return m_nParamType; };
virtual void SetParameterType(CAnimParamType type) { m_nParamType = type; }
const CAnimParamType& GetParameterType() const override { return m_nParamType; };
void SetParameterType(CAnimParamType type) override { m_nParamType = type; }
virtual int GetNumKeys() const;
virtual void SetNumKeys([[maybe_unused]] int numKeys) { assert(0); };
virtual bool HasKeys() const;
virtual void RemoveKey(int num);
int GetNumKeys() const override;
void SetNumKeys([[maybe_unused]] int numKeys) override { assert(0); };
bool HasKeys() const override;
void RemoveKey(int num) override;
virtual void GetKeyInfo(int key, const char*& description, float& duration);
virtual int CreateKey([[maybe_unused]] float time) { assert(0); return 0; };
virtual int CloneKey([[maybe_unused]] int fromKey) { assert(0); return 0; };
virtual int CopyKey([[maybe_unused]] IAnimTrack* pFromTrack, [[maybe_unused]] int nFromKey) { assert(0); return 0; };
virtual void GetKey([[maybe_unused]] int index, [[maybe_unused]] IKey* key) const { assert(0); };
virtual float GetKeyTime(int index) const;
virtual int FindKey([[maybe_unused]] float time) { assert(0); return 0; };
virtual int GetKeyFlags([[maybe_unused]] int index) { assert(0); return 0; };
virtual void SetKey([[maybe_unused]] int index, [[maybe_unused]] IKey* key) { assert(0); };
virtual void SetKeyTime(int index, float time);
virtual void SetKeyFlags([[maybe_unused]] int index, [[maybe_unused]] int flags) { assert(0); };
virtual void SortKeys() { assert(0); };
void GetKeyInfo(int key, const char*& description, float& duration) override;
int CreateKey([[maybe_unused]] float time) override { assert(0); return 0; };
int CloneKey([[maybe_unused]] int fromKey) override { assert(0); return 0; };
int CopyKey([[maybe_unused]] IAnimTrack* pFromTrack, [[maybe_unused]] int nFromKey) override { assert(0); return 0; };
void GetKey([[maybe_unused]] int index, [[maybe_unused]] IKey* key) const override { assert(0); };
float GetKeyTime(int index) const override;
int FindKey([[maybe_unused]] float time) override { assert(0); return 0; };
int GetKeyFlags([[maybe_unused]] int index) override { assert(0); return 0; };
void SetKey([[maybe_unused]] int index, [[maybe_unused]] IKey* key) override { assert(0); };
void SetKeyTime(int index, float time) override;
void SetKeyFlags([[maybe_unused]] int index, [[maybe_unused]] int flags) override { assert(0); };
void SortKeys() override { assert(0); };
virtual bool IsKeySelected(int key) const;
virtual void SelectKey(int key, bool select);
bool IsKeySelected(int key) const override;
void SelectKey(int key, bool select) override;
virtual int GetFlags() { return m_flags; };
virtual bool IsMasked([[maybe_unused]] const uint32 mask) const { return false; }
virtual void SetFlags(int flags)
int GetFlags() override { return m_flags; };
bool IsMasked([[maybe_unused]] const uint32 mask) const override { return false; }
void SetFlags(int flags) override
{
m_flags = flags;
}
@@ -79,59 +79,59 @@ public:
// Get track value at specified time.
// Interpolates keys if needed.
//////////////////////////////////////////////////////////////////////////
virtual void GetValue(float time, float& value, bool applyMultiplier = false);
virtual void GetValue(float time, Vec3& value, bool applyMultiplier = false);
virtual void GetValue(float time, Vec4& value, bool applyMultiplier = false);
virtual void GetValue(float time, Quat& value);
virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] bool& value) { assert(0); };
virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] Maestro::AssetBlends<AZ::Data::AssetData>& value) { assert(0); }
void GetValue(float time, float& value, bool applyMultiplier = false) override;
void GetValue(float time, Vec3& value, bool applyMultiplier = false) override;
void GetValue(float time, Vec4& value, bool applyMultiplier = false) override;
void GetValue(float time, Quat& value) override;
void GetValue([[maybe_unused]] float time, [[maybe_unused]] bool& value) override { assert(0); };
void GetValue([[maybe_unused]] float time, [[maybe_unused]] Maestro::AssetBlends<AZ::Data::AssetData>& value) override { assert(0); }
//////////////////////////////////////////////////////////////////////////
// Set track value at specified time.
// Adds new keys if required.
//////////////////////////////////////////////////////////////////////////
virtual void SetValue(float time, const float& value, bool bDefault = false, bool applyMultiplier = false);
virtual void SetValue(float time, const Vec3& value, bool bDefault = false, bool applyMultiplier = false);
void SetValue(float time, const Vec4& value, bool bDefault = false, bool applyMultiplier = false);
virtual void SetValue(float time, const Quat& value, bool bDefault = false);
virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const bool& value, [[maybe_unused]] bool bDefault = false) { assert(0); };
virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Maestro::AssetBlends<AZ::Data::AssetData>& value, [[maybe_unused]] bool bDefault = false) { assert(0); }
void SetValue(float time, const float& value, bool bDefault = false, bool applyMultiplier = false) override;
void SetValue(float time, const Vec3& value, bool bDefault = false, bool applyMultiplier = false) override;
void SetValue(float time, const Vec4& value, bool bDefault = false, bool applyMultiplier = false) override;
void SetValue(float time, const Quat& value, bool bDefault = false) override;
void SetValue([[maybe_unused]] float time, [[maybe_unused]] const bool& value, [[maybe_unused]] bool bDefault = false) override { assert(0); };
void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Maestro::AssetBlends<AZ::Data::AssetData>& value, [[maybe_unused]] bool bDefault = false) override { assert(0); }
virtual void OffsetKeyPosition(const Vec3& value);
virtual void UpdateKeyDataAfterParentChanged(const AZ::Transform& oldParentWorldTM, const AZ::Transform& newParentWorldTM);
void OffsetKeyPosition(const Vec3& value) override;
void UpdateKeyDataAfterParentChanged(const AZ::Transform& oldParentWorldTM, const AZ::Transform& newParentWorldTM) override;
virtual void SetTimeRange(const Range& timeRange);
void SetTimeRange(const Range& timeRange) override;
virtual bool Serialize(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks = true);
bool Serialize(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks = true) override;
virtual bool SerializeSelection(XmlNodeRef& xmlNode, bool bLoading, bool bCopySelected = false, float fTimeOffset = 0);
bool SerializeSelection(XmlNodeRef& xmlNode, bool bLoading, bool bCopySelected = false, float fTimeOffset = 0) override;
virtual int NextKeyByTime(int key) const;
int NextKeyByTime(int key) const override;
void SetSubTrackName(const int i, const AZStd::string& name) { assert (i < MAX_SUBTRACKS); m_subTrackNames[i] = name; }
#ifdef MOVIESYSTEM_SUPPORT_EDITING
virtual ColorB GetCustomColor() const
ColorB GetCustomColor() const override
{ return m_customColor; }
virtual void SetCustomColor(ColorB color)
void SetCustomColor(ColorB color) override
{
m_customColor = color;
m_bCustomColorSet = true;
}
virtual bool HasCustomColor() const
bool HasCustomColor() const override
{ return m_bCustomColorSet; }
virtual void ClearCustomColor()
void ClearCustomColor() override
{ m_bCustomColorSet = false; }
#endif
virtual void GetKeyValueRange(float& fMin, float& fMax) const
void GetKeyValueRange(float& fMin, float& fMax) const override
{
if (GetSubTrackCount() > 0)
{
m_subTracks[0]->GetKeyValueRange(fMin, fMax);
}
};
virtual void SetKeyValueRange(float fMin, float fMax)
void SetKeyValueRange(float fMin, float fMax) override
{
for (int i = 0; i < m_nDimensions; ++i)
{
@@ -33,9 +33,9 @@ public:
//////////////////////////////////////////////////////////////////////////
// Overrides of IAnimTrack.
//////////////////////////////////////////////////////////////////////////
void GetKeyInfo(int key, const char*& description, float& duration);
void SerializeKey(IEventKey& key, XmlNodeRef& keyNode, bool bLoading);
void SetKey(int index, IKey* key);
void GetKeyInfo(int key, const char*& description, float& duration) override;
void SerializeKey(IEventKey& key, XmlNodeRef& keyNode, bool bLoading) override;
void SetKey(int index, IKey* key) override;
void InitPostLoad(IAnimSequence* sequence) override;
static void Reflect(AZ::ReflectContext* context);
@@ -26,19 +26,19 @@ public:
CAnimMaterialNode(const int id);
static void Initialize();
virtual void SetName(const char* name);
void SetName(const char* name) override;
//////////////////////////////////////////////////////////////////////////
// Overrides from CAnimNode
//////////////////////////////////////////////////////////////////////////
void Animate(SAnimContext& ec);
void Animate(SAnimContext& ec) override;
void AddTrack(IAnimTrack* track) override;
//////////////////////////////////////////////////////////////////////////
// Supported tracks description.
//////////////////////////////////////////////////////////////////////////
virtual unsigned int GetParamCount() const;
virtual CAnimParamType GetParamType(unsigned int nIndex) const;
unsigned int GetParamCount() const override;
CAnimParamType GetParamType(unsigned int nIndex) const override;
AZStd::string GetParamName(const CAnimParamType& paramType) const override;
virtual void GetKeyValueRange(float& fMin, float& fMax) const { fMin = m_fMinKeyValue; fMax = m_fMaxKeyValue; };
@@ -49,7 +49,7 @@ public:
static void Reflect(AZ::ReflectContext* context);
protected:
virtual bool GetParamInfoFromType(const CAnimParamType& paramId, SParamInfo& info) const;
bool GetParamInfoFromType(const CAnimParamType& paramId, SParamInfo& info) const override;
void UpdateDynamicParamsInternal() override;
private:
+69 -69
View File
@@ -42,7 +42,7 @@ class CLightAnimWrapper
{
public:
// ILightAnimWrapper interface
virtual bool Resolve();
bool Resolve() override;
public:
static CLightAnimWrapper* Create(const char* name);
@@ -80,116 +80,116 @@ public:
CMovieSystem(ISystem* system);
CMovieSystem();
void Release() { delete this; };
void Release() override { delete this; };
void SetUser(IMovieUser* pUser) { m_pUser = pUser; }
IMovieUser* GetUser() { return m_pUser; }
void SetUser(IMovieUser* pUser) override { m_pUser = pUser; }
IMovieUser* GetUser() override { return m_pUser; }
ISystem* GetSystem() { return m_pSystem; }
ISystem* GetSystem() override { return m_pSystem; }
IAnimSequence* CreateSequence(const char* sequence, bool bLoad = false, uint32 id = 0, SequenceType = kSequenceTypeDefault, AZ::EntityId entityId = AZ::EntityId());
IAnimSequence* CreateSequence(const char* sequence, bool bLoad = false, uint32 id = 0, SequenceType = kSequenceTypeDefault, AZ::EntityId entityId = AZ::EntityId()) override;
void AddSequence(IAnimSequence* pSequence);
void RemoveSequence(IAnimSequence* pSequence);
void AddSequence(IAnimSequence* pSequence) override;
void RemoveSequence(IAnimSequence* pSequence) override;
IAnimSequence* FindLegacySequenceByName(const char* sequence) const override;
IAnimSequence* FindSequence(const AZ::EntityId& componentEntitySequenceId) const override;
IAnimSequence* FindSequenceById(uint32 id) const override;
IAnimSequence* GetSequence(int i) const;
int GetNumSequences() const;
IAnimSequence* GetPlayingSequence(int i) const;
int GetNumPlayingSequences() const;
bool IsCutScenePlaying() const;
IAnimSequence* GetSequence(int i) const override;
int GetNumSequences() const override;
IAnimSequence* GetPlayingSequence(int i) const override;
int GetNumPlayingSequences() const override;
bool IsCutScenePlaying() const override;
uint32 GrabNextSequenceId() override
{ return m_nextSequenceId++; }
void OnSetSequenceId(uint32 sequenceId) override;
int OnSequenceRenamed(const char* before, const char* after);
int OnCameraRenamed(const char* before, const char* after);
int OnSequenceRenamed(const char* before, const char* after) override;
int OnCameraRenamed(const char* before, const char* after) override;
bool AddMovieListener(IAnimSequence* pSequence, IMovieListener* pListener);
bool RemoveMovieListener(IAnimSequence* pSequence, IMovieListener* pListener);
bool AddMovieListener(IAnimSequence* pSequence, IMovieListener* pListener) override;
bool RemoveMovieListener(IAnimSequence* pSequence, IMovieListener* pListener) override;
void RemoveAllSequences();
void RemoveAllSequences() override;
//////////////////////////////////////////////////////////////////////////
// Sequence playback.
//////////////////////////////////////////////////////////////////////////
void PlaySequence(const char* sequence, IAnimSequence* parentSeq = NULL, bool bResetFX = true,
bool bTrackedSequence = false, float startTime = -FLT_MAX, float endTime = -FLT_MAX);
bool bTrackedSequence = false, float startTime = -FLT_MAX, float endTime = -FLT_MAX) override;
void PlaySequence(IAnimSequence* seq, IAnimSequence* parentSeq = NULL, bool bResetFX = true,
bool bTrackedSequence = false, float startTime = -FLT_MAX, float endTime = -FLT_MAX);
void PlayOnLoadSequences();
bool bTrackedSequence = false, float startTime = -FLT_MAX, float endTime = -FLT_MAX) override;
void PlayOnLoadSequences() override;
bool StopSequence(const char* sequence);
bool StopSequence(IAnimSequence* seq);
bool AbortSequence(IAnimSequence* seq, bool bLeaveTime = false);
bool StopSequence(const char* sequence) override;
bool StopSequence(IAnimSequence* seq) override;
bool AbortSequence(IAnimSequence* seq, bool bLeaveTime = false) override;
void StopAllSequences();
void StopAllCutScenes();
void StopAllSequences() override;
void StopAllCutScenes() override;
void Pause(bool bPause);
void Reset(bool bPlayOnReset, bool bSeekToStart);
void StillUpdate();
void PreUpdate(const float dt);
void PostUpdate(const float dt);
void Render();
void Reset(bool bPlayOnReset, bool bSeekToStart) override;
void StillUpdate() override;
void PreUpdate(const float dt) override;
void PostUpdate(const float dt) override;
void Render() override;
void EnableFixedStepForCapture(float step);
void DisableFixedStepForCapture();
void StartCapture(const ICaptureKey& key, int frame);
void EndCapture();
void ControlCapture();
bool IsCapturing() const;
void EnableFixedStepForCapture(float step) override;
void DisableFixedStepForCapture() override;
void StartCapture(const ICaptureKey& key, int frame) override;
void EndCapture() override;
void ControlCapture() override;
bool IsCapturing() const override;
bool IsPlaying(IAnimSequence* seq) const;
bool IsPlaying(IAnimSequence* seq) const override;
void Pause();
void Resume();
void Pause() override;
void Resume() override;
virtual void PauseCutScenes();
virtual void ResumeCutScenes();
void PauseCutScenes() override;
void ResumeCutScenes() override;
void SetRecording(bool recording) { m_bRecording = recording; };
bool IsRecording() const { return m_bRecording; };
void SetRecording(bool recording) override { m_bRecording = recording; };
bool IsRecording() const override { return m_bRecording; };
void EnableCameraShake(bool bEnabled){ m_bEnableCameraShake = bEnabled; };
void EnableCameraShake(bool bEnabled) override{ m_bEnableCameraShake = bEnabled; };
void SetCallback(IMovieCallback* pCallback) { m_pCallback = pCallback; }
IMovieCallback* GetCallback() { return m_pCallback; }
void SetCallback(IMovieCallback* pCallback) override { m_pCallback = pCallback; }
IMovieCallback* GetCallback() override { return m_pCallback; }
void Callback(IMovieCallback::ECallbackReason Reason, IAnimNode* pNode);
const SCameraParams& GetCameraParams() const { return m_ActiveCameraParams; }
void SetCameraParams(const SCameraParams& Params);
const SCameraParams& GetCameraParams() const override { return m_ActiveCameraParams; }
void SetCameraParams(const SCameraParams& Params) override;
void SendGlobalEvent(const char* pszEvent);
void SetSequenceStopBehavior(ESequenceStopBehavior behavior);
IMovieSystem::ESequenceStopBehavior GetSequenceStopBehavior();
void SendGlobalEvent(const char* pszEvent) override;
void SetSequenceStopBehavior(ESequenceStopBehavior behavior) override;
IMovieSystem::ESequenceStopBehavior GetSequenceStopBehavior() override;
float GetPlayingTime(IAnimSequence* pSeq);
bool SetPlayingTime(IAnimSequence* pSeq, float fTime);
float GetPlayingTime(IAnimSequence* pSeq) override;
bool SetPlayingTime(IAnimSequence* pSeq, float fTime) override;
float GetPlayingSpeed(IAnimSequence* pSeq);
bool SetPlayingSpeed(IAnimSequence* pSeq, float fTime);
float GetPlayingSpeed(IAnimSequence* pSeq) override;
bool SetPlayingSpeed(IAnimSequence* pSeq, float fTime) override;
bool GetStartEndTime(IAnimSequence* pSeq, float& fStartTime, float& fEndTime);
bool SetStartEndTime(IAnimSequence* pSeq, const float fStartTime, const float fEndTime);
bool GetStartEndTime(IAnimSequence* pSeq, float& fStartTime, float& fEndTime) override;
bool SetStartEndTime(IAnimSequence* pSeq, const float fStartTime, const float fEndTime) override;
void GoToFrame(const char* seqName, float targetFrame);
void GoToFrame(const char* seqName, float targetFrame) override;
const char* GetOverrideCamName() const
const char* GetOverrideCamName() const override
{ return m_mov_overrideCam->GetString(); }
virtual bool IsPhysicsEventsEnabled() const { return m_bPhysicsEventsEnabled; }
virtual void EnablePhysicsEvents(bool enable) { m_bPhysicsEventsEnabled = enable; }
bool IsPhysicsEventsEnabled() const override { return m_bPhysicsEventsEnabled; }
void EnablePhysicsEvents(bool enable) override { m_bPhysicsEventsEnabled = enable; }
virtual void EnableBatchRenderMode(bool bOn) { m_bBatchRenderMode = bOn; }
virtual bool IsInBatchRenderMode() const { return m_bBatchRenderMode; }
void EnableBatchRenderMode(bool bOn) override { m_bBatchRenderMode = bOn; }
bool IsInBatchRenderMode() const override { return m_bBatchRenderMode; }
void SerializeNodeType(AnimNodeType& animNodeType, XmlNodeRef& xmlNode, bool bLoading, const uint version, int flags) override;
virtual void LoadParamTypeFromXml(CAnimParamType& animParamType, const XmlNodeRef& xmlNode, const uint version) override;
virtual void SaveParamTypeToXml(const CAnimParamType& animParamType, XmlNodeRef& xmlNode) override;
virtual void SerializeParamType(CAnimParamType& animParamType, XmlNodeRef& xmlNode, bool bLoading, const uint version);
void LoadParamTypeFromXml(CAnimParamType& animParamType, const XmlNodeRef& xmlNode, const uint version) override;
void SaveParamTypeToXml(const CAnimParamType& animParamType, XmlNodeRef& xmlNode) override;
void SerializeParamType(CAnimParamType& animParamType, XmlNodeRef& xmlNode, bool bLoading, const uint version) override;
static const char* GetParamTypeName(const CAnimParamType& animParamType);
@@ -226,8 +226,8 @@ private:
void UpdateInternal(const float dt, const bool bPreUpdate);
#ifdef MOVIESYSTEM_SUPPORT_EDITING
virtual AnimNodeType GetNodeTypeFromString(const char* pString) const;
virtual CAnimParamType GetParamTypeFromString(const char* pString) const;
AnimNodeType GetNodeTypeFromString(const char* pString) const override;
CAnimParamType GetParamTypeFromString(const char* pString) const override;
#endif
ISystem* m_pSystem;
@@ -89,13 +89,13 @@ namespace {
AZ::Quaternion quat = LYQuaternionToAZQuaternion(localRotation);
AZ::TransformBus::Event(m_cameraEntityId, &AZ::TransformBus::Events::SetLocalRotationQuaternion, quat);
}
float GetFoV() const
float GetFoV() const override
{
float retFoV = DEFAULT_FOV;
Camera::CameraRequestBus::EventResult(retFoV, m_cameraEntityId, &Camera::CameraComponentRequests::GetFovDegrees);
return retFoV;
}
float GetNearZ() const
float GetNearZ() const override
{
float retNearZ = DEFAULT_NEAR;
Camera::CameraRequestBus::EventResult(retNearZ, m_cameraEntityId, &Camera::CameraComponentRequests::GetNearClipDistance);
+10 -10
View File
@@ -65,12 +65,12 @@ public:
//////////////////////////////////////////////////////////////////////////
// Overrides from CAnimNode
//////////////////////////////////////////////////////////////////////////
void Animate(SAnimContext& ec);
void CreateDefaultTracks();
void Animate(SAnimContext& ec) override;
void CreateDefaultTracks() override;
virtual void Serialize(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks);
void Serialize(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks) override;
virtual void Activate(bool bActivate);
void Activate(bool bActivate) override;
// overridden from IAnimNode/CAnimNode
void OnStart() override;
@@ -80,11 +80,11 @@ public:
void OnLoop() override;
//////////////////////////////////////////////////////////////////////////
virtual unsigned int GetParamCount() const;
virtual CAnimParamType GetParamType(unsigned int nIndex) const;
unsigned int GetParamCount() const override;
CAnimParamType GetParamType(unsigned int nIndex) const override;
virtual void PrecacheStatic(float startTime) override;
virtual void PrecacheDynamic(float time) override;
void PrecacheStatic(float startTime) override;
void PrecacheDynamic(float time) override;
static void Reflect(AZ::ReflectContext* context);
@@ -92,7 +92,7 @@ public:
static IAnimSequence* GetSequenceFromSequenceKey(const ISequenceKey& sequenceKey);
protected:
virtual bool GetParamInfoFromType(const CAnimParamType& paramId, SParamInfo& info) const;
bool GetParamInfoFromType(const CAnimParamType& paramId, SParamInfo& info) const override;
void ResetSounds() override;
void ReleaseSounds(); // Stops audio
@@ -111,7 +111,7 @@ private:
void InterpolateCameras(SCameraParams& retInterpolatedCameraParams, ISceneCamera* firstCamera,
ISelectKey& firstKey, ISelectKey& secondKey, float time);
virtual void InitializeTrackDefaultValue(IAnimTrack* pTrack, const CAnimParamType& paramType) override;
void InitializeTrackDefaultValue(IAnimTrack* pTrack, const CAnimParamType& paramType) override;
// Cached parameters of node at given time.
float m_time = 0.0f;
@@ -30,8 +30,8 @@ public:
//-----------------------------------------------------------------------------
//! IAnimTrack Method Overriding.
//-----------------------------------------------------------------------------
virtual void GetKeyInfo(int key, const char*& description, float& duration);
virtual void SerializeKey(IScreenFaderKey& key, XmlNodeRef& keyNode, bool bLoading);
void GetKeyInfo(int key, const char*& description, float& duration) override;
void SerializeKey(IScreenFaderKey& key, XmlNodeRef& keyNode, bool bLoading) override;
void SetFlags(int flags) override;
void PreloadTextures();
@@ -29,11 +29,11 @@ public:
AZ_CLASS_ALLOCATOR(CSoundTrack, AZ::SystemAllocator, 0);
AZ_RTTI(CSoundTrack, "{B87D8805-F583-4154-B554-45518BC487F4}", IAnimTrack);
void GetKeyInfo(int key, const char*& description, float& duration);
void SerializeKey(ISoundKey& key, XmlNodeRef& keyNode, bool bLoading);
void GetKeyInfo(int key, const char*& description, float& duration) override;
void SerializeKey(ISoundKey& key, XmlNodeRef& keyNode, bool bLoading) override;
//! Check if track is masked
virtual bool IsMasked(const uint32 mask) const { return (mask & eTrackMask_MaskSound) != 0; }
bool IsMasked(const uint32 mask) const override { return (mask & eTrackMask_MaskSound) != 0; }
bool UsesMute() const override { return true; }
@@ -70,9 +70,9 @@ public:
//////////////////////////////////////////////////////////////////////////
// Overrides of IAnimTrack.
//////////////////////////////////////////////////////////////////////////
void GetKeyInfo(int key, const char*& description, float& duration);
void SerializeKey(IEventKey& key, XmlNodeRef& keyNode, bool bLoading);
void SetKey(int index, IKey* key);
void GetKeyInfo(int key, const char*& description, float& duration) override;
void SerializeKey(IEventKey& key, XmlNodeRef& keyNode, bool bLoading) override;
void SetKey(int index, IKey* key) override;
void InitPostLoad(IAnimSequence* sequence) override;
static void Reflect(AZ::ReflectContext* context);
@@ -78,7 +78,7 @@ namespace Maestro
//////////////////////////////////////////////////////////////////////////
// TickBus - used to refresh property displays when values are animated
virtual void OnTick(float deltaTime, AZ::ScriptTimePoint time);
void OnTick(float deltaTime, AZ::ScriptTimePoint time) override;
//////////////////////////////////////////////////////////////////////////
// TODO - this should be on a Bus, right?