X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fedit.C;h=8ef1735538305bc39f4729e21e76a4fca407f246;hp=c680d8c634c4854ba86eb64af4eae0449ac17d01;hb=9a7a880b549aed850fd3c29abb152d69a94e23f8;hpb=7fd85fb66168f6b518c5f2d73e04036e87faa0e1 diff --git a/cinelerra-5.1/cinelerra/edit.C b/cinelerra-5.1/cinelerra/edit.C index c680d8c6..8ef17355 100644 --- a/cinelerra-5.1/cinelerra/edit.C +++ b/cinelerra-5.1/cinelerra/edit.C @@ -83,8 +83,11 @@ void Edit::reset() user_title[0] = 0; nested_edl = 0; is_plugin = 0; + is_selected = 0; hard_left = 0; hard_right = 0; + color = 0; + group_id = 0; } Indexable* Edit::get_source() @@ -140,6 +143,8 @@ int Edit::copy(int64_t start, file->tag.set_property("LENGTH", length_in_selection); file->tag.set_property("HARD_LEFT", hard_left); file->tag.set_property("HARD_RIGHT", hard_right); + file->tag.set_property("COLOR", color); + file->tag.set_property("GROUP_ID", group_id); if(user_title[0]) file->tag.set_property("USER_TITLE", user_title); //printf("Edit::copy 5\n"); @@ -237,7 +242,15 @@ int Edit::silence() asset || nested_edl : *((SEdit *)this)->get_text()) ? 0 : 1; } - +void Edit::mute() +{ + if( track->data_type != TRACK_SUBTITLE ) { + asset = 0; + nested_edl = 0; + } + else + *((SEdit *)this)->get_text() = 0; +} void Edit::copy_from(Edit *edit) { @@ -248,6 +261,8 @@ void Edit::copy_from(Edit *edit) this->length = edit->length; this->hard_left = edit->hard_left; this->hard_right = edit->hard_right; + this->color = edit->color; + this->group_id = edit->group_id; strcpy (this->user_title, edit->user_title); if(edit->transition) @@ -323,8 +338,6 @@ int Edit::identical(Edit &edit) this->startsource == edit.startsource && this->startproject == edit.startproject && this->length == edit.length && - this->hard_left == edit.hard_left && - this->hard_right == edit.hard_right && this->transition == edit.transition && this->channel == edit.channel); return result; @@ -376,7 +389,8 @@ int Edit::dump(FILE *fp) asset, asset ? asset->path : ""); fflush(fp); - fprintf(fp," channel %d\n", channel); + fprintf(fp," channel %d, color %08x, group_id %d, is_selected %d\n", + channel, color, group_id, is_selected); if(transition) { fprintf(fp," TRANSITION %p\n", transition); @@ -393,6 +407,8 @@ int Edit::load_properties(FileXML *file, int64_t &startproject) length = file->tag.get_property("LENGTH", (int64_t)0); hard_left = file->tag.get_property("HARD_LEFT", (int64_t)0); hard_right = file->tag.get_property("HARD_RIGHT", (int64_t)0); + color = file->tag.get_property("COLOR", 0); + group_id = file->tag.get_property("GROUP_ID", group_id); user_title[0] = 0; file->tag.get_property("USER_TITLE", user_title); this->startproject = startproject; @@ -750,34 +766,6 @@ int Edit::shift_end_out(int edit_mode, return 0; } - - - - - - - - - - - - - - - - - - - - - - - - - - - - int Edit::popup_transition(float view_start, float zoom_units, int cursor_x, int cursor_y) { int64_t left, right, left_unit, right_unit;