Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_sequencer/sequencer_edit.c
| Show First 20 Lines • Show All 171 Lines • ▼ Show 20 Lines | for (link = pj->queue.first; link; link = link->next) { | ||||
| BKE_sequencer_proxy_rebuild_finish(link->data, pj->stop); | BKE_sequencer_proxy_rebuild_finish(link->data, pj->stop); | ||||
| } | } | ||||
| BKE_sequencer_free_imbuf(pj->scene, &ed->seqbase, false); | BKE_sequencer_free_imbuf(pj->scene, &ed->seqbase, false); | ||||
| WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, pj->scene); | 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) | ||||
campbellbarton: Can pass `ReportList` instead of reports. | |||||
| { | { | ||||
| wmJob *wm_job; | wmJob *wm_job; | ||||
| ProxyJob *pj; | ProxyJob *pj; | ||||
| struct Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C); | struct Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C); | ||||
| Scene *scene = CTX_data_scene(C); | Scene *scene = CTX_data_scene(C); | ||||
| Editing *ed = BKE_sequencer_editing_get(scene, false); | Editing *ed = BKE_sequencer_editing_get(scene, false); | ||||
| ScrArea *sa = CTX_wm_area(C); | ScrArea *sa = CTX_wm_area(C); | ||||
| Sequence *seq; | Sequence *seq; | ||||
| Show All 22 Lines | if (!pj) { | ||||
| WM_jobs_customdata_set(wm_job, pj, proxy_freejob); | WM_jobs_customdata_set(wm_job, pj, proxy_freejob); | ||||
| WM_jobs_timer(wm_job, 0.1, NC_SCENE | ND_SEQUENCER, NC_SCENE | ND_SEQUENCER); | WM_jobs_timer(wm_job, 0.1, NC_SCENE | ND_SEQUENCER, NC_SCENE | ND_SEQUENCER); | ||||
| WM_jobs_callbacks(wm_job, proxy_startjob, NULL, NULL, proxy_endjob); | WM_jobs_callbacks(wm_job, proxy_startjob, NULL, NULL, proxy_endjob); | ||||
| } | } | ||||
| file_list = BLI_gset_new(BLI_ghashutil_strhash_p, BLI_ghashutil_strcmp, "file list"); | file_list = BLI_gset_new(BLI_ghashutil_strhash_p, BLI_ghashutil_strcmp, "file list"); | ||||
| SEQP_BEGIN (ed, seq) { | SEQP_BEGIN (ed, seq) { | ||||
| if ((seq->flag & SELECT)) { | 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); | 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; | SEQ_END; | ||||
| BLI_gset_free(file_list, MEM_freeN); | BLI_gset_free(file_list, MEM_freeN); | ||||
| if (!WM_jobs_is_running(wm_job)) { | if (!WM_jobs_is_running(wm_job)) { | ||||
| G.is_break = false; | G.is_break = false; | ||||
| ▲ Show 20 Lines • Show All 3,374 Lines • ▼ Show 20 Lines | void SEQUENCER_OT_view_ghost_border(wmOperatorType *ot) | ||||
| /* rna */ | /* rna */ | ||||
| WM_operator_properties_gesture_box(ot); | WM_operator_properties_gesture_box(ot); | ||||
| } | } | ||||
| /* rebuild_proxy operator */ | /* rebuild_proxy operator */ | ||||
| static int sequencer_rebuild_proxy_invoke(bContext *C, | static int sequencer_rebuild_proxy_invoke(bContext *C, | ||||
| wmOperator *UNUSED(op), | wmOperator *op, | ||||
| const wmEvent *UNUSED(event)) | const wmEvent *UNUSED(event)) | ||||
| { | { | ||||
| seq_proxy_build_job(C); | seq_proxy_build_job(C, op->reports); | ||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| } | } | ||||
| static int sequencer_rebuild_proxy_exec(bContext *C, wmOperator *UNUSED(op)) | static int sequencer_rebuild_proxy_exec(bContext *C, wmOperator *UNUSED(op)) | ||||
| { | { | ||||
| Main *bmain = CTX_data_main(C); | Main *bmain = CTX_data_main(C); | ||||
| struct Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); | struct Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); | ||||
| ▲ Show 20 Lines • Show All 561 Lines • Show Last 20 Lines | |||||
Can pass ReportList instead of reports.