TrackViewEventNode.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #ifndef CRYINCLUDE_EDITOR_TRACKVIEW_TRACKVIEWEVENTNODE_H
  9. #define CRYINCLUDE_EDITOR_TRACKVIEW_TRACKVIEWEVENTNODE_H
  10. #pragma once
  11. #include "IMovieSystem.h"
  12. #include "TrackViewAnimNode.h"
  13. ////////////////////////////////////////////////////////////////////////////
  14. // This class represents an IAnimNode deditcated to firing Track Events
  15. ////////////////////////////////////////////////////////////////////////////
  16. class CTrackViewEventNode
  17. : public CTrackViewAnimNode
  18. , public ITrackEventListener
  19. {
  20. public:
  21. CTrackViewEventNode(IAnimSequence* pSequence, IAnimNode* pAnimNode, CTrackViewNode* pParentNode);
  22. virtual ~CTrackViewEventNode();
  23. // overrides from ITrackEventListener
  24. void OnTrackEvent(IAnimSequence* pSequence, int reason, const char* event, void* pUserData) override;
  25. protected:
  26. // updates existing keys using fromName events, changes them to use the toName events instead
  27. void RenameTrackEvent(const char* fromName, const char* toName);
  28. // updates existing keys using removedEventName events to use the empty string (representing no event)
  29. void RemoveTrackEvent(const char* removedEventName);
  30. };
  31. #endif // CRYINCLUDE_EDITOR_TRACKVIEW_TRACKVIEWEVENTNODE_H