Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_sequencer_api.c
| Show First 20 Lines • Show All 441 Lines • ▼ Show 20 Lines | static void rna_SequenceElements_pop(ID *id, Sequence *seq, ReportList *reports, int index) | ||||
| MEM_freeN(seq->strip->stripdata); | MEM_freeN(seq->strip->stripdata); | ||||
| seq->strip->stripdata = new_seq; | seq->strip->stripdata = new_seq; | ||||
| BKE_sequence_calc_disp(scene, seq); | BKE_sequence_calc_disp(scene, seq); | ||||
| WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene); | WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene); | ||||
| } | } | ||||
| static void rna_Sequence_invalidate_cache_rnafunc(ID *id, Sequence *self, int type) | |||||
| { | |||||
| switch (type) { | |||||
| case SEQ_CACHE_STORE_RAW: | |||||
| BKE_sequence_invalidate_cache_raw((Scene *)id, self); | |||||
| break; | |||||
| case SEQ_CACHE_STORE_PREPROCESSED: | |||||
| BKE_sequence_invalidate_cache_preprocessed((Scene *)id, self); | |||||
| break; | |||||
| case SEQ_CACHE_STORE_COMPOSITE: | |||||
| BKE_sequence_invalidate_cache_composite((Scene *)id, self); | |||||
| break; | |||||
| } | |||||
| } | |||||
| #else | #else | ||||
| void RNA_api_sequence_strip(StructRNA *srna) | void RNA_api_sequence_strip(StructRNA *srna) | ||||
| { | { | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| static const EnumPropertyItem seq_cahce_type_items[] = { | |||||
| {SEQ_CACHE_STORE_RAW, "RAW", 0, "Raw", ""}, | |||||
| {SEQ_CACHE_STORE_PREPROCESSED, "PREPROCESSED", 0, "Preprocessed", ""}, | |||||
| {SEQ_CACHE_STORE_COMPOSITE, "COMPOSITE", 0, "Composite", ""}, | |||||
| {0, NULL, 0, NULL, NULL}, | |||||
| }; | |||||
| func = RNA_def_function(srna, "update", "rna_Sequence_update_rnafunc"); | func = RNA_def_function(srna, "update", "rna_Sequence_update_rnafunc"); | ||||
| RNA_def_function_flag(func, FUNC_USE_SELF_ID); | RNA_def_function_flag(func, FUNC_USE_SELF_ID); | ||||
| RNA_def_function_ui_description(func, "Update the strip dimensions"); | RNA_def_function_ui_description(func, "Update the strip dimensions"); | ||||
| parm = RNA_def_boolean(func, "data", false, "Data", "Update strip data"); | parm = RNA_def_boolean(func, "data", false, "Data", "Update strip data"); | ||||
| func = RNA_def_function(srna, "strip_elem_from_frame", "BKE_sequencer_give_stripelem"); | func = RNA_def_function(srna, "strip_elem_from_frame", "BKE_sequencer_give_stripelem"); | ||||
| RNA_def_function_ui_description(func, "Return the strip element from a given frame or None"); | RNA_def_function_ui_description(func, "Return the strip element from a given frame or None"); | ||||
| parm = RNA_def_int(func, | parm = RNA_def_int(func, | ||||
| Show All 9 Lines | void RNA_api_sequence_strip(StructRNA *srna) | ||||
| RNA_def_function_return( | RNA_def_function_return( | ||||
| func, | func, | ||||
| RNA_def_pointer(func, "elem", "SequenceElement", "", "strip element of the current frame")); | RNA_def_pointer(func, "elem", "SequenceElement", "", "strip element of the current frame")); | ||||
| func = RNA_def_function(srna, "swap", "rna_Sequence_swap_internal"); | func = RNA_def_function(srna, "swap", "rna_Sequence_swap_internal"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| parm = RNA_def_pointer(func, "other", "Sequence", "Other", ""); | parm = RNA_def_pointer(func, "other", "Sequence", "Other", ""); | ||||
| RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED); | ||||
| func = RNA_def_function(srna, "invalidate_cache", "rna_Sequence_invalidate_cache_rnafunc"); | |||||
| RNA_def_function_flag(func, FUNC_USE_SELF_ID); | |||||
| RNA_def_function_ui_description(func, "Invalidate Cached images for strip and all dependant strips. "); | |||||
brecht: This description should be extended, and perhaps the function name can be changed to… | |||||
brechtUnsubmitted Not Done Inline ActionsChange to this (capitalization, US english spelling for dependent, and remove dot) : "Invalidate cached images for strip and all dependent strips" brecht: Change to this (capitalization, US english spelling for dependent, and remove dot) :
```… | |||||
| parm = RNA_def_enum(func, "type", seq_cahce_type_items, 0, "Type", "Cache Type"); | |||||
Done Inline Actionscache type -> Cache Type brecht: cache type -> Cache Type | |||||
| RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED); | |||||
| } | } | ||||
| void RNA_api_sequence_elements(BlenderRNA *brna, PropertyRNA *cprop) | void RNA_api_sequence_elements(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| ▲ Show 20 Lines • Show All 245 Lines • Show Last 20 Lines | |||||
This description should be extended, and perhaps the function name can be changed to invalidate_cache? Otherwise it's not clear at all this is related to the cache.