sequence duplication for #97

This commit is contained in:
itsmattkc
2018-07-04 01:21:32 +01:00
parent b3d1199fd3
commit d7a891fdd6
13 changed files with 74 additions and 3 deletions
+19
View File
@@ -17,6 +17,25 @@ Sequence::~Sequence() {
}
}
Sequence* Sequence::copy() {
Sequence* s = new Sequence();
s->name = name + " (copy)";
s->width = width;
s->height = height;
s->frame_rate = frame_rate;
s->audio_frequency = audio_frequency;
s->audio_layout = audio_layout;
for (int i=0;i<clip_count();i++) {
Clip* c = get_clip(i);
if (c != NULL) {
Clip* copy = c->copy();
copy->linked = c->linked;
s->add_clip(copy);
}
}
return s;
}
void Sequence::add_clip(Clip* c) {
c->id = clip_count();
clips.append(c);