began new infrastructure
Yep, this is another one of my "famous" sweeping rewrites. Expect things to break. Goals for this are: - Greatly simplify node connections (particularly with arrays) so the code requires less maintenance/is more stable - Redesign node structure to address issues where UI would stall for lengthy periods of time - Less reliance on shared ptrs/greater reliance on QObject system for inheritance/memory management - General code cleanup and improvements
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
|
||||
namespace olive {
|
||||
|
||||
KeyframePropertiesDialog::KeyframePropertiesDialog(const QList<NodeKeyframePtr> &keys, const rational &timebase, QWidget *parent) :
|
||||
KeyframePropertiesDialog::KeyframePropertiesDialog(const QVector<NodeKeyframe*> &keys, const rational &timebase, QWidget *parent) :
|
||||
QDialog(parent),
|
||||
keys_(keys),
|
||||
timebase_(timebase)
|
||||
@@ -92,8 +92,8 @@ KeyframePropertiesDialog::KeyframePropertiesDialog(const QList<NodeKeyframePtr>
|
||||
|
||||
for (int i=0;i<keys_.size();i++) {
|
||||
if (i > 0) {
|
||||
NodeKeyframePtr prev_key = keys_.at(i-1);
|
||||
NodeKeyframePtr this_key = keys_.at(i);
|
||||
NodeKeyframe* prev_key = keys_.at(i-1);
|
||||
NodeKeyframe* this_key = keys_.at(i);
|
||||
|
||||
// Determine if the keyframes are all the same time or not
|
||||
if (all_same_time) {
|
||||
@@ -199,7 +199,7 @@ void KeyframePropertiesDialog::accept()
|
||||
rational new_time = Timecode::timestamp_to_time(time_slider_->GetValue(), timebase_);
|
||||
int new_type = type_select_->currentData().toInt();
|
||||
|
||||
foreach (NodeKeyframePtr key, keys_) {
|
||||
foreach (NodeKeyframe* key, keys_) {
|
||||
if (time_slider_->isEnabled() && !time_slider_->IsTristate()) {
|
||||
new NodeParamSetKeyframeTimeCommand(key, new_time, command);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ class KeyframePropertiesDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
KeyframePropertiesDialog(const QList<NodeKeyframePtr>& keys, const rational& timebase, QWidget* parent = nullptr);
|
||||
KeyframePropertiesDialog(const QVector<NodeKeyframe*>& keys, const rational& timebase, QWidget* parent = nullptr);
|
||||
|
||||
public slots:
|
||||
virtual void accept() override;
|
||||
@@ -43,7 +43,7 @@ public slots:
|
||||
private:
|
||||
void SetUpBezierSlider(FloatSlider *slider, bool all_same, double value);
|
||||
|
||||
const QList<NodeKeyframePtr>& keys_;
|
||||
const QVector<NodeKeyframe*>& keys_;
|
||||
|
||||
rational timebase_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user