projects
/
goodguy
/
cinelerra.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
configure.ac add with-cuda/nv, update cakewalk theme, add cuda/plugins=mandel+nbody...
[goodguy/cinelerra.git]
/
cinelerra-5.1
/
cinelerra
/
track.C
diff --git
a/cinelerra-5.1/cinelerra/track.C
b/cinelerra-5.1/cinelerra/track.C
index 24de614f43d48fb788fffe1c7a21e0e053ce6649..ee16058bd1db7054d97c5a3f9eb9979288402c77 100644
(file)
--- a/
cinelerra-5.1/cinelerra/track.C
+++ b/
cinelerra-5.1/cinelerra/track.C
@@
-80,9
+80,10
@@
void Track::create_objects()
{
}
{
}
-
-int Track::copy_settings(Track *track)
+int Track::copy_settings(Track *track, int do_title)
{
{
+ if( do_title )
+ strcpy(this->title, track->title);
this->expand_view = track->expand_view;
this->draw = track->draw;
this->gang = track->gang;
this->expand_view = track->expand_view;
this->draw = track->draw;
this->gang = track->gang;
@@
-92,7
+93,6
@@
int Track::copy_settings(Track *track)
this->play = track->play;
this->track_w = track->track_w;
this->track_h = track->track_h;
this->play = track->play;
this->track_w = track->track_w;
this->track_h = track->track_h;
- strcpy(this->title, track->title);
return 0;
}
return 0;
}
@@
-194,12
+194,9
@@
void Track::copy_from(Track *track)
{
copy_settings(track);
edits->copy_from(track->edits);
{
copy_settings(track);
edits->copy_from(track->edits);
- for(int i = 0; i < this->plugin_set.total; i++)
- delete this->plugin_set.values[i];
this->plugin_set.remove_all_objects();
this->plugin_set.remove_all_objects();
- for(int i = 0; i < track->plugin_set.total; i++)
- {
+ for( int i=0; i<track->plugin_set.total; ++i ) {
PluginSet *new_plugin_set = plugin_set.append(new PluginSet(edl, this));
new_plugin_set->copy_from(track->plugin_set.values[i]);
}
PluginSet *new_plugin_set = plugin_set.append(new PluginSet(edl, this));
new_plugin_set->copy_from(track->plugin_set.values[i]);
}
@@
-444,7
+441,8
@@
void Track::insert_track(Track *track,
//printf("Track::insert_track %d %s %jd\n", __LINE__, title, min_length);
// Decide whether to copy settings based on load_mode
//printf("Track::insert_track %d %s %jd\n", __LINE__, title, min_length);
// Decide whether to copy settings based on load_mode
- if(replace_default) copy_settings(track);
+ if( replace_default )
+ copy_settings(track, 0);
edits->insert_edits(track->edits,
to_units(position, 0),
edits->insert_edits(track->edits,
to_units(position, 0),
@@
-853,46
+851,22
@@
void Track::synchronize_params(Track *track)
}
}
-
-
-
int Track::dump(FILE *fp)
{
int Track::dump(FILE *fp)
{
- fprintf(fp," Data type %d\n", data_type);
+ fprintf(fp," Data type %d, draw %d, gang %d, play %d, record %d, nudge %jd\n",
+ data_type, draw, gang, play, record, nudge);
fprintf(fp," Title %s\n", title);
fprintf(fp," Edits:\n");
for(Edit* current = edits->first; current; current = NEXT)
fprintf(fp," Title %s\n", title);
fprintf(fp," Edits:\n");
for(Edit* current = edits->first; current; current = NEXT)
- {
current->dump(fp);
current->dump(fp);
- }
automation->dump(fp);
fprintf(fp," Plugin Sets: %d\n", plugin_set.total);
automation->dump(fp);
fprintf(fp," Plugin Sets: %d\n", plugin_set.total);
- for(int i = 0; i < plugin_set.total; i++)
- plugin_set.values[i]->dump(fp);
-//printf("Track::dump 2\n");
+ for( int i=0; i<plugin_set.total; ++i )
+ plugin_set[i]->dump(fp);
return 0;
}
return 0;
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Track::Track() : ListItem<Track>()
{
Track::Track() : ListItem<Track>()
{
@@
-1062,10
+1036,8
@@
void Track::set_automation_mode(double selectionstart,
-int Track::copy(double start,
- double end,
- FileXML *file,
- const char *output_path)
+int Track::copy(int copy_flags, double start, double end,
+ FileXML *file, const char *output_path)
{
// Use a copy of the selection in converted units
// So copy_automation doesn't reconvert.
{
// Use a copy of the selection in converted units
// So copy_automation doesn't reconvert.
@@
-1105,16
+1077,18
@@
int Track::copy(double start,
// file->append_tag();
// file->append_newline();
// file->append_tag();
// file->append_newline();
- edits->copy(start_unit, end_unit, file, output_path);
-
- AutoConf auto_conf;
- auto_conf.set_all(1);
- automation->copy(start_unit, end_unit, file, 0, 0);
+ if( (copy_flags & COPY_EDITS) )
+ edits->copy(start_unit, end_unit, file, output_path);
+ if( (copy_flags & COPY_AUTOS) ) {
+ AutoConf auto_conf;
+ auto_conf.set_all(1);
+ automation->copy(start_unit, end_unit, file, 0, 0);
+ }
- for(int i = 0; i < plugin_set.total; i++)
- {
- plugin_set.values[i]->copy(start_unit, end_unit, file);
+ if( (copy_flags & COPY_PLUGINS) ) {
+ for( int i=0; i<plugin_set.total; ++i )
+
plugin_set.values[i]->copy(start_unit, end_unit, file);
}
copy_derived(start_unit, end_unit, file);
}
copy_derived(start_unit, end_unit, file);