X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fpluginset.C;h=cdc4a7848d1bd7faa778d3bf6274521afc253ea2;hb=ab209efd7893132268c7dc159cd78a4574276946;hp=e46fbd326f256011a2365a08151e61543f8fd4f9;hpb=7fd85fb66168f6b518c5f2d73e04036e87faa0e1;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/pluginset.C b/cinelerra-5.1/cinelerra/pluginset.C index e46fbd32..cdc4a784 100644 --- a/cinelerra-5.1/cinelerra/pluginset.C +++ b/cinelerra-5.1/cinelerra/pluginset.C @@ -138,24 +138,15 @@ void PluginSet::synchronize_params(PluginSet *plugin_set) } Plugin* PluginSet::insert_plugin(const char *title, - int64_t unit_position, - int64_t unit_length, - int plugin_type, - SharedLocation *shared_location, - KeyFrame *default_keyframe, + int64_t unit_position, int64_t unit_length, int plugin_type, + SharedLocation *shared_location, KeyFrame *default_keyframe, int do_optimize) { Plugin *plugin = (Plugin*)create_silence(unit_position, unit_position + unit_length); - if(title) strcpy(plugin->title, title); - if(shared_location) plugin->shared_location = *shared_location; - plugin->plugin_type = plugin_type; - - if(default_keyframe) - *plugin->keyframes->default_auto = *default_keyframe; - plugin->keyframes->default_auto->position = unit_position; - + plugin->init(title, unit_position, unit_length, plugin_type, + shared_location, default_keyframe); // May delete the plugin we just added so not desirable while loading. - if(do_optimize) optimize(); + if( do_optimize ) optimize(); return plugin; } @@ -517,7 +508,7 @@ int PluginSet::optimize() source; source = (KeyFrame*)source->next) { KeyFrame *dest = new KeyFrame(edl, current_edit->keyframes); - *dest = *source; + dest->copy_from(source); current_edit->keyframes->append(dest); } remove(next_edit);