reworked NodeInput to accept more than one keyframe "track"

To allow keyframing of each axis of a vector 2/3/4, without simply separating
the inputs for each axis, the NodeInputs need to support more than one keyframe
track with the ability to merge them into a single value when necessary.
This commit is contained in:
itsmattkc
2019-12-30 02:12:48 +11:00
parent 994d8be961
commit ae84067084
4 changed files with 159 additions and 63 deletions
+5 -4
View File
@@ -20,18 +20,19 @@
#include "keyframe.h"
NodeKeyframe::NodeKeyframe(const rational &time, const QVariant &value, const NodeKeyframe::Type &type) :
NodeKeyframe::NodeKeyframe(const rational &time, const QVariant &value, const NodeKeyframe::Type &type, const int &track) :
time_(time),
value_(value),
type_(type),
bezier_control_in_(QPointF(-1.0, 0.0)),
bezier_control_out_(QPointF(1.0, 0.0))
bezier_control_out_(QPointF(1.0, 0.0)),
track_(track)
{
}
NodeKeyframePtr NodeKeyframe::Create(const rational &time, const QVariant &value, const NodeKeyframe::Type &type)
NodeKeyframePtr NodeKeyframe::Create(const rational &time, const QVariant &value, const NodeKeyframe::Type &type, const int& track)
{
return std::make_shared<NodeKeyframe>(time, value, type);
return std::make_shared<NodeKeyframe>(time, value, type, track);
}
NodeKeyframePtr NodeKeyframe::copy() const