Code/Editor
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -19,8 +19,7 @@
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
CDirectorNodeAnimator::CDirectorNodeAnimator(CTrackViewAnimNode* pDirectorNode)
|
||||
: m_pDirectorNode(pDirectorNode)
|
||||
CDirectorNodeAnimator::CDirectorNodeAnimator([[maybe_unused]] CTrackViewAnimNode* pDirectorNode)
|
||||
{
|
||||
assert(m_pDirectorNode != nullptr);
|
||||
}
|
||||
@@ -139,7 +138,6 @@ void CDirectorNodeAnimator::ForEachActiveSequence(const SAnimContext& ac, CTrack
|
||||
const bool bHandleOtherKeys, std::function<void(CTrackViewSequence*, const SAnimContext&)> animateFunction,
|
||||
std::function<void(CTrackViewSequence*, const SAnimContext&)> resetFunction)
|
||||
{
|
||||
const float time = ac.time;
|
||||
const unsigned int numKeys = pSequenceTrack->GetKeyCount();
|
||||
|
||||
if (bHandleOtherKeys)
|
||||
|
||||
@@ -34,7 +34,5 @@ private:
|
||||
void ForEachActiveSequence(const SAnimContext& ac, CTrackViewTrack* pSequenceTrack,
|
||||
const bool bHandleOtherKeys, std::function<void(CTrackViewSequence*, const SAnimContext&)> animateFunction,
|
||||
std::function<void(CTrackViewSequence*, const SAnimContext&)> resetFunction);
|
||||
|
||||
CTrackViewAnimNode* m_pDirectorNode;
|
||||
};
|
||||
#endif // CRYINCLUDE_EDITOR_TRACKVIEW_DIRECTORNODEANIMATOR_H
|
||||
|
||||
@@ -1820,7 +1820,6 @@ bool CTrackViewAnimNode::IsDisabled() const
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CTrackViewAnimNode::SetPos(const Vec3& position)
|
||||
{
|
||||
const float time = GetSequence()->GetTime();
|
||||
CTrackViewTrack* track = GetTrackForParameter(AnimParamType::Position);
|
||||
|
||||
if (track)
|
||||
|
||||
@@ -199,7 +199,6 @@ void CTrackViewDopeSheetBase::SetTimeRange(float start, float end)
|
||||
void CTrackViewDopeSheetBase::SetTimeScale(float timeScale, float fAnchorTime)
|
||||
{
|
||||
const double fOldOffset = -fAnchorTime * m_timeScale;
|
||||
const double fOldScale = m_timeScale;
|
||||
|
||||
timeScale = std::max(timeScale, 0.001f);
|
||||
timeScale = std::min(timeScale, 100000.0f);
|
||||
@@ -1426,8 +1425,6 @@ void CTrackViewDopeSheetBase::OnCaptureChanged()
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
bool CTrackViewDopeSheetBase::IsOkToAddKeyHere(const CTrackViewTrack* pTrack, float time) const
|
||||
{
|
||||
const float timeEpsilon = 0.05f;
|
||||
|
||||
for (unsigned int i = 0; i < pTrack->GetKeyCount(); ++i)
|
||||
{
|
||||
const CTrackViewKeyConstHandle& keyHandle = pTrack->GetKey(i);
|
||||
@@ -2152,8 +2149,6 @@ void CTrackViewDopeSheetBase::AcceptUndo()
|
||||
{
|
||||
if (CUndo::IsRecording())
|
||||
{
|
||||
const QPoint mousePos = mapFromGlobal(QCursor::pos());
|
||||
|
||||
CTrackViewSequence* sequence = GetIEditor()->GetAnimation()->GetSequence();
|
||||
|
||||
if (m_mouseMode == eTVMouseMode_Paste)
|
||||
@@ -2623,7 +2618,6 @@ void CTrackViewDopeSheetBase::DrawBoolTrack(const Range& timeRange, QPainter* pa
|
||||
{
|
||||
int x0 = TimeToClient(timeRange.start);
|
||||
float t0 = timeRange.start;
|
||||
QRect trackRect;
|
||||
|
||||
const QBrush prevBrush = painter->brush();
|
||||
painter->setBrush(m_visibilityBrush);
|
||||
@@ -2752,7 +2746,6 @@ void CTrackViewDopeSheetBase::DrawKeys(CTrackViewTrack* pTrack, QPainter* painte
|
||||
}
|
||||
|
||||
int x1 = x + kDefaultWidthForDescription;
|
||||
CTrackViewKeyHandle nextKey = keyHandle.GetNextKey();
|
||||
|
||||
int nextKeyIndex = i + 1;
|
||||
|
||||
|
||||
@@ -22,13 +22,11 @@ class CTrackViewKeyConstHandle
|
||||
{
|
||||
public:
|
||||
CTrackViewKeyConstHandle()
|
||||
: m_bIsValid(false)
|
||||
, m_keyIndex(0)
|
||||
: m_keyIndex(0)
|
||||
, m_pTrack(nullptr) {}
|
||||
|
||||
CTrackViewKeyConstHandle(const CTrackViewTrack* pTrack, unsigned int keyIndex)
|
||||
: m_bIsValid(true)
|
||||
, m_keyIndex(keyIndex)
|
||||
: m_keyIndex(keyIndex)
|
||||
, m_pTrack(pTrack) {}
|
||||
|
||||
void GetKey(IKey* pKey) const;
|
||||
@@ -36,7 +34,6 @@ public:
|
||||
const CTrackViewTrack* GetTrack() const { return m_pTrack; }
|
||||
|
||||
private:
|
||||
bool m_bIsValid;
|
||||
unsigned int m_keyIndex;
|
||||
const CTrackViewTrack* m_pTrack;
|
||||
};
|
||||
|
||||
@@ -202,7 +202,6 @@ private:
|
||||
|
||||
// Drag and drop
|
||||
CTrackViewAnimNodeBundle m_draggedNodes;
|
||||
CTrackViewAnimNode* m_pDragTarget;
|
||||
|
||||
std::unordered_map<unsigned int, CAnimParamType> m_menuParamTypeMap;
|
||||
std::unordered_map<const CTrackViewNode*, CRecord*> m_nodeToRecordMap;
|
||||
|
||||
@@ -135,9 +135,7 @@ CTrackViewKeyHandle CTrackViewSequence::FindSingleSelectedKey()
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CTrackViewSequence::OnEntityComponentPropertyChanged(AZ::ComponentId changedComponentId)
|
||||
{
|
||||
const AZ::EntityId entityId = *AzToolsFramework::PropertyEditorEntityChangeNotificationBus::GetCurrentBusId();
|
||||
|
||||
{
|
||||
// find the component node for this changeComponentId if it exists
|
||||
for (int i = m_pAnimSequence->GetNodeCount(); --i >= 0;)
|
||||
{
|
||||
|
||||
@@ -611,7 +611,6 @@ void CTrackViewSplineCtrl::mouseMoveEvent(QMouseEvent* event)
|
||||
|
||||
CTrackViewSequenceNotificationContext context(pSequence);
|
||||
|
||||
QPoint cMousePosPrev = m_cMousePos;
|
||||
m_cMousePos = point;
|
||||
|
||||
if (m_editMode == NothingMode)
|
||||
|
||||
Reference in New Issue
Block a user