Changeset View
Standalone View
source/blender/makesrna/intern/rna_sequencer.c
| Show First 20 Lines • Show All 604 Lines • ▼ Show 20 Lines | |||||
| static void rna_Sequence_text_font_set(PointerRNA *ptr, | static void rna_Sequence_text_font_set(PointerRNA *ptr, | ||||
| PointerRNA ptr_value, | PointerRNA ptr_value, | ||||
| struct ReportList *UNUSED(reports)) | struct ReportList *UNUSED(reports)) | ||||
| { | { | ||||
| Sequence *seq = ptr->data; | Sequence *seq = ptr->data; | ||||
| TextVars *data = seq->effectdata; | TextVars *data = seq->effectdata; | ||||
| VFont *value = ptr_value.data; | VFont *value = ptr_value.data; | ||||
| BKE_sequencer_text_font_unload(data, true); | BKE_sequencer_text_font_unload(data, true); | ||||
| id_us_plus(&value->id); | |||||
| data->text_blf_id = SEQ_FONT_NOT_LOADED; | |||||
| data->text_font = value; | data->text_font = value; | ||||
brecht: I think it should not be modifying BLF here at all, if it's just about vfont?
Because if there… | |||||
| BKE_sequencer_text_font_load(data, true); | |||||
sergeyUnsubmitted Done Inline ActionsGenerally, no heavy actions should happen in set(). You still be to be able to render sequencer right after opening a file, so I don't see a need to force load here. sergey: Generally, no heavy actions should happen in `set()`.
You still be to be able to render… | |||||
ISSAuthorUnsubmitted Done Inline ActionsIssue here is, that BLF_load() was executed from non-main thread by render job, which shouldn't happen. As complete alternative solution may be to make these BLF functions thread safe, that is still an option. ISS: Issue here is, that BLF_load() was executed from non-main thread by render job, which shouldn't… | |||||
sergeyUnsubmitted Done Inline ActionsBut if you setup VSE scene, save and reload, this code isn't run. So somewhere BLF_load() is to happen. So where is this case handled? sergey: But if you setup VSE scene, save and reload, this code isn't run. So somewhere `BLF_load()` is… | |||||
ISSAuthorUnsubmitted Done Inline ActionsThis will happen in BKE_sequence_base_dupli_recursive() during DEG_evaluate_on_refresh() which will happen on load. It shouldn't happen there, but it does now. I should probably bring back SEQ_FONT_NOT_LOADED flag and just don't unload/load fonts during CoW update. So we will still trigger the assert, but fonts will be loaded on demand. ISS: This will happen in `BKE_sequence_base_dupli_recursive()` during `DEG_evaluate_on_refresh()`… | |||||
| } | } | ||||
| /* name functions that ignore the first two characters */ | /* name functions that ignore the first two characters */ | ||||
| static void rna_Sequence_name_get(PointerRNA *ptr, char *value) | static void rna_Sequence_name_get(PointerRNA *ptr, char *value) | ||||
| { | { | ||||
| Sequence *seq = (Sequence *)ptr->data; | Sequence *seq = (Sequence *)ptr->data; | ||||
| BLI_strncpy(value, seq->name + 2, sizeof(seq->name) - 2); | BLI_strncpy(value, seq->name + 2, sizeof(seq->name) - 2); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 2,653 Lines • Show Last 20 Lines | |||||
I think it should not be modifying BLF here at all, if it's just about vfont?
Because if there is a font loaded and it's just being cleared here, BLF font reference counting will be wrong.