refined keyframeview and curveview
This commit is contained in:
+8
-4
@@ -2246,7 +2246,6 @@ void Node::childEvent(QChildEvent *event)
|
||||
GetImmediate(key->input(), key->element())->insert_keyframe(key);
|
||||
|
||||
connect(key, &NodeKeyframe::TimeChanged, this, &Node::InvalidateFromKeyframeTimeChange);
|
||||
connect(key, &NodeKeyframe::TimeChanged, this, &Node::KeyframeTimeChanged);
|
||||
connect(key, &NodeKeyframe::ValueChanged, this, &Node::InvalidateFromKeyframeValueChange);
|
||||
connect(key, &NodeKeyframe::TypeChanged, this, &Node::InvalidateFromKeyframeTypeChanged);
|
||||
connect(key, &NodeKeyframe::BezierControlInChanged, this, &Node::InvalidateFromKeyframeBezierInChange);
|
||||
@@ -2258,15 +2257,14 @@ void Node::childEvent(QChildEvent *event)
|
||||
TimeRange time_affected = GetRangeAffectedByKeyframe(key);
|
||||
|
||||
disconnect(key, &NodeKeyframe::TimeChanged, this, &Node::InvalidateFromKeyframeTimeChange);
|
||||
disconnect(key, &NodeKeyframe::TimeChanged, this, &Node::KeyframeTimeChanged);
|
||||
disconnect(key, &NodeKeyframe::ValueChanged, this, &Node::InvalidateFromKeyframeValueChange);
|
||||
disconnect(key, &NodeKeyframe::TypeChanged, this, &Node::InvalidateFromKeyframeTypeChanged);
|
||||
disconnect(key, &NodeKeyframe::BezierControlInChanged, this, &Node::InvalidateFromKeyframeBezierInChange);
|
||||
disconnect(key, &NodeKeyframe::BezierControlOutChanged, this, &Node::InvalidateFromKeyframeBezierOutChange);
|
||||
|
||||
GetImmediate(key->input(), key->element())->remove_keyframe(key);
|
||||
|
||||
emit KeyframeRemoved(key);
|
||||
|
||||
GetImmediate(key->input(), key->element())->remove_keyframe(key);
|
||||
ParameterValueChanged(i, time_affected);
|
||||
}
|
||||
}
|
||||
@@ -2329,12 +2327,16 @@ void Node::InvalidateFromKeyframeTimeChange()
|
||||
foreach (const TimeRange& r, invalidate_range) {
|
||||
ParameterValueChanged(key->key_track_ref().input(), r);
|
||||
}
|
||||
|
||||
emit KeyframeTimeChanged(key);
|
||||
}
|
||||
|
||||
void Node::InvalidateFromKeyframeValueChange()
|
||||
{
|
||||
NodeKeyframe* key = static_cast<NodeKeyframe*>(sender());
|
||||
ParameterValueChanged(key->key_track_ref().input(), GetRangeAffectedByKeyframe(key));
|
||||
|
||||
emit KeyframeValueChanged(key);
|
||||
}
|
||||
|
||||
void Node::InvalidateFromKeyframeTypeChanged()
|
||||
@@ -2349,6 +2351,8 @@ void Node::InvalidateFromKeyframeTypeChanged()
|
||||
|
||||
// Invalidate entire range
|
||||
ParameterValueChanged(key->key_track_ref().input(), GetRangeAroundIndex(key->input(), track.indexOf(key), key->track(), key->element()));
|
||||
|
||||
emit KeyframeTypeChanged(key);
|
||||
}
|
||||
|
||||
Project *Node::ArrayInsertCommand::GetRelevantProject() const
|
||||
|
||||
+5
-1
@@ -1066,7 +1066,11 @@ signals:
|
||||
|
||||
void KeyframeRemoved(NodeKeyframe* key);
|
||||
|
||||
void KeyframeTimeChanged();
|
||||
void KeyframeTimeChanged(NodeKeyframe* key);
|
||||
|
||||
void KeyframeTypeChanged(NodeKeyframe* key);
|
||||
|
||||
void KeyframeValueChanged(NodeKeyframe* key);
|
||||
|
||||
void KeyframeEnableChanged(const NodeInput& input, bool enabled);
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include "config/config.h"
|
||||
#include "core.h"
|
||||
#include "node/traverser.h"
|
||||
#include "widget/videoparamedit/videoparamedit.h"
|
||||
|
||||
namespace olive {
|
||||
|
||||
@@ -34,8 +33,6 @@ const QString ViewerOutput::kSamplesInput = QStringLiteral("samples_in");
|
||||
const QString ViewerOutput::kVideoAutoCacheInput = QStringLiteral("video_autocache_in");
|
||||
const QString ViewerOutput::kAudioAutoCacheInput = QStringLiteral("audio_autocache_in");
|
||||
|
||||
const uint64_t ViewerOutput::kVideoParamEditMask = VideoParamEdit::kWidthHeight | VideoParamEdit::kInterlacing | VideoParamEdit::kFrameRate | VideoParamEdit::kPixelAspect;
|
||||
|
||||
#define super Node
|
||||
|
||||
ViewerOutput::ViewerOutput(bool create_buffer_inputs, bool create_default_streams) :
|
||||
@@ -48,7 +45,6 @@ ViewerOutput::ViewerOutput(bool create_buffer_inputs, bool create_default_stream
|
||||
audio_cache_enabled_(true)
|
||||
{
|
||||
AddInput(kVideoParamsInput, NodeValue::kVideoParams, InputFlags(kInputFlagNotConnectable | kInputFlagNotKeyframable | kInputFlagArray | kInputFlagHidden));
|
||||
SetInputProperty(kVideoParamsInput, QStringLiteral("mask"), QVariant::fromValue(kVideoParamEditMask));
|
||||
|
||||
AddInput(kAudioParamsInput, NodeValue::kAudioParams, InputFlags(kInputFlagNotConnectable | kInputFlagNotKeyframable | kInputFlagArray | kInputFlagHidden));
|
||||
|
||||
|
||||
@@ -200,8 +200,6 @@ public:
|
||||
static const QString kVideoAutoCacheInput;
|
||||
static const QString kAudioAutoCacheInput;
|
||||
|
||||
static const uint64_t kVideoParamEditMask;
|
||||
|
||||
signals:
|
||||
void FrameRateChanged(const rational&);
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
#include "core.h"
|
||||
#include "render/job/footagejob.h"
|
||||
#include "ui/icons/icons.h"
|
||||
#include "widget/videoparamedit/videoparamedit.h"
|
||||
|
||||
namespace olive {
|
||||
|
||||
@@ -144,39 +143,6 @@ void Footage::InputValueChangedEvent(const QString &input, int element)
|
||||
AddStream(Track::kVideo, QVariant::fromValue(vp));
|
||||
}
|
||||
|
||||
if (!footage_info.GetVideoStreams().isEmpty()) {
|
||||
// FIXME: This will break on multiple video streams. Currently we don't have
|
||||
// infrastructure for different properties per element. We'll see if this becomes
|
||||
// a problem.
|
||||
VideoParams vp = footage_info.GetVideoStreams().first();
|
||||
|
||||
uint64_t video_param_mask = 0;
|
||||
|
||||
video_param_mask |= VideoParamEdit::kEnabled;
|
||||
video_param_mask |= VideoParamEdit::kColorspace;
|
||||
video_param_mask |= VideoParamEdit::kPixelAspect;
|
||||
video_param_mask |= VideoParamEdit::kInterlacing;
|
||||
video_param_mask |= VideoParamEdit::kFrameRateIsArbitrary;
|
||||
|
||||
if (vp.channel_count() == VideoParams::kRGBAChannelCount) {
|
||||
// Add premultiplied setting if this footage has an alpha channel
|
||||
video_param_mask |= VideoParamEdit::kPremultipliedAlpha;
|
||||
}
|
||||
|
||||
if (vp.video_type() == VideoParams::kVideoTypeVideo) {
|
||||
// This is video, ensure that the frame rate does not overwrite the timebase
|
||||
video_param_mask |= VideoParamEdit::kFrameRateIsNotTimebase;
|
||||
} else {
|
||||
// This is not a video, so it's either a still image or an image sequence
|
||||
video_param_mask |= VideoParamEdit::kIsImageSequence;
|
||||
video_param_mask |= VideoParamEdit::kStartTime;
|
||||
video_param_mask |= VideoParamEdit::kEndTime;
|
||||
video_param_mask |= VideoParamEdit::kFrameRate;
|
||||
}
|
||||
|
||||
SetInputProperty(kVideoParamsInput, QStringLiteral("mask"), QVariant::fromValue(video_param_mask));
|
||||
}
|
||||
|
||||
for (int i=0; i<footage_info.GetAudioStreams().size(); i++) {
|
||||
AddStream(Track::kAudio, QVariant::fromValue(footage_info.GetAudioStreams().at(i)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user