Files
oak-editor/app/widget/keyframeview/timetargetobject.h
T
itsmattkc 3399227b3a keyframeview: implemented transforming keyframe times to and from sequence time
Since the node graph can have transform cross nodes, input keyframes may occur
at a different times requiring transforming between sequence time and media
time. This commit implements such a mechanism in all UI classes that need it.
2020-03-26 19:17:46 +11:00

32 lines
670 B
C++

#ifndef TIMETARGETOBJECT_H
#define TIMETARGETOBJECT_H
#include "node/node.h"
class TimeTargetObject
{
public:
TimeTargetObject();
Node* GetTimeTarget() const;
void SetTimeTarget(Node* target);
void SetPathIndex(int index);
rational GetAdjustedTime(Node* from, Node* to, const rational& r, NodeParam::Type direction) const;
TimeRange GetAdjustedTime(Node* from, Node* to, const TimeRange& r, NodeParam::Type direction) const;
//int GetNumberOfPathAdjustments(Node* from, NodeParam::Type direction) const;
protected:
virtual void TimeTargetChangedEvent(Node* ){}
private:
Node* time_target_;
int path_index_;
};
#endif // TIMETARGETOBJECT_H