Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_sequencer/sequencer_draw.c
| Show First 20 Lines • Show All 621 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| static void draw_seq_text_get_source(Sequence *seq, char *r_source, size_t source_len) | static void draw_seq_text_get_source(Sequence *seq, char *r_source, size_t source_len) | ||||
| { | { | ||||
| /* Set source for the most common types. */ | /* Set source for the most common types. */ | ||||
| if (ELEM(seq->type, SEQ_TYPE_IMAGE, SEQ_TYPE_MOVIE)) { | if (ELEM(seq->type, SEQ_TYPE_IMAGE, SEQ_TYPE_MOVIE)) { | ||||
| BLI_snprintf(r_source, source_len, "%s%s", seq->strip->dir, seq->strip->stripdata->name); | BLI_snprintf(r_source, source_len, "%s%s", seq->strip->dir, seq->strip->stripdata->name); | ||||
| } | } | ||||
| else if (seq->type == SEQ_TYPE_SOUND_RAM) { | else if (seq->type == SEQ_TYPE_SOUND_RAM && seq->sound != NULL) { | ||||
| if (seq->sound) { | |||||
| BLI_snprintf(r_source, source_len, "%s", seq->sound->filepath); | BLI_snprintf(r_source, source_len, "%s", seq->sound->filepath); | ||||
| } | } | ||||
| } | |||||
| else if (seq->type == SEQ_TYPE_MULTICAM) { | else if (seq->type == SEQ_TYPE_MULTICAM) { | ||||
| BLI_snprintf(r_source, source_len, "Channel: %d", seq->multicam_source); | BLI_snprintf(r_source, source_len, "Channel: %d", seq->multicam_source); | ||||
| } | } | ||||
| else if (seq->type == SEQ_TYPE_TEXT) { | else if (seq->type == SEQ_TYPE_TEXT) { | ||||
| TextVars *textdata = seq->effectdata; | TextVars *textdata = seq->effectdata; | ||||
| BLI_snprintf(r_source, source_len, "%s", textdata->text); | BLI_snprintf(r_source, source_len, "%s", textdata->text); | ||||
| } | } | ||||
| else if (seq->type == SEQ_TYPE_SCENE) { | else if (seq->type == SEQ_TYPE_SCENE && seq->scene != NULL) { | ||||
| if (seq->scene_camera) { | if (seq->scene_camera && seq->scene_camera != NULL) { | ||||
| BLI_snprintf(r_source, | BLI_snprintf(r_source, | ||||
| source_len, | source_len, | ||||
| "%s (%s)", | "%s (%s)", | ||||
| seq->scene->id.name + 2, | seq->scene->id.name + 2, | ||||
| ((ID *)seq->scene_camera)->name + 2); | ((ID *)seq->scene_camera)->name + 2); | ||||
| } | } | ||||
| else { | else { | ||||
| BLI_snprintf(r_source, source_len, "%s", seq->scene->id.name + 2); | BLI_snprintf(r_source, source_len, "%s", seq->scene->id.name + 2); | ||||
| } | } | ||||
| } | } | ||||
| else if (seq->type == SEQ_TYPE_MOVIECLIP) { | else if (seq->type == SEQ_TYPE_MOVIECLIP && seq->clip != NULL) { | ||||
| BLI_snprintf(r_source, source_len, "%s", seq->clip->id.name + 2); | BLI_snprintf(r_source, source_len, "%s", seq->clip->id.name + 2); | ||||
| } | } | ||||
| else if (seq->type == SEQ_TYPE_MASK) { | else if (seq->type == SEQ_TYPE_MASK && seq->mask != NULL) { | ||||
| BLI_snprintf(r_source, source_len, "%s", seq->mask->id.name + 2); | BLI_snprintf(r_source, source_len, "%s", seq->mask->id.name + 2); | ||||
| } | } | ||||
| else { | else { | ||||
| *r_source = '\0'; | *r_source = '\0'; | ||||
| } | } | ||||
| } | } | ||||
| static size_t draw_seq_text_get_overlay_string(SpaceSeq *sseq, | static size_t draw_seq_text_get_overlay_string(SpaceSeq *sseq, | ||||
| ▲ Show 20 Lines • Show All 1,747 Lines • Show Last 20 Lines | |||||