From a99b377167a6c073faa8bfd7398517084c66efa5 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Sat, 20 Oct 2012 10:28:34 +0000 Subject: More UI messages fixes and tweaks, and BKE_report<->BKE_reportf. --- source/blender/makesrna/intern/rna_sequencer_api.c | 25 +++++++++++----------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'source/blender/makesrna/intern/rna_sequencer_api.c') diff --git a/source/blender/makesrna/intern/rna_sequencer_api.c b/source/blender/makesrna/intern/rna_sequencer_api.c index 734703e6334..067589ca543 100644 --- a/source/blender/makesrna/intern/rna_sequencer_api.c +++ b/source/blender/makesrna/intern/rna_sequencer_api.c @@ -234,9 +234,10 @@ static Sequence *rna_Sequences_new_sound(ID *id, Editing *ed, Main *bmain, Repor } #else /* WITH_AUDASPACE */ static Sequence *rna_Sequences_new_sound(ID *UNUSED(id), Editing *UNUSED(ed), Main *UNUSED(bmain), ReportList *reports, - const char *UNUSED(name), const char *UNUSED(file), int UNUSED(channel), int UNUSED(start_frame)) + const char *UNUSED(name), const char *UNUSED(file), int UNUSED(channel), + int UNUSED(start_frame)) { - BKE_report(reports, RPT_ERROR, "Blender compiled without Audaspace support."); + BKE_report(reports, RPT_ERROR, "Blender compiled without Audaspace support"); return NULL; } #endif /* WITH_AUDASPACE */ @@ -249,39 +250,37 @@ static Sequence *rna_Sequences_new_effect(ID *id, Editing *ed, ReportList *repor Scene *scene = (Scene *)id; Sequence *seq; struct SeqEffectHandle sh; + int num_inputs = BKE_sequence_effect_get_num_inputs(type); - switch (BKE_sequence_effect_get_num_inputs(type)) { + switch (num_inputs) { case 0: if (end_frame <= start_frame) { - BKE_report(reports, RPT_ERROR, - "Sequences.new_effect: End frame not set"); + BKE_report(reports, RPT_ERROR, "Sequences.new_effect: end frame not set"); return NULL; } break; case 1: if (seq1 == NULL) { - BKE_report(reports, RPT_ERROR, - "Sequences.new_effect: Effect takes 1 input sequence"); + BKE_report(reports, RPT_ERROR, "Sequences.new_effect: effect takes 1 input sequence"); return NULL; } break; case 2: if (seq1 == NULL || seq2 == NULL) { - BKE_report(reports, RPT_ERROR, - "Sequences.new_effect: Effect takes 2 input sequences"); + BKE_report(reports, RPT_ERROR, "Sequences.new_effect: effect takes 2 input sequences"); return NULL; } break; case 3: if (seq1 == NULL || seq2 == NULL || seq3 == NULL) { - BKE_report(reports, RPT_ERROR, - "Sequences.new_effect: Effect takes 3 input sequences"); + BKE_report(reports, RPT_ERROR, "Sequences.new_effect: effect takes 3 input sequences"); return NULL; } break; default: - BKE_report(reports, RPT_ERROR, - "Sequences.new_effect: BKE_sequence_effect_get_num_inputs() > 3 (should never happen)"); + BKE_reportf(reports, RPT_ERROR, + "Sequences.new_effect: effect expects more than 3 inputs (%d, should never happen!)", + num_inputs); return NULL; } -- cgit v1.2.3