Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_sequencer/sequencer_edit.c
| Context not available. | |||||
| } | } | ||||
| 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"); | ||||
| bool selected = false; /* Check for no selected strips */ | |||||
| SEQP_BEGIN (ed, seq) { | SEQP_BEGIN (ed, seq) { | ||||
| if ((seq->flag & SELECT)) { | if ((seq->flag & SELECT)) { | ||||
| bool success = BKE_sequencer_proxy_rebuild_context( | selected = true; | ||||
| pj->main, pj->depsgraph, pj->scene, seq, file_list, &pj->queue); | if (ELEM(seq->type, | ||||
| if (!success) { | SEQ_TYPE_MOVIE, | ||||
| BKE_reportf(reports, RPT_ERROR, "Could not build proxy for strip %s", seq->name); | SEQ_TYPE_IMAGE, | ||||
| SEQ_TYPE_META)) { | |||||
| if (!(seq->flag & SEQ_USE_PROXY)) { | |||||
| BKE_reportf(reports, RPT_INFO, "Proxy is not enabled for %s, skipping.", seq->name); | |||||
| } | |||||
| else if (seq->strip->proxy->build_size_flags == 0) { | |||||
| BKE_reportf( | |||||
ISS: I am not sure if this is useful to check. This should definitely not throw error. Personally… | |||||
| reports, RPT_INFO, "Resolution is not selected for %s, skipping.", seq->name); | |||||
| } | |||||
| else if ((seq->strip->proxy->build_flags & SEQ_PROXY_SKIP_EXISTING) != 0) { | |||||
| BKE_reportf(reports, RPT_INFO, "Overwrite is not checked for %s, skipping.", seq->name); | |||||
| } | |||||
| else{ | |||||
Not Done Inline ActionsYou can only do this check if success is false. bool success = BKE_sequencer_proxy_rebuild_context(
pj->main, pj->depsgraph, pj->scene, seq, file_list, &pj->queue);
if (!success) {
if ((seq->strip->proxy->build_flags & SEQ_PROXY_SKIP_EXISTING) != 0) {
BKE_reportf(reports, RPT_WARNING, "Overwrite is not checked for %s", seq->name);
}
else { /* Unknown error */
BKE_reportf(reports, RPT_ERROR, "Could not build proxy for %s", seq->name);
}
}ISS: You can only do this check if `success` is false.
```
bool success =… | |||||
| BKE_sequencer_proxy_rebuild_context( | |||||
Not Done Inline ActionsThis check should not be necessary, because it is checked in BKE_sequencer_proxy_rebuild_context and if strip hasn't got this member initialized, it will return success = true Therefore even else {...} branch will never be executed and should be removed. ISS: This check should not be necessary, because it is checked in… | |||||
| pj->main, pj->depsgraph, pj->scene, seq, file_list, &pj->queue); | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
Not Done Inline ActionsThis flag is set in build_flags not build_size_flags ISS: This flag is set in `build_flags` not `build_size_flags` | |||||
| SEQ_END; | SEQ_END; | ||||
| if (!selected) { | |||||
| BKE_reportf(reports, RPT_WARNING, "Select one or more strips."); | |||||
| return; | |||||
Not Done Inline ActionsThis can generate too much noise if you select all strips and rebuild proxies. What I was suggesting was to only run WM_jobs_start(CTX_wm_manager(C), wm_job); if there is at least 1 valid strip in selection. You could throw this error in case there isn't. ISS: This can generate too much noise if you select all strips and rebuild proxies.
What I was… | |||||
| } | |||||
Not Done Inline ActionsThis condition is incorrect. it should be if (!overwrite) ISS: This condition is incorrect. it should be `if (!overwrite)` | |||||
| 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)) { | ||||
Not Done Inline Actionsparameter op is unused, forgot to mention last time. ISS: parameter `op` is unused, forgot to mention last time. | |||||
| Context not available. | |||||
| if (ELEM(seq->type, | if (ELEM(seq->type, | ||||
| SEQ_TYPE_MOVIE, | SEQ_TYPE_MOVIE, | ||||
| SEQ_TYPE_IMAGE, | SEQ_TYPE_IMAGE, | ||||
| SEQ_TYPE_META, | SEQ_TYPE_META)) { | ||||
| SEQ_TYPE_SCENE, | |||||
| SEQ_TYPE_MULTICAM)) { | |||||
| BKE_sequencer_proxy_set(seq, turnon); | BKE_sequencer_proxy_set(seq, turnon); | ||||
| if (seq->strip->proxy == NULL) { | if (seq->strip->proxy == NULL) { | ||||
| continue; | continue; | ||||
| Context not available. | |||||
I am not sure if this is useful to check. This should definitely not throw error. Personally RPT_INFO would be appropriate with message Proxy is not enabled for %s, skipping.