From: Good Guy Date: Fri, 28 Dec 2018 04:41:04 +0000 (-0700) Subject: add clip_icon svgs, tweak edl frame_align, fixes for plugin_sets in move_group, fix... X-Git-Tag: 2019-08~135 X-Git-Url: https://git.cinelerra-gg.org/git/?a=commitdiff_plain;h=f27f3030943396a02f563f3767d400939b70fbd8;p=goodguy%2Fcinelerra.git add clip_icon svgs, tweak edl frame_align, fixes for plugin_sets in move_group, fix delete_edits --- diff --git a/cinelerra-5.1/cinelerra/edl.C b/cinelerra-5.1/cinelerra/edl.C index 5f23b1b1..604dff51 100644 --- a/cinelerra-5.1/cinelerra/edl.C +++ b/cinelerra-5.1/cinelerra/edl.C @@ -49,6 +49,7 @@ #include "playbackconfig.h" #include "playabletracks.h" #include "plugin.h" +#include "pluginset.h" #include "preferences.h" #include "recordconfig.h" #include "recordlabel.h" @@ -798,18 +799,36 @@ void EDL::delete_edits(ArrayList *edits, int collapse) { if( session->labels_follow_edits ) delete_edit_labels(edits, collapse); + typedef struct { Track *track; int64_t start, end; } Zone; + ArrayList zones; for( int i=0; isize(); ++i ) { Edit *edit = edits->get(i); Track *track = edit->track; int64_t start = edit->startproject; - int end = start + edit->length; - track->clear(start, end, 1, 0, - session->plugins_follow_edits, - session->autos_follow_edits, 0); + int64_t end = start + edit->length; + Zone &zone = zones.append(); + zone.track = track; zone.start = start; zone.end = end; + if( session->autos_follow_edits ) { + track->automation->clear(start, end, 0, collapse); + } + if( session->plugins_follow_edits ) { + for( int k=0; kplugin_set.size(); ++k ) { + PluginSet *plugin_set = track->plugin_set[k]; + plugin_set->clear(start, end, 1); + if( !collapse ) + plugin_set->paste_silence(start, end); + } + } + track->optimize(); + } + for( int i=0; iedits->clear(start, end); if( !collapse ) - track->paste_silence(start, end, - session->plugins_follow_edits, - session->autos_follow_edits); + track->edits->paste_silence(start, end); + track->optimize(); } optimize(); } @@ -1276,13 +1295,15 @@ void EDL::get_shared_tracks(Track *track, } } -// aligned frame time +// aligned frame time, account for sample truncation double EDL::frame_align(double position, int round) { - double frame_pos = position * session->frame_rate; - frame_pos = (int64_t)(frame_pos + (round ? 0.5 : 1e-6)); - position = frame_pos / session->frame_rate; - return position; + if( !round && session->sample_rate > 0 ) { + int64_t sample_pos = position * session->sample_rate; + position = (sample_pos+2.) / session->sample_rate; + } + int64_t frame_pos = (position * session->frame_rate + (round ? 0.5 : 1e-6)); + return frame_pos / session->frame_rate; } // Convert position to frames if alignment is enabled. diff --git a/cinelerra-5.1/cinelerra/mwindowedit.C b/cinelerra-5.1/cinelerra/mwindowedit.C index a1e3d438..bf57912f 100644 --- a/cinelerra-5.1/cinelerra/mwindowedit.C +++ b/cinelerra-5.1/cinelerra/mwindowedit.C @@ -1023,7 +1023,7 @@ EDL *MWindow::selected_edits_to_clip(int packed, new_track->plugin_set[i] = new_plugin_set; } Plugin *plugin = (Plugin*)plugin_set->first; - int64_t startplugin = 0; + int64_t startplugin = new_plugin_set->length(); for( ; plugin ; plugin=(Plugin*)plugin->next ) { if( plugin->silence() ) continue; int64_t plugin_start_pos = plugin->startproject; @@ -1156,31 +1156,9 @@ void MWindow::move_edits(ArrayList *edits, void MWindow::move_group(EDL *group, Track *first_track, double position) { undo->update_undo_before(); - if( edl->session->labels_follow_edits ) { - ArrayListedits; - edl->tracks->get_selected_edits(&edits); - double dist = position - session->drag_group_position; - edl->move_edit_labels(&edits, dist); - } - for( Track *track=edl->tracks->first; track; track=track->next ) { - if( !track->record ) continue; - Edit *edit = track->edits->first; - for( Edit *next=0; edit; edit=next ) { - next = edit->next; - if( !edit->is_selected ) continue; - edit->is_selected = 0; - edit->group_id = 0; - int64_t start = edit->startproject; - int64_t end = start + edit->length; - track->clear(start, end, 1, 0, - edl->session->plugins_follow_edits, - edl->session->autos_follow_edits, 0); - track->paste_silence(start, end, - edl->session->plugins_follow_edits, - edl->session->autos_follow_edits); - next = track->edits->first; - } - } + ArrayListedits; + edl->tracks->get_selected_edits(&edits); + edl->delete_edits(&edits, 0); Track *src = group->tracks->first; for( Track *track=first_track; track && src; track=track->next ) { if( !track->record ) continue; @@ -1212,7 +1190,7 @@ void MWindow::move_group(EDL *group, Track *first_track, double position) for( int i=0; iplugin_set.size(); ++i ) { PluginSet *plugin_set = src->plugin_set[i]; if( !plugin_set ) continue; - while( track->plugin_set.size() < i ) + while( i >= track->plugin_set.size() ) track->plugin_set.append(0); PluginSet *dst_plugin_set = track->plugin_set[i]; if( !dst_plugin_set ) { diff --git a/cinelerra-5.1/doc/shortcuts.html b/cinelerra-5.1/doc/shortcuts.html index 1a39fea1..9cc4ab5a 100644 --- a/cinelerra-5.1/doc/shortcuts.html +++ b/cinelerra-5.1/doc/shortcuts.html @@ -1206,6 +1206,12 @@ Drag Clip drag + +
+ /font> + Drag + Drag unselected edit under cursor +

