x += hue->get_w() + xs10;
hsv_h = new PaletteHSV(this, x,y= y0, hsv.h, 0, 360);
+ hsv_h->set_increment(1);
+ hsv_h->set_precision(1);
hsv_h->create_objects(); hsv_h->set_tooltip(_("Hue"));
hsv_s = new PaletteHSV(this, x,y+=ys25, hsv.s, 0, 1);
hsv_s->create_objects(); hsv_s->set_tooltip(_("Saturation"));
int EDL::collect_effects(EDL *&group)
{
// to remap shared plugins in copied plugin stack
- class shared : public ArrayList<int> { public: int trk; };
- class shared_list : public ArrayList<shared> {} shared_map;
+ edl_shared_list shared_map;
int ret = 0;
EDL *new_edl = new EDL(parent_edl ? parent_edl : this);
new_edl->create_objects();
if( !edit ) continue;
if( !track->record ) { ret = COLLECT_EFFECTS_RECORD; break; }
Track *new_track = 0;
- shared *location = 0;
+ edl_shared *location = 0;
int64_t start_pos = edit->startproject;
int64_t end_pos = start_pos + edit->length;
int pluginsets = track->plugin_set.size();
int m = shared_map.size(), n = -1;
while( --m>=0 && shared_map[m].trk!=trk );
if( m >= 0 ) {
- shared &location = shared_map[m];
+ edl_shared &location = shared_map[m];
n = location.size();
while( --n>=0 && location[n]!=set );
}
return ret;
}
+void edl_SharedLocations::add(int trk, int plg)
+{
+ SharedLocation &s = append();
+ s.module = trk; s.plugin = plg;
+}
+
// inserts pluginsets in group to first selected edit in tracks
int EDL::insert_effects(EDL *group, Track *first_track)
{
- class SharedLocations : public ArrayList<SharedLocation> {
- public:
- void add(int trk, int plg) {
- SharedLocation &s = append();
- s.module = trk; s.plugin = plg;
- }
- } edl_locs, new_locs;
+ edl_SharedLocations edl_locs, new_locs;
Track *new_track = group->tracks->first;
if( !first_track ) first_track = tracks->first;
Track *track = first_track;
#include <stdio.h>
#include <stdint.h>
+#include "arraylist.h"
#include "asset.inc"
#include "assets.inc"
#include "autoconf.inc"
#include "pluginserver.h"
#include "preferences.inc"
#include "recordlabel.inc"
-#include "sharedlocation.inc"
+#include "sharedlocation.h"
#include "theme.inc"
#include "tracks.inc"
#include "vedit.inc"
EDL *parent_edl;
};
+// remap plugin shares in collect/paste effects
+class edl_shared : public ArrayList<int> { public: int trk; };
+class edl_shared_list : public ArrayList<edl_shared> {};
+class edl_SharedLocations : public ArrayList<SharedLocation> {
+public:
+ void add(int trk, int plg);
+};
+
#endif
pos = first->startproject;
else if( last && pos > last->startproject+last->length )
pos = last->startproject+last->length;
+ KeyFrame *keyframe = 0;
Plugin *plugin = (Plugin*)editof(pos, dir, 0);
- if( !plugin ) return 0;
- KeyFrame *keyframe = (KeyFrame *)(dir == PLAY_FORWARD ?
- plugin->keyframes->nearest_after(pos) :
- plugin->keyframes->nearest_before(pos));
+ if( dir == PLAY_FORWARD ) {
+ for( ; !keyframe && plugin; plugin=(Plugin*)plugin->next ) {
+ if( plugin->plugin_type == PLUGIN_NONE ) continue;
+ keyframe = (KeyFrame *)plugin->keyframes->nearest_after(pos);
+ }
+ }
+ else {
+ for( ; !keyframe && plugin; plugin=(Plugin*)plugin->previous ) {
+ if( plugin->plugin_type == PLUGIN_NONE ) continue;
+ keyframe = (KeyFrame *)plugin->keyframes->nearest_before(pos);
+ }
+ }
return keyframe;
}