#include "affine.h"
#include "bccolors.h"
#include "clip.h"
+#include "edl.h"
+#include "edlsession.h"
#include "filexml.h"
#include "language.h"
#include "findobj.h"
#include "plugin.h"
#include "pluginserver.h"
#include "track.h"
+#include "tracks.h"
#include <errno.h>
#include <exception>
config.boundaries();
}
+Track *FindObjMain::get_plugin_track()
+{
+ int plugin_id = server->plugin_id;
+ Plugin *plugin = server->edl->tracks->plugin_exists(plugin_id);
+ return !plugin ? 0 : plugin->track;
+}
+
void FindObjMain::draw_line(VFrame *vframe, int x1, int y1, int x2, int y2)
{
vframe->draw_line(x1, y1, x2, y2);
object_layer = config.object_layer;
scene_layer = config.scene_layer;
replace_layer = config.replace_layer;
- Track *track = server->plugin->track;
- w = track->track_w;
- h = track->track_h;
+ Track *track = get_plugin_track();
+ w = track ? track->track_w : get_edl()->session->output_w;
+ h = track ? track->track_h : get_edl()->session->output_h;
int max_layer = PluginClient::get_total_buffers() - 1;
object_layer = bclip(config.object_layer, 0, max_layer);