Plasma Engine  2.0
Loading...
Searching...
No Matches
AnimationClipAssetWindow.moc.h
1#pragma once
2
3#include <EditorEngineProcessFramework/EngineProcess/ViewRenderSettings.h>
4#include <EditorFramework/DocumentWindow/EngineDocumentWindow.moc.h>
5#include <EditorPluginAssets/AnimationClipAsset/AnimationClipAsset.h>
6#include <Foundation/Time/Clock.h>
7#include <GuiFoundation/Widgets/Curve1DEditorWidget.moc.h>
8#include <ToolsFoundation/Object/DocumentObjectManager.h>
9
15
17{
18 Q_OBJECT
19
20public:
23
24 plAnimationClipAssetDocument* GetAnimationClipDocument();
25 virtual const char* GetWindowLayoutGroupName() const override { return "AnimationClipAsset"; }
26
27protected:
28 virtual void InternalRedraw() override;
29 virtual void ProcessMessageEventHandler(const plEditorEngineDocumentMsg* pMsg) override;
30
31 virtual void CommonAssetUiEventHandler(const plCommonAssetUiState& e) override;
32 void CommandHistoryEventHandler(const plCommandHistoryEvent& e);
33
34protected Q_SLOTS:
35 void OnScrubberPosChangedEvent(plUInt64 uiNewScrubberTickPos);
36
38 // Event track editor events
39 void onEventTrackInsertCpAt(plInt64 tickX, QString value);
40 void onEventTrackCpMoved(plUInt32 cpIdx, plInt64 iTickX);
41 void onEventTrackCpDeleted(plUInt32 cpIdx);
42 void onEventTrackBeginOperation(QString name);
43 void onEventTrackEndOperation(bool commit);
44 void onEventTrackBeginCpChanges(QString name);
45 void onEventTrackEndCpChanges();
46
48 // Curve editor events
49 void onCurveInsertCpAt(plUInt32 uiCurveIdx, plInt64 tickX, double newPosY);
50 void onCurveCpMoved(plUInt32 curveIdx, plUInt32 cpIdx, plInt64 iTickX, double newPosY);
51 void onCurveCpDeleted(plUInt32 curveIdx, plUInt32 cpIdx);
52 void onCurveTangentMoved(plUInt32 curveIdx, plUInt32 cpIdx, float newPosX, float newPosY, bool rightTangent);
53 void onLinkCurveTangents(plUInt32 curveIdx, plUInt32 cpIdx, bool bLink);
54 void onCurveTangentModeChanged(plUInt32 curveIdx, plUInt32 cpIdx, bool rightTangent, int mode);
55
56 void onCurveBeginOperation(QString name);
57 void onCurveEndOperation(bool commit);
58 void onCurveBeginCpChanges(QString name);
59 void onCurveEndCpChanges();
60
62 void PropertyEventHandler(const plDocumentObjectPropertyEvent& e);
63 void StructureEventHandler(const plDocumentObjectStructureEvent& e);
64
65private:
66 void SendRedrawMsg();
67 void QueryObjectBBox(plInt32 iPurpose = 0);
68 void UpdateEventTrackEditor();
69 void UpdateCurveEditor();
70
71 plClock m_Clock;
72 plEngineViewConfig m_ViewConfig;
73 plQtOrbitCamViewWidget* m_pViewWidget = nullptr;
74 plQtTimeScrubberWidget* m_pTimeScrubber = nullptr;
75 plTime m_ClipDuration;
76 plTime m_PlaybackPosition;
77
78 plQtDocumentPanel* m_pEventTrackPanel = nullptr;
79 plQtEventTrackEditorWidget* m_pEventTrackEditor = nullptr;
80
81 plQtDocumentPanel* m_pCurveEditPanel = nullptr;
82 plQtCurve1DEditorWidget* m_pCurveEditor = nullptr;
83 plCurveGroupData m_Curves;
84};
Definition AnimationClipAsset.h:61
A clock that can be speed up, slowed down, paused, etc. Useful for updating game logic,...
Definition Clock.h:15
Definition CurveEditData.h:109
Base class for all messages that are tied to some document.
Definition EngineProcessMessages.h:151
Definition AnimationClipAssetWindow.moc.h:17
virtual const char * GetWindowLayoutGroupName() const override
The 'GroupName' is used for serializing window layouts. It should be unique among different window ty...
Definition AnimationClipAssetWindow.moc.h:25
Definition Curve1DEditorWidget.moc.h:11
Definition DocumentPanel.moc.h:10
Base class for all document windows that need a connection to the engine process, and might want to r...
Definition EngineDocumentWindow.moc.h:37
Definition EventTrackEditorWidget.moc.h:9
Definition OrbitCamViewWidget.moc.h:11
Definition TimeScrubberWidget.moc.h:15
Definition CommandHistory.h:31
Frequently needed asset document states, to prevent code duplication.
Definition AssetDocument.h:26
Used by plDocumentObjectManager::m_PropertyEvents.
Definition DocumentObjectManager.h:77
Used by plDocumentObjectManager::m_StructureEvents.
Definition DocumentObjectManager.h:45
Definition ViewRenderSettings.h:26
The time class encapsulates a double value storing the time in seconds.
Definition Time.h:12