TrackViewEventNode.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  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. #pragma once
  9. #include <IMovieSystem.h>
  10. #include "TrackViewAnimNode.h"
  11. //////////////////////////////////////////////////////////////////////////
  12. // This class represents an IAnimNode dedicated to firing Track Events
  13. //////////////////////////////////////////////////////////////////////////
  14. class CTrackViewEventNode
  15. : public CTrackViewAnimNode
  16. , public ITrackEventListener
  17. {
  18. public:
  19. CTrackViewEventNode(IAnimSequence* pSequence, IAnimNode* pAnimNode, CTrackViewNode* pParentNode);
  20. virtual ~CTrackViewEventNode();
  21. // overrides from ITrackEventListener
  22. void OnTrackEvent(IAnimSequence* pSequence, int reason, const char* event, void* pUserData) override;
  23. protected:
  24. // updates existing keys using fromName events, changes them to use the toName events instead
  25. void RenameTrackEvent(const char* fromName, const char* toName);
  26. // updates existing keys using removedEventName events to use the empty string (representing no event)
  27. void RemoveTrackEvent(const char* removedEventName);
  28. };