-
- Plugin *plugin = 0;
-
-// Position is identical to source plugin
- if(plugin_type == PLUGIN_SHAREDPLUGIN)
- {
- Track *source_track = tracks->get_item_number(shared_location->module);
- if(source_track)
- {
- Plugin *source_plugin = source_track->get_current_plugin(
- edl->local_session->get_selectionstart(1),
- shared_location->plugin,
- PLAY_FORWARD,
- 1,
- 0);
-
-// From an attach operation
- if(source_plugin)
- {
- plugin = plugin_set->insert_plugin(title,
- source_plugin->startproject,
- source_plugin->length,
- plugin_type,
- shared_location,
- default_keyframe,
- 1);
- }
- else
-// From a drag operation
- {
- plugin = plugin_set->insert_plugin(title,
- to_units(start, 0),
- to_units(length, 1),
- plugin_type,
- shared_location,
- default_keyframe,
- 1);
- }
- }
- }
- else
- {
-// This should be done in the caller
- if(EQUIV(length, 0))
- {
- if(edl->local_session->get_selectionend() >
- edl->local_session->get_selectionstart())
- {
- start = edl->local_session->get_selectionstart();
- length = edl->local_session->get_selectionend() - start;
- }
- else
- {
- start = 0;
- length = get_length();
- }
- }
-//printf("Track::insert_effect %f %f %d %d\n", start, length, to_units(start, 0),
-// to_units(length, 0));
-
- plugin = plugin_set->insert_plugin(title,
- to_units(start, 0),
- to_units(length, 1),
- plugin_type,
- shared_location,
- default_keyframe,
- 1);
- }
-//printf("Track::insert_effect 2 %f %f\n", start, length);
-
+ Plugin *plugin = plugin_set->insert_plugin(title,
+ to_units(start, 0), to_units(length, 1), plugin_type,
+ shared_location, default_keyframe, 1);