file/folder restructuring

This commit is contained in:
itsmattkc
2019-03-13 16:55:49 +11:00
parent d84b5a7f1d
commit 1cd5dabc07
228 changed files with 1269 additions and 1557 deletions
+1 -1
View File
@@ -25,7 +25,7 @@
#include <QComboBox>
#include <QSpinBox>
#include "io/exportthread.h"
#include "rendering/exportthread.h"
/**
* @brief The AdvancedVideoDialog class
+9 -9
View File
@@ -5,7 +5,7 @@
#include <QDialogButtonBox>
#include "panels/panels.h"
#include "project/undo.h"
#include "undo/undo.h"
ClipPropertiesDialog::ClipPropertiesDialog(QWidget *parent, QVector<Clip *> clips) :
QDialog(parent)
@@ -33,8 +33,8 @@ ClipPropertiesDialog::ClipPropertiesDialog(QWidget *parent, QVector<Clip *> clip
layout->addWidget(new QLabel(tr("Duration:")), row, 0);
duration_field_ = new LabelSlider();
duration_field_->set_display_type(LabelSlider::LABELSLIDER_FRAMENUMBER);
duration_field_->set_minimum_value(1);
duration_field_->SetDisplayType(LabelSlider::FrameNumber);
duration_field_->SetMinimum(1);
layout->addWidget(duration_field_, row, 1);
row++;
@@ -72,15 +72,15 @@ ClipPropertiesDialog::ClipPropertiesDialog(QWidget *parent, QVector<Clip *> clip
}
// it's assumed all the clips come from the same sequence
duration_field_->set_frame_rate(first_clip->sequence->frame_rate);
duration_field_->SetFrameRate(first_clip->sequence->frame_rate);
if (all_clips_have_same_duration) {
duration_field_->set_default_value(first_clip->length());
duration_field_->set_value(first_clip->length(), false);
duration_field_->set_maximum_value(first_clip->media_length());
duration_field_->SetDefault(first_clip->length());
duration_field_->SetValue(first_clip->length());
duration_field_->SetMaximum(first_clip->media_length());
} else {
duration_field_->set_default_value(qSNaN());
duration_field_->set_value(qSNaN(), false);
duration_field_->SetDefault(qSNaN());
duration_field_->SetValue(qSNaN());
}
}
+1 -1
View File
@@ -4,7 +4,7 @@
#include <QDialog>
#include <QLineEdit>
#include "project/clip.h"
#include "timeline/clip.h"
#include "ui/labelslider.h"
class ClipPropertiesDialog : public QDialog {
+3 -3
View File
@@ -30,13 +30,13 @@
#include <QHBoxLayout>
#include <QPushButton>
#include "oliveglobal.h"
#include "global/global.h"
#include "dialogs/advancedvideodialog.h"
#include "panels/panels.h"
#include "ui/viewerwidget.h"
#include "rendering/renderfunctions.h"
#include "io/exportthread.h"
#include "mainwindow.h"
#include "rendering/exportthread.h"
#include "ui/mainwindow.h"
extern "C" {
#include <libavformat/avformat.h>
+2 -2
View File
@@ -29,9 +29,9 @@
#include <QProgressBar>
#include <QGroupBox>
#include "project/sequence.h"
#include "timeline/sequence.h"
#include "io/exportthread.h"
#include "rendering/exportthread.h"
class ExportDialog : public QDialog
{
+2 -2
View File
@@ -24,12 +24,12 @@
#include <QLabel>
#include <QPushButton>
#include "oliveglobal.h"
#include "global/global.h"
#include "panels/panels.h"
#include "ui/sourcetable.h"
#include "mainwindow.h"
#include "ui/mainwindow.h"
LoadDialog::LoadDialog(QWidget *parent, const QString& fn, bool autorecovery, bool clear) :
QDialog(parent)
+1 -1
View File
@@ -26,7 +26,7 @@
#include <QHBoxLayout>
#include "project/projectelements.h"
#include "io/loadthread.h"
#include "project/loadthread.h"
class LoadDialog : public QDialog
{
+1 -1
View File
@@ -34,7 +34,7 @@
#include "project/footage.h"
#include "project/media.h"
#include "panels/project.h"
#include "project/undo.h"
#include "undo/undo.h"
MediaPropertiesDialog::MediaPropertiesDialog(QWidget *parent, Media *i) :
QDialog(parent),
+3 -3
View File
@@ -22,9 +22,9 @@
#include "panels/panels.h"
#include "panels/project.h"
#include "project/sequence.h"
#include "project/undo.h"
#include "project/clip.h"
#include "timeline/sequence.h"
#include "undo/undo.h"
#include "timeline/clip.h"
#include "panels/timeline.h"
#include "project/media.h"
#include "rendering/audio.h"
+1 -1
View File
@@ -28,7 +28,7 @@
#include "panels/project.h"
#include "project/media.h"
#include "project/sequence.h"
#include "timeline/sequence.h"
class NewSequenceDialog : public QDialog
{
+4 -4
View File
@@ -20,12 +20,12 @@
#include "preferencesdialog.h"
#include "oliveglobal.h"
#include "io/config.h"
#include "io/path.h"
#include "global/global.h"
#include "global/config.h"
#include "global/path.h"
#include "rendering/audio.h"
#include "panels/panels.h"
#include "mainwindow.h"
#include "ui/mainwindow.h"
#include <QMenuBar>
#include <QAction>
+2 -2
View File
@@ -28,9 +28,9 @@
#include <QMessageBox>
#include <QDebug>
#include "io/proxygenerator.h"
#include "project/proxygenerator.h"
#include "project/footage.h"
#include "mainwindow.h"
#include "ui/mainwindow.h"
ProxyDialog::ProxyDialog(QWidget *parent, const QVector<Media*> &media) :
QDialog(parent),
+68 -68
View File
@@ -23,7 +23,7 @@
#include "panels/panels.h"
#include "rendering/cacher.h"
#include "project/undo.h"
#include "undo/undo.h"
#include <QVBoxLayout>
#include <QLabel>
@@ -31,96 +31,96 @@
#include <QMessageBox>
ReplaceClipMediaDialog::ReplaceClipMediaDialog(QWidget *parent, Media* old_media) :
QDialog(parent),
media(old_media)
QDialog(parent),
media(old_media)
{
setWindowTitle(tr("Replace clips using \"%1\"").arg(old_media->get_name()));
setWindowTitle(tr("Replace clips using \"%1\"").arg(old_media->get_name()));
resize(300, 400);
resize(300, 400);
QVBoxLayout* layout = new QVBoxLayout(this);
QVBoxLayout* layout = new QVBoxLayout(this);
layout->addWidget(new QLabel(tr("Select which media you want to replace this media's clips with:"), this));
layout->addWidget(new QLabel(tr("Select which media you want to replace this media's clips with:"), this));
tree = new QTreeView(this);
tree = new QTreeView(this);
layout->addWidget(tree);
layout->addWidget(tree);
use_same_media_in_points = new QCheckBox(tr("Keep the same media in-points"), this);
use_same_media_in_points->setChecked(true);
layout->addWidget(use_same_media_in_points);
use_same_media_in_points = new QCheckBox(tr("Keep the same media in-points"), this);
use_same_media_in_points->setChecked(true);
layout->addWidget(use_same_media_in_points);
QHBoxLayout* buttons = new QHBoxLayout();
buttons->addStretch();
buttons->addStretch();
QPushButton* replace_button = new QPushButton(tr("Replace"), this);
connect(replace_button, SIGNAL(clicked(bool)), this, SLOT(replace()));
buttons->addWidget(replace_button);
QPushButton* replace_button = new QPushButton(tr("Replace"), this);
connect(replace_button, SIGNAL(clicked(bool)), this, SLOT(replace()));
buttons->addWidget(replace_button);
QPushButton* cancel_button = new QPushButton(tr("Cancel"), this);
connect(cancel_button, SIGNAL(clicked(bool)), this, SLOT(close()));
buttons->addWidget(cancel_button);
QPushButton* cancel_button = new QPushButton(tr("Cancel"), this);
connect(cancel_button, SIGNAL(clicked(bool)), this, SLOT(close()));
buttons->addWidget(cancel_button);
buttons->addStretch();
buttons->addStretch();
layout->addLayout(buttons);
layout->addLayout(buttons);
tree->setModel(&olive::project_model);
tree->setModel(&olive::project_model);
}
void ReplaceClipMediaDialog::replace() {
QModelIndexList selected_items = tree->selectionModel()->selectedRows();
if (selected_items.size() != 1) {
QMessageBox::critical(
this,
tr("No media selected"),
tr("Please select a media to replace with or click 'Cancel'."),
QMessageBox::Ok
);
} else {
QModelIndexList selected_items = tree->selectionModel()->selectedRows();
if (selected_items.size() != 1) {
QMessageBox::critical(
this,
tr("No media selected"),
tr("Please select a media to replace with or click 'Cancel'."),
QMessageBox::Ok
);
} else {
Media* new_item = static_cast<Media*>(selected_items.at(0).internalPointer());
if (media == new_item) {
QMessageBox::critical(
this,
tr("Same media selected"),
tr("You selected the same media that you're replacing. Please select a different one or click 'Cancel'."),
QMessageBox::Ok
);
} else if (new_item->get_type() == MEDIA_TYPE_FOLDER) {
QMessageBox::critical(
this,
tr("Folder selected"),
tr("You cannot replace footage with a folder."),
QMessageBox::Ok
);
} else {
if (new_item->get_type() == MEDIA_TYPE_SEQUENCE && olive::ActiveSequence == new_item->to_sequence()) {
QMessageBox::critical(
this,
tr("Active sequence selected"),
tr("You cannot insert a sequence into itself."),
QMessageBox::Ok
);
} else {
ReplaceClipMediaCommand* rcmc = new ReplaceClipMediaCommand(
media,
new_item,
use_same_media_in_points->isChecked()
);
if (media == new_item) {
QMessageBox::critical(
this,
tr("Same media selected"),
tr("You selected the same media that you're replacing. Please select a different one or click 'Cancel'."),
QMessageBox::Ok
);
} else if (new_item->get_type() == MEDIA_TYPE_FOLDER) {
QMessageBox::critical(
this,
tr("Folder selected"),
tr("You cannot replace footage with a folder."),
QMessageBox::Ok
);
} else {
if (new_item->get_type() == MEDIA_TYPE_SEQUENCE && olive::ActiveSequence == new_item->to_sequence()) {
QMessageBox::critical(
this,
tr("Active sequence selected"),
tr("You cannot insert a sequence into itself."),
QMessageBox::Ok
);
} else {
ReplaceClipMediaCommand* rcmc = new ReplaceClipMediaCommand(
media,
new_item,
use_same_media_in_points->isChecked()
);
for (int i=0;i<olive::ActiveSequence->clips.size();i++) {
for (int i=0;i<olive::ActiveSequence->clips.size();i++) {
ClipPtr c = olive::ActiveSequence->clips.at(i);
if (c != nullptr && c->media() == media) {
rcmc->clips.append(c);
}
}
rcmc->clips.append(c);
}
}
olive::UndoStack.push(rcmc);
olive::UndoStack.push(rcmc);
close();
}
close();
}
}
}
}
}
}
+24 -24
View File
@@ -26,13 +26,13 @@
#include <QPushButton>
#include <QDialogButtonBox>
#include "project/sequence.h"
#include "timeline/sequence.h"
#include "project/footage.h"
#include "rendering/renderfunctions.h"
#include "panels/panels.h"
#include "panels/timeline.h"
#include "project/undo.h"
#include "project/effect.h"
#include "undo/undo.h"
#include "effects/effect.h"
#include "project/media.h"
SpeedDialog::SpeedDialog(QWidget *parent, QVector<Clip*> clips) : QDialog(parent) {
@@ -47,20 +47,20 @@ SpeedDialog::SpeedDialog(QWidget *parent, QVector<Clip*> clips) : QDialog(parent
grid->addWidget(new QLabel(tr("Speed:"), this), 0, 0);
percent = new LabelSlider(this);
percent->decimal_places = 2;
percent->set_display_type(LabelSlider::LABELSLIDER_PERCENT);
percent->set_default_value(1);
percent->SetDecimalPlaces(2);
percent->SetDisplayType(LabelSlider::Percent);
percent->SetDefault(1);
grid->addWidget(percent, 0, 1);
grid->addWidget(new QLabel(tr("Frame Rate:"), this), 1, 0);
frame_rate = new LabelSlider(this);
frame_rate->decimal_places = 3;
frame_rate->SetDecimalPlaces(3);
grid->addWidget(frame_rate, 1, 1);
grid->addWidget(new QLabel(tr("Duration:"), this), 2, 0);
duration = new LabelSlider(this);
duration->set_display_type(LabelSlider::LABELSLIDER_FRAMENUMBER);
duration->set_frame_rate(olive::ActiveSequence->frame_rate);
duration->SetDisplayType(LabelSlider::FrameNumber);
duration->SetFrameRate(olive::ActiveSequence->frame_rate);
grid->addWidget(duration, 2, 1);
main_layout->addLayout(grid);
@@ -168,16 +168,16 @@ void SpeedDialog::run() {
}
}
frame_rate->set_minimum_value(1);
percent->set_minimum_value(0.0001);
duration->set_minimum_value(1);
frame_rate->SetMinimum(1);
percent->SetMinimum(0.0001);
duration->SetMinimum(1);
frame_rate->setEnabled(enable_frame_rate);
frame_rate->set_default_value(default_frame_rate);
frame_rate->set_value(current_frame_rate, false);
percent->set_value(current_percent, false);
duration->set_default_value(default_length);
duration->set_value((current_length == -1) ? qSNaN() : current_length, false);
frame_rate->SetDefault(default_frame_rate);
frame_rate->SetValue(current_frame_rate);
percent->SetValue(current_percent);
duration->SetDefault(default_length);
duration->SetValue((current_length == -1) ? qSNaN() : current_length);
exec();
}
@@ -213,8 +213,8 @@ void SpeedDialog::percent_update() {
}
}
frame_rate->set_value(fr_val, false);
duration->set_value((len_val == -1) ? qSNaN() : len_val, false);
frame_rate->SetValue(fr_val);
duration->SetValue((len_val == -1) ? qSNaN() : len_val);
}
void SpeedDialog::duration_update() {
@@ -248,8 +248,8 @@ void SpeedDialog::duration_update() {
}
}
frame_rate->set_value(fr_val, false);
percent->set_value(pc_val, false);
frame_rate->SetValue(fr_val);
percent->SetValue(pc_val);
}
void SpeedDialog::frame_rate_update() {
@@ -312,8 +312,8 @@ void SpeedDialog::frame_rate_update() {
}
}
percent->set_value(pc_val, false);
duration->set_value((len_val == -1) ? qSNaN() : len_val, false);
percent->SetValue(pc_val);
duration->SetValue((len_val == -1) ? qSNaN() : len_val);
}
void set_speed(ComboAction* ca, Clip* c, double speed, bool ripple, long& ep, long& lr) {
@@ -321,7 +321,7 @@ void set_speed(ComboAction* ca, Clip* c, double speed, bool ripple, long& ep, lo
long proposed_out = c->timeline_out();
double multiplier = (c->speed().value / speed);
proposed_out = c->timeline_in() + (c->length() * multiplier);
proposed_out = qRound(c->timeline_in() + (c->length() * multiplier));
ca->append(new SetSpeedAction(c, speed));
if (!ripple && proposed_out > c->timeline_out()) {
for (int i=0;i<c->sequence->clips.size();i++) {
+1 -1
View File
@@ -24,7 +24,7 @@
#include <QDialog>
#include <QCheckBox>
#include "project/clip.h"
#include "timeline/clip.h"
#include "ui/labelslider.h"
class SpeedDialog : public QDialog
-107
View File
@@ -1,107 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>SpeedDialog</class>
<widget class="QDialog" name="SpeedDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="geometry">
<rect>
<x>30</x>
<y>240</y>
<width>341</width>
<height>32</height>
</rect>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>20</x>
<y>20</y>
<width>47</width>
<height>13</height>
</rect>
</property>
<property name="text">
<string>Speed:</string>
</property>
</widget>
<widget class="QLabel" name="label_2">
<property name="geometry">
<rect>
<x>20</x>
<y>50</y>
<width>47</width>
<height>13</height>
</rect>
</property>
<property name="text">
<string>Frame Rate:</string>
</property>
</widget>
<widget class="QLabel" name="label_3">
<property name="geometry">
<rect>
<x>20</x>
<y>80</y>
<width>47</width>
<height>13</height>
</rect>
</property>
<property name="text">
<string>Duration:</string>
</property>
</widget>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>SpeedDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>SpeedDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>
-1
View File
@@ -1 +0,0 @@
Place this folder in the runtime folder of Olive.
+9 -9
View File
@@ -25,19 +25,19 @@
#include "ui/viewerwidget.h"
#include "ui/collapsiblewidget.h"
#include "panels/project.h"
#include "project/undo.h"
#include "project/sequence.h"
#include "project/clip.h"
#include "undo/undo.h"
#include "timeline/sequence.h"
#include "timeline/clip.h"
#include "panels/timeline.h"
#include "panels/effectcontrols.h"
#include "panels/grapheditor.h"
#include "ui/checkboxex.h"
#include "debug.h"
#include "io/path.h"
#include "mainwindow.h"
#include "io/math.h"
#include "io/clipboard.h"
#include "io/config.h"
#include "global/debug.h"
#include "global/path.h"
#include "ui/mainwindow.h"
#include "global/math.h"
#include "project/clipboard.h"
#include "global/config.h"
#include "transition.h"
#include "effects/internal/transformeffect.h"
@@ -33,18 +33,18 @@
#include "rendering/renderfunctions.h"
#include "io/config.h"
#include "global/config.h"
#include "project/effectrow.h"
#include "project/effect.h"
#include "effects/effectrow.h"
#include "effects/effect.h"
#include "project/undo.h"
#include "project/clip.h"
#include "project/sequence.h"
#include "undo/undo.h"
#include "timeline/clip.h"
#include "timeline/sequence.h"
#include "io/math.h"
#include "global/math.h"
#include "debug.h"
#include "global/debug.h"
EffectField::EffectField(EffectRow* parent, const QString &i, EffectFieldType t) :
QObject(parent),
@@ -100,10 +100,10 @@ QWidget *EffectField::CreateWidget()
return new QLabel(tr("(Invalid field)"));
}
void EffectField::UpdateWidgetValue(QWidget *, double) {}
QVariant EffectField::GetValueAt(double timecode)
{
Q_ASSERT(!keyframes.isEmpty());
if (HasKeyframes()) {
int before_keyframe;
int after_keyframe;
@@ -179,7 +179,8 @@ QVariant EffectField::GetValueAt(double timecode)
}
}
return value;
perpetual_data_ = value;
break;
}
case EFFECT_FIELD_COLOR:
{
@@ -191,32 +192,27 @@ QVariant EffectField::GetValueAt(double timecode)
QColor after_data = keyframes.at(after_keyframe).data.value<QColor>();
value = QColor(lerp(before_data.red(), after_data.red(), progress), lerp(before_data.green(), after_data.green(), progress), lerp(before_data.blue(), after_data.blue(), progress));
}
return value;
perpetual_data_ = value;
break;
}
case EFFECT_FIELD_STRING:
case EFFECT_FIELD_BOOL:
case EFFECT_FIELD_COMBO:
case EFFECT_FIELD_FONT:
case EFFECT_FIELD_FILE:
return before_data;
perpetual_data_ = before_data;
break;
default:
break;
}
}
return keyframes.first().data;
return perpetual_data_;
}
void EffectField::SetValueAt(double time, const QVariant &value)
{
if (keyframes.isEmpty()) {
EffectKeyframe key;
key.data = value;
keyframes.append(key);
return;
}
if (GetParentRow()->IsKeyframing()) {
if (HasKeyframes()) {
// Create keyframe here
@@ -237,6 +233,7 @@ void EffectField::SetValueAt(double time, const QVariant &value)
EffectKeyframe key;
key.time = frame_timecode;
key.data = value;
key.type = (keyframes.isEmpty()) ? EFFECT_KEYFRAME_LINEAR : keyframes.last().type;
keyframes.append(key);
} else {
EffectKeyframe& key = keyframes[keyframe_index];
@@ -244,7 +241,7 @@ void EffectField::SetValueAt(double time, const QVariant &value)
}
} else {
keyframes.first().data = value;
perpetual_data_ = value;
}
emit Changed();
@@ -256,23 +253,37 @@ double EffectField::Now()
return playhead_to_clip_seconds(c, c->sequence->playhead);
}
long EffectField::NowInFrames()
{
Clip* c = GetParentRow()->GetParentEffect()->parent_clip;
return playhead_to_clip_frame(c, c->sequence->playhead);
}
void EffectField::PrepareDataForKeyframing(bool enabled, ComboAction *ca)
{
if (enabled) {
// Convert "perpetual" keyframe to a keyframe at this time
ca->append(new SetLong(&keyframes.first().time, keyframes.first().time, timecodeToFrame(Now())));
// Create keyframe from perpetual data
EffectKeyframe key;
key.time = NowInFrames();
key.data = perpetual_data_;
key.type = EFFECT_KEYFRAME_LINEAR;
keyframes.append(key);
ca->append(new KeyframeAdd(this, keyframes.size()-1));
} else {
// Convert keyframes to one "perpetual" keyframe
// Set first keyframe to whatever the data is now
ca->append(new SetQVariant(&keyframes.first().data, keyframes.first().data, GetValueAt(Now())));
ca->append(new SetQVariant(&perpetual_data_, perpetual_data_, GetValueAt(Now())));
// Delete all keyframes except the first
for (int i=1;i<keyframes.size();i++) {
ca->append(new KeyframeDelete(this, 1));
// Delete all keyframes
for (int i=0;i<keyframes.size();i++) {
ca->append(new KeyframeDelete(this, 0));
}
}
@@ -379,33 +390,9 @@ void EffectField::get_keyframe_data(double timecode, int &before, int &after, do
}
bool EffectField::HasKeyframes() {
return (GetParentRow()->IsKeyframing() && keyframes.size() > 1);
return (GetParentRow()->IsKeyframing() && !keyframes.isEmpty());
}
/*
void EffectField::ui_element_change() {
// TODO address this
//bool dragging_double = (type_ == EFFECT_FIELD_DOUBLE && static_cast<LabelSlider*>(ui_element)->is_dragging());
bool dragging_double = false;
ComboAction* ca = nullptr;
if (!dragging_double) ca = new ComboAction();
//make_key_from_change(ca);
if (!dragging_double) olive::UndoStack.push(ca);
emit Changed();
}
*/
/*
void EffectField::make_key_from_change(ComboAction* ca) {
if (GetParentRow()->isKeyframing()) {
GetParentRow()->set_keyframe_now(ca);
} else if (ca != nullptr) {
// set undo
ca->append(new EffectFieldUndo(this));
}
}
*/
bool EffectField::IsEnabled() {
return enabled_;
}
@@ -25,7 +25,7 @@
#include <QVariant>
#include <QVector>
#include "project/keyframe.h"
#include "effects/keyframe.h"
class EffectRow;
class ComboAction;
@@ -56,6 +56,7 @@ public:
void SetValueAt(double time, const QVariant& value);
double Now();
long NowInFrames();
void PrepareDataForKeyframing(bool enabled, ComboAction* ca);
@@ -66,6 +67,7 @@ public:
virtual QString ConvertValueToString(const QVariant& v);
virtual QWidget* CreateWidget();
virtual void UpdateWidgetValue(QWidget* widget, double);
double GetValidKeyframeHandlePosition(int key, bool post);
@@ -92,6 +94,7 @@ private:
bool enabled_;
int colspan_;
QVariant perpetual_data_;
};
#endif // EFFECTFIELD_H
+14
View File
@@ -0,0 +1,14 @@
#ifndef EFFECTFIELDS_H
#define EFFECTFIELDS_H
#include "fields/boolfield.h"
#include "fields/buttonfield.h"
#include "fields/colorfield.h"
#include "fields/combofield.h"
#include "fields/doublefield.h"
#include "fields/filefield.h"
#include "fields/fontfield.h"
#include "fields/labelfield.h"
#include "fields/stringfield.h"
#endif // EFFECTFIELDS_H
+271
View File
@@ -0,0 +1,271 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "effectloaders.h"
#include "effects/effect.h"
#include "effects/transition.h"
#include "global/path.h"
#include "panels/panels.h"
#include "panels/effectcontrols.h"
#include "global/crossplatformlib.h"
#include "global/config.h"
#include <QDir>
#include <QXmlStreamReader>
#include <QDebug>
#ifndef NOFREI0R
#include <frei0r.h>
typedef void (*f0rGetPluginInfo)(f0r_plugin_info_t* info);
#endif
void load_internal_effects() {
if (!olive::CurrentRuntimeConfig.shaders_are_enabled) qWarning() << "Shaders are disabled, some effects may be nonfunctional";
EffectMeta em;
// load internal effects
em.path = ":/internalshaders";
em.type = EFFECT_TYPE_EFFECT;
em.subtype = EFFECT_TYPE_AUDIO;
em.name = "Volume";
em.internal = EFFECT_INTERNAL_VOLUME;
effects.append(em);
em.name = "Pan";
em.internal = EFFECT_INTERNAL_PAN;
effects.append(em);
#ifndef NOVST
em.name = "VST Plugin 2.x";
em.internal = EFFECT_INTERNAL_VST;
effects.append(em);
#endif
em.name = "Tone";
em.internal = EFFECT_INTERNAL_TONE;
effects.append(em);
em.name = "Noise";
em.internal = EFFECT_INTERNAL_NOISE;
effects.append(em);
em.name = "Fill Left/Right";
em.internal = EFFECT_INTERNAL_FILLLEFTRIGHT;
effects.append(em);
em.subtype = EFFECT_TYPE_VIDEO;
em.name = "Transform";
em.category = "Distort";
em.internal = EFFECT_INTERNAL_TRANSFORM;
effects.append(em);
em.name = "Corner Pin";
em.internal = EFFECT_INTERNAL_CORNERPIN;
effects.append(em);
/*em.name = "Mask";
em.internal = EFFECT_INTERNAL_MASK;
effects.append(em);*/
em.name = "Shake";
em.internal = EFFECT_INTERNAL_SHAKE;
effects.append(em);
em.name = "Text";
em.category = "Render";
em.internal = EFFECT_INTERNAL_TEXT;
effects.append(em);
em.name = "Timecode";
em.internal = EFFECT_INTERNAL_TIMECODE;
effects.append(em);
em.name = "Solid";
em.internal = EFFECT_INTERNAL_SOLID;
effects.append(em);
// internal transitions
em.type = EFFECT_TYPE_TRANSITION;
em.category = "";
em.name = "Cross Dissolve";
em.internal = TRANSITION_INTERNAL_CROSSDISSOLVE;
effects.append(em);
em.subtype = EFFECT_TYPE_AUDIO;
em.name = "Linear Fade";
em.internal = TRANSITION_INTERNAL_LINEARFADE;
effects.append(em);
em.name = "Exponential Fade";
em.internal = TRANSITION_INTERNAL_EXPONENTIALFADE;
effects.append(em);
em.name = "Logarithmic Fade";
em.internal = TRANSITION_INTERNAL_LOGARITHMICFADE;
effects.append(em);
}
void load_shader_effects() {
QList<QString> effects_paths = get_effects_paths();
for (int h=0;h<effects_paths.size();h++) {
const QString& effects_path = effects_paths.at(h);
QDir effects_dir(effects_path);
if (effects_dir.exists()) {
QList<QString> entries = effects_dir.entryList(QStringList("*.xml"), QDir::Files);
for (int i=0;i<entries.size();i++) {
QFile file(effects_path + "/" + entries.at(i));
if (!file.open(QIODevice::ReadOnly)) {
qCritical() << "Could not open" << entries.at(i);
return;
}
QXmlStreamReader reader(&file);
while (!reader.atEnd()) {
if (reader.name() == "effect") {
QString effect_name = "";
QString effect_cat = "";
const QXmlStreamAttributes attr = reader.attributes();
for (int j=0;j<attr.size();j++) {
if (attr.at(j).name() == "name") {
effect_name = attr.at(j).value().toString();
} else if (attr.at(j).name() == "category") {
effect_cat = attr.at(j).value().toString();
}
}
if (!effect_name.isEmpty()) {
EffectMeta em;
em.type = EFFECT_TYPE_EFFECT;
em.subtype = EFFECT_TYPE_VIDEO;
em.name = effect_name;
em.category = effect_cat;
em.filename = file.fileName();
em.path = effects_path;
em.internal = -1;
effects.append(em);
} else {
qCritical() << "Invalid effect found in" << entries.at(i);
}
break;
}
reader.readNext();
}
file.close();
}
}
}
}
void init_effects() {
EffectInit* init_thread = new EffectInit();
QObject::connect(init_thread, SIGNAL(finished()), init_thread, SLOT(deleteLater()));
init_thread->start();
}
#ifndef NOFREI0R
void load_frei0r_effects_worker(const QString& dir, EffectMeta& em, QVector<QString>& loaded_names) {
QDir search_dir(dir);
if (search_dir.exists()) {
QList<QString> entry_list = search_dir.entryList(LibFilter(), QDir::AllDirs | QDir::Files | QDir::NoDotAndDotDot);
for (int j=0;j<entry_list.size();j++) {
QString entry_path = search_dir.filePath(entry_list.at(j));
if (QFileInfo(entry_path).isDir()) {
load_frei0r_effects_worker(entry_path, em, loaded_names);
} else {
ModulePtr effect = LibLoad(entry_path);
if (effect != nullptr) {
f0rGetPluginInfo get_info_func = reinterpret_cast<f0rGetPluginInfo>(LibAddress(effect, "f0r_get_plugin_info"));
if (get_info_func != nullptr) {
f0r_plugin_info_t info;
get_info_func(&info);
if (!loaded_names.contains(info.name)
&& info.plugin_type == F0R_PLUGIN_TYPE_FILTER
&& info.color_model == F0R_COLOR_MODEL_RGBA8888) {
em.name = info.name;
em.path = dir;
em.filename = entry_list.at(j);
em.tooltip = QString("%1\n%2\n%3\n%4").arg(em.name, info.author, info.explanation, em.filename);
loaded_names.append(em.name);
effects.append(em);
}
// qDebug() << "Found:" << info.name << "by" << info.author;
}
LibClose(effect);
}
// qDebug() << search_dir.filePath(entry_list.at(j));
}
}
}
}
void load_frei0r_effects() {
QList<QString> effect_dirs = get_effects_paths();
// add defined paths for frei0r plugins on unix
#if defined(__APPLE__) || defined(__linux__) || defined(__HAIKU__)
effect_dirs.prepend("/usr/lib/frei0r-1");
effect_dirs.prepend("/usr/local/lib/frei0r-1");
effect_dirs.prepend(QDir::homePath() + "/.frei0r-1/lib");
#endif
QString env_path(qgetenv("FREI0R_PATH"));
if (!env_path.isEmpty()) effect_dirs.append(env_path);
QVector<QString> loaded_names;
// search for paths
EffectMeta em;
em.category = "Frei0r";
em.type = EFFECT_TYPE_EFFECT;
em.subtype = EFFECT_TYPE_VIDEO;
em.internal = EFFECT_INTERNAL_FREI0R;
for (int i=0;i<effect_dirs.size();i++) {
load_frei0r_effects_worker(effect_dirs.at(i), em, loaded_names);
}
}
#endif
EffectInit::EffectInit() {
panel_effect_controls->effects_loaded.lock();
}
void EffectInit::run() {
qInfo() << "Initializing effects...";
load_internal_effects();
load_shader_effects();
#ifndef NOFREI0R
load_frei0r_effects();
#endif
panel_effect_controls->effects_loaded.unlock();
qInfo() << "Finished initializing effects";
}
@@ -24,9 +24,9 @@
#include <QPushButton>
#include <QMessageBox>
#include "project/undo.h"
#include "project/clip.h"
#include "project/sequence.h"
#include "undo/undo.h"
#include "timeline/clip.h"
#include "timeline/sequence.h"
#include "panels/panels.h"
#include "panels/effectcontrols.h"
#include "panels/viewer.h"
@@ -22,6 +22,20 @@ QWidget *BoolField::CreateWidget()
return cb;
}
void BoolField::UpdateWidgetValue(QWidget *widget, double timecode)
{
QCheckBox* cb = static_cast<QCheckBox*>(widget);
// Setting the checked state on the checkbox below normally triggers a change() signal that will then trickle back
// to setting a value on this field. Therefore we block its signals while we're setting this.
cb->blockSignals(true);
cb->setChecked(GetBoolAt(timecode));
cb->blockSignals(false);
}
QVariant BoolField::ConvertStringToValue(const QString &s)
{
return (s == "1");
@@ -1,7 +1,7 @@
#ifndef BOOLFIELD_H
#define BOOLFIELD_H
#include "effectfield.h"
#include "../effectfield.h"
class BoolField : public EffectField
{
@@ -12,6 +12,7 @@ public:
bool GetBoolAt(double timecode);
virtual QWidget* CreateWidget() override;
virtual void UpdateWidgetValue(QWidget* widget, double timecode) override;
virtual QVariant ConvertStringToValue(const QString& s) override;
virtual QString ConvertValueToString(const QVariant& v) override;
@@ -1,7 +1,7 @@
#ifndef BUTTONFIELD_H
#define BUTTONFIELD_H
#include "effectfield.h"
#include "../effectfield.h"
class ButtonField : public EffectField
{
@@ -1,7 +1,7 @@
#ifndef COLORFIELD_H
#define COLORFIELD_H
#include "effectfield.h"
#include "../effectfield.h"
class ColorField : public EffectField
{
@@ -1,7 +1,7 @@
#ifndef COMBOFIELD_H
#define COMBOFIELD_H
#include "effectfield.h"
#include "../effectfield.h"
struct ComboFieldItem {
QString name;
@@ -1,11 +1,13 @@
#include "doublefield.h"
#include <QDebug>
DoubleField::DoubleField(EffectRow* parent, const QString& id) :
EffectField(parent, id, EFFECT_FIELD_DOUBLE),
min_(qSNaN()),
max_(qSNaN()),
default_(0),
display_type_(LabelSlider::LABELSLIDER_NORMAL),
display_type_(LabelSlider::Normal),
frame_rate_(30),
value_set_(false)
{
@@ -62,14 +64,14 @@ QWidget *DoubleField::CreateWidget()
LabelSlider* ls = new LabelSlider();
if (!qIsNaN(min_)) {
ls->set_minimum_value(min_);
ls->SetMinimum(min_);
}
ls->set_default_value(default_);
ls->SetDefault(default_);
if (!qIsNaN(max_)) {
ls->set_maximum_value(max_);
ls->SetMaximum(max_);
}
ls->set_display_type(display_type_);
ls->set_frame_rate(frame_rate_);
ls->SetDisplayType(display_type_);
ls->SetFrameRate(frame_rate_);
ls->setEnabled(IsEnabled());
@@ -80,6 +82,11 @@ QWidget *DoubleField::CreateWidget()
return ls;
}
void DoubleField::UpdateWidgetValue(QWidget *widget, double timecode)
{
static_cast<LabelSlider*>(widget)->SetValue(GetDoubleAt(timecode));
}
void DoubleField::ValueHasBeenSet()
{
value_set_ = true;
@@ -1,7 +1,7 @@
#ifndef DOUBLEFIELD_H
#define DOUBLEFIELD_H
#include "effectfield.h"
#include "../effectfield.h"
#include "ui/labelslider.h"
class DoubleField : public EffectField
@@ -36,6 +36,7 @@ public:
virtual QString ConvertValueToString(const QVariant& v);
virtual QWidget* CreateWidget() override;
virtual void UpdateWidgetValue(QWidget* widget, double timecode) override;
private:
double min_;
double max_;
@@ -1,7 +1,7 @@
#ifndef FILEFIELD_H
#define FILEFIELD_H
#include "effectfield.h"
#include "../effectfield.h"
class FileField : public EffectField
{
@@ -1,7 +1,7 @@
#ifndef FONTFIELD_H
#define FONTFIELD_H
#include "effectfield.h"
#include "../effectfield.h"
class FontField : public EffectField {
Q_OBJECT
@@ -1,7 +1,7 @@
#ifndef LABELFIELD_H
#define LABELFIELD_H
#include "effectfield.h"
#include "../effectfield.h"
class LabelField : public EffectField
{
@@ -3,7 +3,7 @@
#include <QtMath>
#include "ui/texteditex.h"
#include "io/config.h"
#include "global/config.h"
StringField::StringField(EffectRow* parent, const QString& id) :
EffectField(parent, id, EFFECT_FIELD_STRING)
@@ -1,7 +1,7 @@
#ifndef STRINGFIELD_H
#define STRINGFIELD_H
#include "effectfield.h"
#include "../effectfield.h"
class StringField : public EffectField
{
+1 -1
View File
@@ -21,7 +21,7 @@
#ifndef AUDIONOISEEFFECT_H
#define AUDIONOISEEFFECT_H
#include "project/effect.h"
#include "effects/effect.h"
class AudioNoiseEffect : public Effect {
Q_OBJECT
+3 -3
View File
@@ -20,9 +20,9 @@
#include "cornerpineffect.h"
#include "io/path.h"
#include "project/clip.h"
#include "debug.h"
#include "global/path.h"
#include "timeline/clip.h"
#include "global/debug.h"
CornerPinEffect::CornerPinEffect(Clip* c, const EffectMeta *em) : Effect(c, em) {
SetFlags(Effect::CoordsFlag & Effect::ShaderFlag);
+1 -1
View File
@@ -21,7 +21,7 @@
#ifndef CORNERPINEFFECT_H
#define CORNERPINEFFECT_H
#include "project/effect.h"
#include "effects/effect.h"
class CornerPinEffect : public Effect {
Q_OBJECT
+1 -1
View File
@@ -21,7 +21,7 @@
#ifndef CROSSDISSOLVETRANSITION_H
#define CROSSDISSOLVETRANSITION_H
#include "project/transition.h"
#include "effects/transition.h"
class CrossDissolveTransition : public Transition {
public:
+1 -1
View File
@@ -21,7 +21,7 @@
#ifndef CUBETRANSITION_H
#define CUBETRANSITION_H
#include "project/transition.h"
#include "effects/transition.h"
class CubeTransition : public Transition {
public:
+2 -2
View File
@@ -21,12 +21,12 @@
#ifndef EXPONENTIALFADETRANSITION_H
#define EXPONENTIALFADETRANSITION_H
#include "project/transition.h"
#include "effects/transition.h"
class ExponentialFadeTransition : public Transition {
public:
ExponentialFadeTransition(Clip* c, Clip* s, const EffectMeta* em);
void process_audio(double timecode_start, double timecode_end, quint8* samples, int nb_bytes, int channel_count);
void process_audio(double timecode_start, double timecode_end, quint8* samples, int nb_bytes, int channel_count);
};
#endif // LINEARFADETRANSITION_H
+1 -1
View File
@@ -21,7 +21,7 @@
#ifndef FILLLEFTRIGHTEFFECT_H
#define FILLLEFTRIGHTEFFECT_H
#include "project/effect.h"
#include "effects/effect.h"
class FillLeftRightEffect : public Effect {
Q_OBJECT
+1 -1
View File
@@ -25,7 +25,7 @@
#include <QMessageBox>
#include <QDir>
#include "project/clip.h"
#include "timeline/clip.h"
typedef f0r_instance_t (*f0rConstructFunc)(unsigned int width, unsigned int height);
typedef int (*f0rInitFunc) ();
+14 -15
View File
@@ -23,32 +23,31 @@
#ifndef NOFREI0R
#include "project/effect.h"
#include <frei0r.h>
#include "io/crossplatformlib.h"
#include "effects/effect.h"
#include "global/crossplatformlib.h"
typedef void (*f0rGetParamInfo)(f0r_param_info_t * info,
int param_index );
int param_index );
class Frei0rEffect : public Effect {
Q_OBJECT
Q_OBJECT
public:
Frei0rEffect(Clip* c, const EffectMeta* em);
~Frei0rEffect();
~Frei0rEffect();
virtual void process_image(double timecode, uint8_t* input, uint8_t* output, int size);
virtual void process_image(double timecode, uint8_t* input, uint8_t* output, int size);
virtual void refresh();
virtual void refresh();
private:
ModulePtr handle;
f0r_instance_t instance;
int param_count;
f0rGetParamInfo get_param_info;
void destruct_module();
void construct_module();
bool open;
ModulePtr handle;
f0r_instance_t instance;
int param_count;
f0rGetParamInfo get_param_info;
void destruct_module();
void construct_module();
bool open;
};
#endif
+2 -2
View File
@@ -21,12 +21,12 @@
#ifndef LINEARFADETRANSITION_H
#define LINEARFADETRANSITION_H
#include "project/transition.h"
#include "effects/transition.h"
class LinearFadeTransition : public Transition {
public:
LinearFadeTransition(Clip* c, Clip* s, const EffectMeta* em);
void process_audio(double timecode_start, double timecode_end, quint8* samples, int nb_bytes, int channel_count);
void process_audio(double timecode_start, double timecode_end, quint8* samples, int nb_bytes, int channel_count);
};
#endif // LINEARFADETRANSITION_H
+2 -2
View File
@@ -21,12 +21,12 @@
#ifndef LOGARITHMICFADETRANSITION_H
#define LOGARITHMICFADETRANSITION_H
#include "project/transition.h"
#include "effects/transition.h"
class LogarithmicFadeTransition : public Transition {
public:
LogarithmicFadeTransition(Clip* c, Clip* s, const EffectMeta* em);
void process_audio(double timecode_start, double timecode_end, quint8* samples, int nb_bytes, int channel_count);
void process_audio(double timecode_start, double timecode_end, quint8* samples, int nb_bytes, int channel_count);
};
#endif // LOGARITHMICFADETRANSITION_H
+1 -1
View File
@@ -21,7 +21,7 @@
#ifndef PANEFFECT_H
#define PANEFFECT_H
#include "project/effect.h"
#include "effects/effect.h"
class PanEffect : public Effect {
Q_OBJECT
+3 -4
View File
@@ -27,11 +27,10 @@
#include "ui/labelslider.h"
#include "ui/collapsiblewidget.h"
#include "project/clip.h"
#include "project/sequence.h"
#include "timeline/clip.h"
#include "timeline/sequence.h"
#include "panels/timeline.h"
#include "debug.h"
#include "global/debug.h"
ShakeEffect::ShakeEffect(Clip* c, const EffectMeta *em) : Effect(c, em) {
SetFlags(Effect::CoordsFlag);
+1 -1
View File
@@ -21,7 +21,7 @@
#ifndef SHAKEEFFECT_H
#define SHAKEEFFECT_H
#include "project/effect.h"
#include "effects/effect.h"
#define RANDOM_VAL_SIZE 30
+2 -2
View File
@@ -27,8 +27,8 @@
#include <QImage>
#include <QComboBox>
#include "project/clip.h"
#include "project/sequence.h"
#include "timeline/clip.h"
#include "timeline/sequence.h"
const int SMPTE_BARS = 7;
const int SMPTE_STRIP_COUNT = 3;
+1 -1
View File
@@ -21,7 +21,7 @@
#ifndef SOLIDEFFECT_H
#define SOLIDEFFECT_H
#include "project/effect.h"
#include "effects/effect.h"
#include <QImage>
+3 -3
View File
@@ -35,12 +35,12 @@
#include "ui/labelslider.h"
#include "ui/collapsiblewidget.h"
#include "project/clip.h"
#include "project/sequence.h"
#include "timeline/clip.h"
#include "timeline/sequence.h"
#include "ui/comboboxex.h"
#include "ui/colorbutton.h"
#include "ui/fontcombobox.h"
#include "io/config.h"
#include "global/config.h"
TextEffect::TextEffect(Clip* c, const EffectMeta* em) :
Effect(c, em)
+1 -1
View File
@@ -21,7 +21,7 @@
#ifndef TEXTEFFECT_H
#define TEXTEFFECT_H
#include "project/effect.h"
#include "effects/effect.h"
#include <QFont>
#include <QImage>
+3 -3
View File
@@ -35,13 +35,13 @@
#include "ui/labelslider.h"
#include "ui/collapsiblewidget.h"
#include "project/clip.h"
#include "project/sequence.h"
#include "timeline/clip.h"
#include "timeline/sequence.h"
#include "panels/viewer.h"
#include "ui/comboboxex.h"
#include "ui/colorbutton.h"
#include "ui/fontcombobox.h"
#include "io/config.h"
#include "global/config.h"
TimecodeEffect::TimecodeEffect(Clip* c, const EffectMeta* em) :
Effect(c, em)
+1 -1
View File
@@ -21,7 +21,7 @@
#ifndef TIMECODEEFFECT_H
#define TIMECODEEFFECT_H
#include "project/effect.h"
#include "effects/effect.h"
#include <QFont>
#include <QImage>
+2 -3
View File
@@ -24,9 +24,8 @@
#define TONE_TYPE_SINE 0
#include "project/clip.h"
#include "project/sequence.h"
#include "debug.h"
#include "timeline/clip.h"
#include "timeline/sequence.h"
ToneEffect::ToneEffect(Clip* c, const EffectMeta *em) : Effect(c, em), sinX(INT_MIN) {
EffectRow* type_row = new EffectRow(this, tr("Type"));
+1 -1
View File
@@ -21,7 +21,7 @@
#ifndef TONEEFFECT_H
#define TONEEFFECT_H
#include "project/effect.h"
#include "effects/effect.h"
class ToneEffect : public Effect {
Q_OBJECT
+4 -4
View File
@@ -30,14 +30,14 @@
#include <QMouseEvent>
#include "ui/collapsiblewidget.h"
#include "project/clip.h"
#include "project/sequence.h"
#include "timeline/clip.h"
#include "timeline/sequence.h"
#include "project/footage.h"
#include "io/math.h"
#include "global/math.h"
#include "ui/labelslider.h"
#include "ui/comboboxex.h"
#include "panels/project.h"
#include "debug.h"
#include "global/debug.h"
#include "panels/panels.h"
#include "panels/viewer.h"
+1 -1
View File
@@ -21,7 +21,7 @@
#ifndef TRANSFORMEFFECT_H
#define TRANSFORMEFFECT_H
#include "project/effect.h"
#include "effects/effect.h"
class TransformEffect : public Effect {
Q_OBJECT
+1 -1
View File
@@ -25,7 +25,7 @@
#include <QFile>
#include "ui/collapsiblewidget.h"
#include "debug.h"
#include "global/debug.h"
VoidEffect::VoidEffect(Clip* c, const QString& n) : Effect(c, nullptr) {
QString display_name;
+1 -1
View File
@@ -27,7 +27,7 @@
* isn't lost if the user saves over the project.
*/
#include "project/effect.h"
#include "effects/effect.h"
class VoidEffect : public Effect {
Q_OBJECT
+1 -1
View File
@@ -34,7 +34,7 @@ VolumeEffect::VolumeEffect(Clip* c, const EffectMeta *em) : Effect(c, em) {
// set defaults
volume_val->SetDefault(1);
volume_val->SetDisplayType(LabelSlider::LABELSLIDER_DECIBEL);
volume_val->SetDisplayType(LabelSlider::Decibel);
}
void VolumeEffect::process_audio(double timecode_start, double timecode_end, quint8* samples, int nb_bytes, int) {
+1 -1
View File
@@ -21,7 +21,7 @@
#ifndef VOLUMEEFFECT_H
#define VOLUMEEFFECT_H
#include "project/effect.h"
#include "effects/effect.h"
class VolumeEffect : public Effect {
Q_OBJECT
+2 -2
View File
@@ -32,8 +32,8 @@
#include <QWindow>
#include "rendering/audio.h"
#include "mainwindow.h"
#include "debug.h"
#include "ui/mainwindow.h"
#include "global/debug.h"
#ifdef __linux__
#include <X11/X.h>
+2 -2
View File
@@ -23,9 +23,9 @@
#ifndef NOVST
#include "project/effect.h"
#include "effects/effect.h"
#include "io/crossplatformlib.h"
#include "global/crossplatformlib.h"
#include "include/vestige.h"
@@ -23,10 +23,11 @@
#include <QVector>
#include "effectfields.h"
#include "undo.h"
#include "undo/undo.h"
#include "panels/panels.h"
EffectKeyframe::EffectKeyframe() {
EffectKeyframe::EffectKeyframe()
{
pre_handle_x = -40;
pre_handle_y = 0;
post_handle_x = 40;
+9 -9
View File
@@ -27,17 +27,17 @@ class EffectField;
class EffectKeyframe {
public:
EffectKeyframe();
EffectKeyframe();
long time;
int type;
QVariant data;
int type;
long time;
QVariant data;
// only for bezier type
double pre_handle_x;
double pre_handle_y;
double post_handle_x;
double post_handle_y;
// only for bezier type
double pre_handle_x;
double pre_handle_y;
double post_handle_x;
double post_handle_y;
};
void delete_keyframes(QVector<EffectField *> &selected_key_fields, QVector<int> &selected_keys);

Some files were not shown because too many files have changed in this diff Show More