implemented effect copying/pasting
This commit is contained in:
@@ -97,7 +97,7 @@ TransformEffect::TransformEffect(Clip* c, const EffectMeta* em) : Effect(c, em)
|
||||
}
|
||||
|
||||
void TransformEffect::refresh() {
|
||||
if (parent_clip->sequence != NULL) {
|
||||
if (parent_clip != NULL && parent_clip->sequence != NULL) {
|
||||
double default_pos_x = parent_clip->sequence->width/2;
|
||||
double default_pos_y = parent_clip->sequence->height/2;
|
||||
|
||||
|
||||
@@ -1,4 +1,17 @@
|
||||
#include "clipboard.h"
|
||||
|
||||
#include "project/clip.h"
|
||||
|
||||
int clipboard_type = CLIPBOARD_TYPE_CLIP;
|
||||
QVector<void*> clipboard;
|
||||
|
||||
void clear_clipboard() {
|
||||
for (int i=0;i<clipboard.size();i++) {
|
||||
if (clipboard_type == CLIPBOARD_TYPE_CLIP) {
|
||||
delete static_cast<Clip*>(clipboard.at(i));
|
||||
} else if (clipboard_type == CLIPBOARD_TYPE_EFFECT) {
|
||||
delete static_cast<Effect*>(clipboard.at(i));
|
||||
}
|
||||
}
|
||||
clipboard.clear();
|
||||
}
|
||||
|
||||
@@ -8,5 +8,6 @@
|
||||
|
||||
extern int clipboard_type;
|
||||
extern QVector<void*> clipboard;
|
||||
void clear_clipboard();
|
||||
|
||||
#endif // CLIPBOARD_H
|
||||
|
||||
+15
-7
@@ -385,19 +385,27 @@ void MainWindow::openSpeedDialog() {
|
||||
}
|
||||
|
||||
void MainWindow::cut() {
|
||||
if (panel_timeline->focused() && sequence != NULL) {
|
||||
panel_timeline->copy(true);
|
||||
}
|
||||
if (sequence != NULL) {
|
||||
if (panel_timeline->focused()) {
|
||||
panel_timeline->copy(true);
|
||||
} else if (panel_effect_controls->is_focused()) {
|
||||
panel_effect_controls->copy(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::copy() {
|
||||
if (panel_timeline->focused() && sequence != NULL) {
|
||||
panel_timeline->copy(false);
|
||||
}
|
||||
if (sequence != NULL) {
|
||||
if (panel_timeline->focused()) {
|
||||
panel_timeline->copy(false);
|
||||
} else if (panel_effect_controls->is_focused()) {
|
||||
panel_effect_controls->copy(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::paste() {
|
||||
if (panel_timeline->focused() && sequence != NULL) {
|
||||
if ((panel_timeline->focused() || panel_effect_controls->is_focused()) && sequence != NULL) {
|
||||
panel_timeline->paste(false);
|
||||
}
|
||||
}
|
||||
|
||||
+56
-23
@@ -17,6 +17,7 @@
|
||||
#include "panels/timeline.h"
|
||||
#include "panels/viewer.h"
|
||||
#include "ui/viewerwidget.h"
|
||||
#include "io/clipboard.h"
|
||||
#include "debug.h"
|
||||
|
||||
EffectControls::EffectControls(QWidget *parent) :
|
||||
@@ -65,9 +66,9 @@ void EffectControls::menu_select(QAction* q) {
|
||||
ComboAction* ca = new ComboAction();
|
||||
for (int i=0;i<selected_clips.size();i++) {
|
||||
Clip* c = sequence->clips.at(selected_clips.at(i));
|
||||
if ((c->track < 0) == video_menu) {
|
||||
if ((c->track < 0) == (effect_menu_subtype == EFFECT_TYPE_VIDEO)) {
|
||||
const EffectMeta* meta = reinterpret_cast<const EffectMeta*>(q->data().value<quintptr>());
|
||||
if (transition_menu) {
|
||||
if (effect_menu_type == EFFECT_TYPE_TRANSITION) {
|
||||
if (c->get_opening_transition() == NULL) {
|
||||
ca->append(new AddTransitionCommand(c, NULL, NULL, meta, TA_OPENING_TRANSITION, 30));
|
||||
}
|
||||
@@ -80,7 +81,7 @@ void EffectControls::menu_select(QAction* q) {
|
||||
}
|
||||
}
|
||||
undo_stack.push(ca);
|
||||
if (transition_menu) {
|
||||
if (effect_menu_type == EFFECT_TYPE_TRANSITION) {
|
||||
update_ui(true);
|
||||
} else {
|
||||
reload_clips();
|
||||
@@ -94,21 +95,57 @@ void EffectControls::update_keyframes() {
|
||||
}
|
||||
|
||||
void EffectControls::delete_selected_keyframes() {
|
||||
ui->keyframeView->delete_selected_keyframes();
|
||||
ui->keyframeView->delete_selected_keyframes();
|
||||
}
|
||||
|
||||
void EffectControls::show_effect_menu(bool video, bool transitions) {
|
||||
video_menu = video;
|
||||
transition_menu = transitions;
|
||||
void EffectControls::copy(bool del) {
|
||||
if (mode == TA_NO_TRANSITION) {
|
||||
bool cleared = false;
|
||||
|
||||
ComboAction* ca = new ComboAction();
|
||||
EffectDeleteCommand* del_com = (del) ? new EffectDeleteCommand() : NULL;
|
||||
for (int i=0;i<selected_clips.size();i++) {
|
||||
Clip* c = sequence->clips.at(selected_clips.at(i));
|
||||
for (int j=0;j<c->effects.size();j++) {
|
||||
Effect* effect = c->effects.at(j);
|
||||
if (effect->container->selected) {
|
||||
if (!cleared) {
|
||||
clipboard_type = CLIPBOARD_TYPE_EFFECT;
|
||||
clear_clipboard();
|
||||
cleared = true;
|
||||
}
|
||||
|
||||
clipboard.append(effect->copy(NULL));
|
||||
|
||||
if (del_com != NULL) {
|
||||
del_com->clips.append(c);
|
||||
del_com->fx.append(j);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (del_com != NULL) {
|
||||
if (del_com->clips.size() > 0) {
|
||||
ca->append(del_com);
|
||||
} else {
|
||||
delete del_com;
|
||||
}
|
||||
}
|
||||
undo_stack.push(ca);
|
||||
}
|
||||
}
|
||||
|
||||
void EffectControls::show_effect_menu(int type, int subtype) {
|
||||
effect_menu_type = type;
|
||||
effect_menu_subtype = subtype;
|
||||
|
||||
effects_loaded.lock();
|
||||
|
||||
QVector<EffectMeta>& effect_list = (video) ? video_effects : audio_effects;
|
||||
QMenu effects_menu(this);
|
||||
for (int i=0;i<effect_list.size();i++) {
|
||||
const EffectMeta& em = effect_list.at(i);
|
||||
for (int i=0;i<effects.size();i++) {
|
||||
const EffectMeta& em = effects.at(i);
|
||||
|
||||
if ((em.type == EFFECT_TYPE_TRANSITION) == transition_menu) {
|
||||
if (em.type == type && em.subtype == subtype) {
|
||||
QAction* action = new QAction(&effects_menu);
|
||||
action->setText(em.name);
|
||||
action->setData(reinterpret_cast<quintptr>(&em));
|
||||
@@ -275,24 +312,20 @@ void EffectControls::set_clips(QVector<int>& clips, int m) {
|
||||
load_effects();
|
||||
}
|
||||
|
||||
void EffectControls::on_add_video_effect_button_clicked()
|
||||
{
|
||||
show_effect_menu(true, false);
|
||||
void EffectControls::on_add_video_effect_button_clicked() {
|
||||
show_effect_menu(EFFECT_TYPE_EFFECT, EFFECT_TYPE_VIDEO);
|
||||
}
|
||||
|
||||
void EffectControls::on_add_audio_effect_button_clicked()
|
||||
{
|
||||
show_effect_menu(false, false);
|
||||
void EffectControls::on_add_audio_effect_button_clicked() {
|
||||
show_effect_menu(EFFECT_TYPE_EFFECT, EFFECT_TYPE_AUDIO);
|
||||
}
|
||||
|
||||
void EffectControls::on_add_video_transition_button_clicked()
|
||||
{
|
||||
show_effect_menu(true, true);
|
||||
void EffectControls::on_add_video_transition_button_clicked() {
|
||||
show_effect_menu(EFFECT_TYPE_TRANSITION, EFFECT_TYPE_VIDEO);
|
||||
}
|
||||
|
||||
void EffectControls::on_add_audio_transition_button_clicked()
|
||||
{
|
||||
show_effect_menu(false, true);
|
||||
void EffectControls::on_add_audio_transition_button_clicked() {
|
||||
show_effect_menu(EFFECT_TYPE_TRANSITION, EFFECT_TYPE_AUDIO);
|
||||
}
|
||||
|
||||
void EffectControls::resizeEvent(QResizeEvent*) {
|
||||
|
||||
@@ -40,6 +40,7 @@ public:
|
||||
void set_zoom(bool in);
|
||||
bool keyframe_focus();
|
||||
void delete_selected_keyframes();
|
||||
void copy(bool del);
|
||||
bool multiple;
|
||||
|
||||
QVector<int> selected_clips;
|
||||
@@ -60,13 +61,13 @@ private slots:
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *event);
|
||||
private:
|
||||
void show_effect_menu(bool video, bool transitions);
|
||||
void show_effect_menu(int type, int subtype);
|
||||
void load_effects();
|
||||
void load_keyframes();
|
||||
void open_effect(QVBoxLayout* layout, Effect* e);
|
||||
|
||||
bool video_menu;
|
||||
bool transition_menu;
|
||||
int effect_menu_type;
|
||||
int effect_menu_subtype;
|
||||
QString panel_name;
|
||||
int mode;
|
||||
};
|
||||
|
||||
+3
-4
@@ -812,10 +812,9 @@ QTreeWidgetItem* Project::find_loaded_folder_by_id(int id) {
|
||||
}
|
||||
|
||||
const EffectMeta* get_meta_from_name(const QString& name, int type) {
|
||||
QVector<EffectMeta>& effect_list = (type == EFFECT_TYPE_VIDEO) ? video_effects : audio_effects;
|
||||
for (int j=0;j<effect_list.size();j++) {
|
||||
if (effect_list.at(j).name == name) {
|
||||
return &effect_list.at(j);
|
||||
for (int j=0;j<effects.size();j++) {
|
||||
if (effects.at(j).name == name) {
|
||||
return &effects.at(j);
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
|
||||
+73
-59
@@ -839,11 +839,10 @@ void Timeline::copy(bool del) {
|
||||
for (int j=0;j<sequence->selections.size();j++) {
|
||||
const Selection& s = sequence->selections.at(j);
|
||||
if (s.track == c->track && !((c->timeline_in <= s.in && c->timeline_out <= s.in) || (c->timeline_in >= s.out && c->timeline_out >= s.out))) {
|
||||
clipboard_type = CLIPBOARD_TYPE_CLIP;
|
||||
|
||||
if (!cleared) {
|
||||
clipboard.clear();
|
||||
clear_clipboard();
|
||||
cleared = true;
|
||||
clipboard_type = CLIPBOARD_TYPE_CLIP;
|
||||
}
|
||||
|
||||
Clip* copied_clip = c->copy(NULL);
|
||||
@@ -904,73 +903,88 @@ void Timeline::relink_clips_using_ids(QVector<int>& old_clips, QVector<Clip*>& n
|
||||
}
|
||||
|
||||
void Timeline::paste(bool insert) {
|
||||
if (clipboard_type == CLIPBOARD_TYPE_CLIP && clipboard.size() > 0) {
|
||||
ComboAction* ca = new ComboAction();
|
||||
if (clipboard.size() > 0) {
|
||||
if (clipboard_type == CLIPBOARD_TYPE_CLIP) {
|
||||
ComboAction* ca = new ComboAction();
|
||||
|
||||
// create copies and delete areas that we'll be pasting to
|
||||
QVector<Selection> delete_areas;
|
||||
QVector<Clip*> pasted_clips;
|
||||
long paste_start = LONG_MAX;
|
||||
long paste_end = LONG_MIN;
|
||||
for (int i=0;i<clipboard.size();i++) {
|
||||
Clip* c = static_cast<Clip*>(clipboard.at(i));
|
||||
// create copies and delete areas that we'll be pasting to
|
||||
QVector<Selection> delete_areas;
|
||||
QVector<Clip*> pasted_clips;
|
||||
long paste_start = LONG_MAX;
|
||||
long paste_end = LONG_MIN;
|
||||
for (int i=0;i<clipboard.size();i++) {
|
||||
Clip* c = static_cast<Clip*>(clipboard.at(i));
|
||||
|
||||
// create copy of clip and offset by playhead
|
||||
Clip* cc = c->copy(sequence);
|
||||
// create copy of clip and offset by playhead
|
||||
Clip* cc = c->copy(sequence);
|
||||
|
||||
// convert frame rates
|
||||
cc->timeline_in = refactor_frame_number(cc->timeline_in, c->cached_fr, sequence->frame_rate);
|
||||
cc->timeline_out = refactor_frame_number(cc->timeline_out, c->cached_fr, sequence->frame_rate);
|
||||
cc->clip_in = refactor_frame_number(cc->clip_in, c->cached_fr, sequence->frame_rate);
|
||||
// convert frame rates
|
||||
cc->timeline_in = refactor_frame_number(cc->timeline_in, c->cached_fr, sequence->frame_rate);
|
||||
cc->timeline_out = refactor_frame_number(cc->timeline_out, c->cached_fr, sequence->frame_rate);
|
||||
cc->clip_in = refactor_frame_number(cc->clip_in, c->cached_fr, sequence->frame_rate);
|
||||
|
||||
cc->timeline_in += sequence->playhead;
|
||||
cc->timeline_out += sequence->playhead;
|
||||
cc->track = c->track;
|
||||
cc->timeline_in += sequence->playhead;
|
||||
cc->timeline_out += sequence->playhead;
|
||||
cc->track = c->track;
|
||||
|
||||
paste_start = qMin(paste_start, cc->timeline_in);
|
||||
paste_end = qMax(paste_end, cc->timeline_out);
|
||||
paste_start = qMin(paste_start, cc->timeline_in);
|
||||
paste_end = qMax(paste_end, cc->timeline_out);
|
||||
|
||||
pasted_clips.append(cc);
|
||||
pasted_clips.append(cc);
|
||||
|
||||
if (!insert) {
|
||||
Selection s;
|
||||
s.in = cc->timeline_in;
|
||||
s.out = cc->timeline_out;
|
||||
s.track = c->track;
|
||||
delete_areas.append(s);
|
||||
if (!insert) {
|
||||
Selection s;
|
||||
s.in = cc->timeline_in;
|
||||
s.out = cc->timeline_out;
|
||||
s.track = c->track;
|
||||
delete_areas.append(s);
|
||||
}
|
||||
}
|
||||
if (insert) {
|
||||
split_cache.clear();
|
||||
split_all_clips_at_point(ca, sequence->playhead);
|
||||
ca->append(new RippleCommand(sequence, paste_start, paste_end - paste_start));
|
||||
} else {
|
||||
delete_areas_and_relink(ca, delete_areas);
|
||||
}
|
||||
}
|
||||
if (insert) {
|
||||
split_cache.clear();
|
||||
split_all_clips_at_point(ca, sequence->playhead);
|
||||
ca->append(new RippleCommand(sequence, paste_start, paste_end - paste_start));
|
||||
} else {
|
||||
delete_areas_and_relink(ca, delete_areas);
|
||||
}
|
||||
|
||||
// correct linked clips
|
||||
for (int i=0;i<clipboard.size();i++) {
|
||||
// these indices should correspond
|
||||
Clip* oc = static_cast<Clip*>(clipboard.at(i));
|
||||
// correct linked clips
|
||||
for (int i=0;i<clipboard.size();i++) {
|
||||
// these indices should correspond
|
||||
Clip* oc = static_cast<Clip*>(clipboard.at(i));
|
||||
|
||||
for (int j=0;j<oc->linked.size();j++) {
|
||||
for (int k=0;k<clipboard.size();k++) { // find clip with that ID
|
||||
Clip* comp = static_cast<Clip*>(clipboard.at(k));
|
||||
if (comp->load_id == oc->linked.at(j)) {
|
||||
pasted_clips.at(i)->linked.append(k);
|
||||
for (int j=0;j<oc->linked.size();j++) {
|
||||
for (int k=0;k<clipboard.size();k++) { // find clip with that ID
|
||||
Clip* comp = static_cast<Clip*>(clipboard.at(k));
|
||||
if (comp->load_id == oc->linked.at(j)) {
|
||||
pasted_clips.at(i)->linked.append(k);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ca->append(new AddClipCommand(sequence, pasted_clips));
|
||||
ca->append(new AddClipCommand(sequence, pasted_clips));
|
||||
|
||||
undo_stack.push(ca);
|
||||
undo_stack.push(ca);
|
||||
|
||||
update_ui(true);
|
||||
update_ui(true);
|
||||
|
||||
if (config.paste_seeks) {
|
||||
panel_sequence_viewer->seek(paste_end);
|
||||
if (config.paste_seeks) {
|
||||
panel_sequence_viewer->seek(paste_end);
|
||||
}
|
||||
} else if (clipboard_type == CLIPBOARD_TYPE_EFFECT) {
|
||||
for (int i=0;i<sequence->clips.size();i++) {
|
||||
Clip* c = sequence->clips.at(i);
|
||||
if (c != NULL && is_clip_selected(c, true)) {
|
||||
for (int j=0;j<clipboard.size();j++) {
|
||||
Effect* e = static_cast<Effect*>(clipboard.at(j));
|
||||
if ((c->track < 0) == (e->meta->subtype == EFFECT_TYPE_VIDEO)) {
|
||||
c->effects.append(e->copy(c));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
update_ui(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1466,9 +1480,9 @@ void Timeline::on_toolTransitionButton_clicked() {
|
||||
|
||||
QMenu transition_menu(this);
|
||||
|
||||
for (int i=0;i<video_effects.size();i++) {
|
||||
const EffectMeta& em = video_effects.at(i);
|
||||
if (em.type == EFFECT_TYPE_TRANSITION) {
|
||||
for (int i=0;i<effects.size();i++) {
|
||||
const EffectMeta& em = effects.at(i);
|
||||
if (em.type == EFFECT_TYPE_TRANSITION && em.subtype == EFFECT_TYPE_VIDEO) {
|
||||
QAction* a = transition_menu.addAction(em.name);
|
||||
a->setObjectName("v");
|
||||
a->setData(reinterpret_cast<quintptr>(&em));
|
||||
@@ -1477,9 +1491,9 @@ void Timeline::on_toolTransitionButton_clicked() {
|
||||
|
||||
transition_menu.addSeparator();
|
||||
|
||||
for (int i=0;i<audio_effects.size();i++) {
|
||||
const EffectMeta& em = audio_effects.at(i);
|
||||
if (em.type == EFFECT_TYPE_TRANSITION) {
|
||||
for (int i=0;i<effects.size();i++) {
|
||||
const EffectMeta& em = effects.at(i);
|
||||
if (em.type == EFFECT_TYPE_TRANSITION && em.subtype == EFFECT_TYPE_AUDIO) {
|
||||
QAction* a = transition_menu.addAction(em.name);
|
||||
a->setObjectName("a");
|
||||
a->setData(reinterpret_cast<quintptr>(&em));
|
||||
|
||||
+25
-25
@@ -38,8 +38,7 @@
|
||||
#include <QtMath>
|
||||
#include <QMenu>
|
||||
|
||||
QVector<EffectMeta> video_effects;
|
||||
QVector<EffectMeta> audio_effects;
|
||||
QVector<EffectMeta> effects;
|
||||
QMutex effects_loaded;
|
||||
|
||||
Effect* create_effect(Clip* c, const EffectMeta* em) {
|
||||
@@ -67,16 +66,11 @@ Effect* create_effect(Clip* c, const EffectMeta* em) {
|
||||
}
|
||||
|
||||
const EffectMeta* get_internal_meta(int internal_id, int type) {
|
||||
for (int i=0;i<audio_effects.size();i++) {
|
||||
if (audio_effects.at(i).internal == internal_id && audio_effects.at(i).type == type) {
|
||||
return &audio_effects.at(i);
|
||||
for (int i=0;i<effects.size();i++) {
|
||||
if (effects.at(i).internal == internal_id && effects.at(i).type == type) {
|
||||
return &effects.at(i);
|
||||
}
|
||||
}
|
||||
for (int i=0;i<video_effects.size();i++) {
|
||||
if (video_effects.at(i).internal == internal_id && video_effects.at(i).type == type) {
|
||||
return &video_effects.at(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -85,47 +79,50 @@ void load_internal_effects() {
|
||||
|
||||
// internal effects
|
||||
em.type = EFFECT_TYPE_EFFECT;
|
||||
em.subtype = EFFECT_TYPE_AUDIO;
|
||||
|
||||
em.name = "Volume";
|
||||
em.internal = EFFECT_INTERNAL_VOLUME;
|
||||
audio_effects.append(em);
|
||||
effects.append(em);
|
||||
|
||||
em.name = "Pan";
|
||||
em.internal = EFFECT_INTERNAL_PAN;
|
||||
audio_effects.append(em);
|
||||
effects.append(em);
|
||||
|
||||
em.name = "Tone";
|
||||
em.internal = EFFECT_INTERNAL_TONE;
|
||||
audio_effects.append(em);
|
||||
effects.append(em);
|
||||
|
||||
em.name = "Noise";
|
||||
em.internal = EFFECT_INTERNAL_NOISE;
|
||||
audio_effects.append(em);
|
||||
effects.append(em);
|
||||
|
||||
em.subtype = EFFECT_TYPE_VIDEO;
|
||||
|
||||
em.name = "Transform";
|
||||
em.category = "Distort";
|
||||
em.internal = EFFECT_INTERNAL_TRANSFORM;
|
||||
video_effects.append(em);
|
||||
effects.append(em);
|
||||
|
||||
em.name = "Corner Pin";
|
||||
em.category = "Distort";
|
||||
em.internal = EFFECT_INTERNAL_CORNERPIN;
|
||||
video_effects.append(em);
|
||||
effects.append(em);
|
||||
|
||||
em.name = "Text";
|
||||
em.category = "Render";
|
||||
em.internal = EFFECT_INTERNAL_TEXT;
|
||||
video_effects.append(em);
|
||||
effects.append(em);
|
||||
|
||||
em.name = "Solid";
|
||||
em.category = "Render";
|
||||
em.internal = EFFECT_INTERNAL_SOLID;
|
||||
video_effects.append(em);
|
||||
effects.append(em);
|
||||
|
||||
em.name = "Shake";
|
||||
em.category = "Distort";
|
||||
em.internal = EFFECT_INTERNAL_SHAKE;
|
||||
video_effects.append(em);
|
||||
effects.append(em);
|
||||
|
||||
// internal transitions
|
||||
em.type = EFFECT_TYPE_TRANSITION;
|
||||
@@ -133,19 +130,21 @@ void load_internal_effects() {
|
||||
|
||||
em.name = "Cross Dissolve";
|
||||
em.internal = TRANSITION_INTERNAL_CROSSDISSOLVE;
|
||||
video_effects.append(em);
|
||||
effects.append(em);
|
||||
|
||||
em.subtype = EFFECT_TYPE_AUDIO;
|
||||
|
||||
em.name = "Linear Fade";
|
||||
em.internal = TRANSITION_INTERNAL_LINEARFADE;
|
||||
audio_effects.append(em);
|
||||
effects.append(em);
|
||||
|
||||
em.name = "Exponential Fade";
|
||||
em.internal = TRANSITION_INTERNAL_EXPONENTIALFADE;
|
||||
audio_effects.append(em);
|
||||
effects.append(em);
|
||||
|
||||
em.name = "Logarithmic Fade";
|
||||
em.internal = TRANSITION_INTERNAL_LOGARITHMICFADE;
|
||||
audio_effects.append(em);
|
||||
effects.append(em);
|
||||
}
|
||||
|
||||
void load_shader_effects() {
|
||||
@@ -176,11 +175,12 @@ void load_shader_effects() {
|
||||
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 = entries.at(i);
|
||||
em.internal = -1;
|
||||
video_effects.append(em);
|
||||
effects.append(em);
|
||||
} else {
|
||||
dout << "[ERROR] Invalid effect found in" << entries.at(i);
|
||||
}
|
||||
|
||||
+2
-2
@@ -31,10 +31,10 @@ struct EffectMeta {
|
||||
QString filename;
|
||||
int internal;
|
||||
int type;
|
||||
int subtype;
|
||||
};
|
||||
|
||||
extern QVector<EffectMeta> video_effects;
|
||||
extern QVector<EffectMeta> audio_effects;
|
||||
extern QVector<EffectMeta> effects;
|
||||
|
||||
double log_volume(double linear);
|
||||
void init_effects();
|
||||
|
||||
Reference in New Issue
Block a user