!XT (BREAK-16) (Sandbox) Remove double-newlines at the end of files.
[CRYENGINE.git] / Code / Sandbox / Plugins / EditorAnimation / AnimationCompressionManager.h
blob50306f7031d660f559d5386b6dbae39d82449a46
1 // Copyright 2001-2018 Crytek GmbH / Crytek Group. All rights reserved.
3 #pragma once
5 #include <IBackgroundTaskManager.h>
6 #include <IAnimationCompressionManager.h>
7 #include <IEditor.h>
8 #include <CrySystem/File/IFileChangeMonitor.h>
10 class CBackgroundTaskUpdateLocalAnimations;
11 class CBackgroundTaskCompressCAF;
12 class CAnimationCompressionManager
13 : public IAnimationCompressionManager
14 , public IFileChangeListener
15 , public IEditorNotifyListener
17 public:
18 CAnimationCompressionManager();
19 ~CAnimationCompressionManager();
21 bool IsEnabled() const override;
22 void UpdateLocalAnimations() override;
23 void QueueAnimationCompression(const char* animationName) override;
25 void OnEditorNotifyEvent(EEditorNotifyEvent ev) override;
26 private:
27 class CBackgroundTaskCompressCAF;
28 class CBackgroundTaskUpdateLocalAnimations;
29 class CBackgroundTaskImportAnimation;
30 class CBackgroundTaskReloadCHRPARAMS;
31 class CBackgroundTaskCleanUpAnimations;
33 void Start();
34 void OnFileChange(const char* filename, EChangeType eType) override;
36 void OnCAFCompressed(CBackgroundTaskCompressCAF* pTask);
37 void OnImportTriggered(const char* animationPath);
38 void OnReloadCHRPARAMSComplete(CBackgroundTaskReloadCHRPARAMS* pTask);
40 struct SAnimationInWorks
42 CBackgroundTaskCompressCAF* pTask;
45 CBackgroundTaskUpdateLocalAnimations* m_pRescanTask;
46 CBackgroundTaskReloadCHRPARAMS* m_pReloadCHRPARAMSTask;
47 typedef std::map<string, SAnimationInWorks> TAnimationMap;
48 TAnimationMap m_animationsInWork;
49 std::vector<SAnimationInWorks> m_canceledAnimations;
50 bool m_enabled;