diff options
author | Richard Antalik <richardantalik@gmail.com> | 2019-11-03 06:29:59 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2019-11-03 06:57:11 +0300 |
commit | 8ab6ef30ab28e6c73fc9309c0b21ddbc1cd3afc9 (patch) | |
tree | 3f8a11294984abeb94406c1ba6fc3cc662a844db /source/blender/editors/space_sequencer | |
parent | 93f93e6b45581659b0622f47526d538bdbd6ef33 (diff) |
Fix T68018: Crash on building movie proxy
Skip building proxy if directory can not be created.
Crash happens, when setting custom dir to location of source file itself.
This results in attempt to create directory with the same name as source file.
Differential Revision: https://developer.blender.org/D6148
Reviewed By: sergey
Diffstat (limited to 'source/blender/editors/space_sequencer')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_edit.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 865dfb45278..ca1c55b80eb 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -177,7 +177,7 @@ static void proxy_endjob(void *pjv) WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, pj->scene); } -static void seq_proxy_build_job(const bContext *C) +static void seq_proxy_build_job(const bContext *C, ReportList *reports) { wmJob *wm_job; ProxyJob *pj; @@ -216,8 +216,12 @@ static void seq_proxy_build_job(const bContext *C) file_list = BLI_gset_new(BLI_ghashutil_strhash_p, BLI_ghashutil_strcmp, "file list"); SEQP_BEGIN (ed, seq) { if ((seq->flag & SELECT)) { - BKE_sequencer_proxy_rebuild_context( + bool success = BKE_sequencer_proxy_rebuild_context( pj->main, pj->depsgraph, pj->scene, seq, file_list, &pj->queue); + if (!success) { + + BKE_reportf(reports, RPT_ERROR, "Could not build proxy for strip %s", &seq->name); + } } } SEQ_END; @@ -3608,10 +3612,10 @@ void SEQUENCER_OT_view_ghost_border(wmOperatorType *ot) /* rebuild_proxy operator */ static int sequencer_rebuild_proxy_invoke(bContext *C, - wmOperator *UNUSED(op), + wmOperator *op, const wmEvent *UNUSED(event)) { - seq_proxy_build_job(C); + seq_proxy_build_job(C, op->reports); return OPERATOR_FINISHED; } |