diff --git a/cinelerra-5.1/plugins/theme_blond/data/clip_icon.svg b/cinelerra-5.1/plugins/theme_blond/data/clip_icon.svg new file mode 100644 index 00000000..b8bc9fa6 --- /dev/null +++ b/cinelerra-5.1/plugins/theme_blond/data/clip_icon.svg @@ -0,0 +1,1092 @@ + + + Cinelerra GG Infinity move icon + + + + image/svg+xml + + Cinelerra GG Infinity move icon + + + + Sam D. + + + + + Sam D. + + + En + + + Cinelerra GG Infinity move icon + + + Cinelerra GG Infinity move icon + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cinelerra-5.1/plugins/theme_blond_cv/data/clip_icon.svg b/cinelerra-5.1/plugins/theme_blond_cv/data/clip_icon.svg new file mode 100644 index 00000000..b8bc9fa6 --- /dev/null +++ b/cinelerra-5.1/plugins/theme_blond_cv/data/clip_icon.svg @@ -0,0 +1,1092 @@ + + + Cinelerra GG Infinity move icon + + + + image/svg+xml + + Cinelerra GG Infinity move icon + + + + Sam D. + + + + + Sam D. + + + En + + + Cinelerra GG Infinity move icon + + + Cinelerra GG Infinity move icon + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cinelerra-5.1/plugins/theme_blue/data/clip_icon.svg b/cinelerra-5.1/plugins/theme_blue/data/clip_icon.svg new file mode 100644 index 00000000..b8bc9fa6 --- /dev/null +++ b/cinelerra-5.1/plugins/theme_blue/data/clip_icon.svg @@ -0,0 +1,1092 @@ + + + Cinelerra GG Infinity move icon + + + + image/svg+xml + + Cinelerra GG Infinity move icon + + + + Sam D. + + + + + Sam D. + + + En + + + Cinelerra GG Infinity move icon + + + Cinelerra GG Infinity move icon + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cinelerra-5.1/plugins/theme_hulk/data/clip_icon.svg b/cinelerra-5.1/plugins/theme_hulk/data/clip_icon.svg new file mode 100644 index 00000000..b8bc9fa6 --- /dev/null +++ b/cinelerra-5.1/plugins/theme_hulk/data/clip_icon.svg @@ -0,0 +1,1092 @@ + + + Cinelerra GG Infinity move icon + + + + image/svg+xml + + Cinelerra GG Infinity move icon + + + + Sam D. + + + + + Sam D. + + + En + + + Cinelerra GG Infinity move icon + + + Cinelerra GG Infinity move icon + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cinelerra-5.1/plugins/theme_pinklady/data/clip_icon.svg b/cinelerra-5.1/plugins/theme_pinklady/data/clip_icon.svg new file mode 100644 index 00000000..b8bc9fa6 --- /dev/null +++ b/cinelerra-5.1/plugins/theme_pinklady/data/clip_icon.svg @@ -0,0 +1,1092 @@ + + + Cinelerra GG Infinity move icon + + + + image/svg+xml + + Cinelerra GG Infinity move icon + + + + Sam D. + + + + + Sam D. + + + En + + + Cinelerra GG Infinity move icon + + + Cinelerra GG Infinity move icon + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cinelerra-5.1/plugins/theme_suv/data/clip_icon.svg b/cinelerra-5.1/plugins/theme_suv/data/clip_icon.svg new file mode 100644 index 00000000..b8bc9fa6 --- /dev/null +++ b/cinelerra-5.1/plugins/theme_suv/data/clip_icon.svg @@ -0,0 +1,1092 @@ + + + Cinelerra GG Infinity move icon + + + + image/svg+xml + + Cinelerra GG Infinity move icon + + + + Sam D. + + + + + Sam D. + + + En + + + Cinelerra GG Infinity move icon + + + Cinelerra GG Infinity move icon + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cinelerra-5.1/plugins/theme_unflat/data/clip_icon.svg b/cinelerra-5.1/plugins/theme_unflat/data/clip_icon.svg new file mode 100644 index 00000000..b8bc9fa6 --- /dev/null +++ b/cinelerra-5.1/plugins/theme_unflat/data/clip_icon.svg @@ -0,0 +1,1092 @@ + + + Cinelerra GG Infinity move icon + + + + image/svg+xml + + Cinelerra GG Infinity move icon + + + + Sam D. + + + + + Sam D. + + + En + + + Cinelerra GG Infinity move icon + + + Cinelerra GG Infinity move icon + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +