Files
oak-editor/app/widget/timelinewidget/timelinescaledobject.h
T
itsmattkc b713ab47eb keyframes: only update active frames even from curve and param editor
When adjusting a slider, keyframe time, or curve value, it is undesirable to
re-cache the entire affected area while the user is still dragging UI objects.
Since the video is unlikely to be playing, the priority must go to the
currently active frame so the user gets visual feedback on the rendered image
as soon as possible. This was implemented in some areas, but this commit should
have that functionality in all areas.
2020-01-25 17:51:34 +11:00

32 lines
634 B
C++

#ifndef TIMELINESCALEDOBJECT_H
#define TIMELINESCALEDOBJECT_H
#include "common/rational.h"
class TimelineScaledObject
{
public:
TimelineScaledObject();
const rational& timebase() const;
const double& timebase_dbl() const;
static rational SceneToTime(const double &x, const double& x_scale, const rational& timebase, bool round = false);
protected:
double TimeToScene(const rational& time);
rational SceneToTime(const double &x, bool round = false);
void SetTimebaseInternal(const rational& timebase);
double scale_;
private:
rational timebase_;
double timebase_dbl_;
};
#endif // TIMELINESCALEDOBJECT_H