58static void rna_Strip_swap_internal(
ID *
id,
63 const char *error_msg;
71static void rna_Strips_move_strip_to_meta(
75 const char *error_msg;
91static Strip *rna_Strip_split(
ID *
id,
97 bool ignore_connections)
102 const char *error_msg =
nullptr;
111 if (error_msg !=
nullptr) {
124static Strip *rna_Strip_parent_meta(
ID *
id,
Strip *strip_self)
130static Strip *rna_Strips_new_clip(
ID *
id,
151static Strip *rna_Strips_editing_new_clip(
ID *
id,
159 return rna_Strips_new_clip(
id, &ed->
seqbase, bmain,
name, clip, channel, frame_start);
162static Strip *rna_Strips_meta_new_clip(
ID *
id,
170 return rna_Strips_new_clip(
id, &strip->
seqbase, bmain,
name, clip, channel, frame_start);
173static Strip *rna_Strips_new_mask(
ID *
id,
193static Strip *rna_Strips_editing_new_mask(
196 return rna_Strips_new_mask(
id, &ed->
seqbase, bmain,
name,
mask, channel, frame_start);
199static Strip *rna_Strips_meta_new_mask(
202 return rna_Strips_new_mask(
id, &strip->
seqbase, bmain,
name,
mask, channel, frame_start);
205static Strip *rna_Strips_new_scene(
ID *
id,
226static Strip *rna_Strips_editing_new_scene(
ID *
id,
234 return rna_Strips_new_scene(
id, &ed->
seqbase, bmain,
name, sce_strip, channel, frame_start);
237static Strip *rna_Strips_meta_new_scene(
ID *
id,
245 return rna_Strips_new_scene(
id, &strip->
seqbase, bmain,
name, sce_strip, channel, frame_start);
248static Strip *rna_Strips_new_image(
ID *
id,
273 "View transform set to %s (converted from %s)",
291static Strip *rna_Strips_editing_new_image(
ID *
id,
301 return rna_Strips_new_image(
302 id, &ed->
seqbase, bmain, reports,
name, file, channel, frame_start, fit_method);
305static Strip *rna_Strips_meta_new_image(
ID *
id,
315 return rna_Strips_new_image(
316 id, &strip->
seqbase, bmain, reports,
name, file, channel, frame_start, fit_method);
319static Strip *rna_Strips_new_movie(
ID *
id,
344 "View transform set to %s (converted from %s)",
352 "Scene frame rate set to %.4g (converted from %.4g)",
364static Strip *rna_Strips_editing_new_movie(
ID *
id,
374 return rna_Strips_new_movie(
375 id, &ed->
seqbase, bmain, reports,
name, file, channel, frame_start, fit_method);
378static Strip *rna_Strips_meta_new_movie(
ID *
id,
388 return rna_Strips_new_movie(
389 id, &strip->
seqbase, bmain, reports,
name, file, channel, frame_start, fit_method);
392# ifdef WITH_AUDASPACE
393static Strip *rna_Strips_new_sound(
ID *
id,
408 if (strip ==
nullptr) {
420static Strip *rna_Strips_new_sound(
ID * ,
434static Strip *rna_Strips_editing_new_sound(
ID *
id,
443 return rna_Strips_new_sound(
id, &ed->
seqbase, bmain, reports,
name, file, channel, frame_start);
446static Strip *rna_Strips_meta_new_sound(
ID *
id,
455 return rna_Strips_new_sound(
456 id, &strip->
seqbase, bmain, reports,
name, file, channel, frame_start);
462static Strip *rna_Strips_new_meta(
463 ID *
id,
ListBase *seqbase,
const char *
name,
int channel,
int frame_start)
473static Strip *rna_Strips_editing_new_meta(
474 ID *
id,
Editing *ed,
const char *
name,
int channel,
int frame_start)
476 return rna_Strips_new_meta(
id, &ed->
seqbase,
name, channel, frame_start);
479static Strip *rna_Strips_meta_new_meta(
480 ID *
id,
Strip *strip,
const char *
name,
int channel,
int frame_start)
482 return rna_Strips_new_meta(
id, &strip->
seqbase,
name, channel, frame_start);
485static Strip *rna_Strips_new_effect(
ID *
id,
500 switch (num_inputs) {
508 if (input1 ==
nullptr) {
514 if (input1 ==
nullptr || input2 ==
nullptr) {
523 "Strips.new_effect: effect expects more than 2 inputs (%d, should never happen!)",
542static Strip *rna_Strips_editing_new_effect(
ID *
id,
553 return rna_Strips_new_effect(
554 id, &ed->
seqbase, reports,
name, type, channel, frame_start,
length, input1, input2);
557static Strip *rna_Strips_meta_new_effect(
ID *
id,
568 return rna_Strips_new_effect(
569 id, &strip->
seqbase, reports,
name, type, channel, frame_start,
length, input1, input2);
572static void rna_Strips_remove(
593static void rna_Strips_editing_remove(
596 rna_Strips_remove(
id, &ed->
seqbase, bmain, reports, strip_ptr);
599static void rna_Strips_meta_remove(
602 rna_Strips_remove(
id, &strip->
seqbase, bmain, reports, strip_ptr);
605static StripElem *rna_StripElements_append(
ID *
id,
Strip *strip,
const char *filename)
623static void rna_StripElements_pop(
ID *
id,
Strip *strip,
ReportList *reports,
int index)
628 if (strip->
len == 1) {
638 if (strip->
len <= index || index < 0) {
646 if (strip->
len == 1) {
652 memcpy(new_se, se,
sizeof(
StripElem) * index);
655 if (index < strip->
len) {
656 memcpy(&new_se[index], &se[index + 1],
sizeof(
StripElem) * (strip->
len - index));
665static void rna_Strip_invalidate_cache_rnafunc(
ID *
id,
Strip *
self,
int type)
688static void rna_Strip_retiming_keys_reset(
ID *
id,
Strip *strip)
708 {0,
nullptr, 0,
nullptr,
nullptr},
714 {0,
nullptr, 0,
nullptr,
nullptr},
717 func =
RNA_def_function(srna,
"strip_elem_from_frame",
"rna_Strip_elem_from_frame");
726 "The frame to get the strip element from",
732 RNA_def_pointer(func,
"elem",
"StripElement",
"",
"strip element of the current frame"));
740 func =
RNA_def_function(srna,
"move_to_meta",
"rna_Strips_move_strip_to_meta");
743 func,
"meta_sequence",
"Strip",
"Destination Meta Strip",
"Meta to move the strip into");
753 func =
RNA_def_function(srna,
"invalidate_cache",
"rna_Strip_invalidate_cache_rnafunc");
756 "Invalidate cached images for strip and all dependent strips");
757 parm =
RNA_def_enum(func,
"type", strip_cache_type_items, 0,
"Type",
"Cache Type");
764 func,
"frame", 0, INT_MIN, INT_MAX,
"",
"Frame where to split the strip", INT_MIN, INT_MAX);
766 parm =
RNA_def_enum(func,
"split_method", strip_split_method_items, 0,
"",
"");
769 func,
"ignore_connections",
false,
"",
"Don't propagate split to connected strips");
771 parm =
RNA_def_pointer(func,
"sequence",
"Strip",
"",
"Right side Strip");
789 parm =
RNA_def_string(func,
"filename",
"File", 0,
"",
"Filepath to image");
792 parm =
RNA_def_pointer(func,
"elem",
"StripElement",
"",
"New StripElement");
799 func,
"index", -1, INT_MIN, INT_MAX,
"",
"Index of image to remove", INT_MIN, INT_MAX);
829 {
STRIP_TYPE_CROSS,
"CROSS", 0,
"Crossfade",
"Fade out of one video, fading into another"},
830 {
STRIP_TYPE_ADD,
"ADD", 0,
"Add",
"Add together color channels from two videos"},
831 {
STRIP_TYPE_SUB,
"SUBTRACT", 0,
"Subtract",
"Subtract one strip's color from another"},
838 "Crossfade with color correction"},
839 {
STRIP_TYPE_MUL,
"MULTIPLY", 0,
"Multiply",
"Multiply color channels from two videos"},
840 {
STRIP_TYPE_WIPE,
"WIPE", 0,
"Wipe",
"Sweep a transition line across the frame"},
841 {
STRIP_TYPE_GLOW,
"GLOW", 0,
"Glow",
"Add blur and brightness to light areas"},
843 {
STRIP_TYPE_SPEED,
"SPEED", 0,
"Speed",
"Timewarp video strips, modifying playback speed"},
849 {0,
nullptr, 0,
nullptr,
nullptr},
852 const char *new_clip_func_name =
"rna_Strips_editing_new_clip";
853 const char *new_mask_func_name =
"rna_Strips_editing_new_mask";
854 const char *new_scene_func_name =
"rna_Strips_editing_new_scene";
855 const char *new_image_func_name =
"rna_Strips_editing_new_image";
856 const char *new_movie_func_name =
"rna_Strips_editing_new_movie";
857 const char *new_sound_func_name =
"rna_Strips_editing_new_sound";
858 const char *new_meta_func_name =
"rna_Strips_editing_new_meta";
859 const char *new_effect_func_name =
"rna_Strips_editing_new_effect";
860 const char *remove_func_name =
"rna_Strips_editing_remove";
863 new_clip_func_name =
"rna_Strips_meta_new_clip";
864 new_mask_func_name =
"rna_Strips_meta_new_mask";
865 new_scene_func_name =
"rna_Strips_meta_new_scene";
866 new_image_func_name =
"rna_Strips_meta_new_image";
867 new_movie_func_name =
"rna_Strips_meta_new_movie";
868 new_sound_func_name =
"rna_Strips_meta_new_sound";
869 new_meta_func_name =
"rna_Strips_meta_new_meta";
870 new_effect_func_name =
"rna_Strips_meta_new_effect";
871 remove_func_name =
"rna_Strips_meta_remove";
877 parm =
RNA_def_string(func,
"name",
"Name", 0,
"",
"Name for the new strip");
879 parm =
RNA_def_pointer(func,
"clip",
"MovieClip",
"",
"Movie clip to add");
887 "The channel for the new strip",
897 "The start frame for the new strip",
908 parm =
RNA_def_string(func,
"name",
"Name", 0,
"",
"Name for the new strip");
918 "The channel for the new strip",
928 "The start frame for the new strip",
939 parm =
RNA_def_string(func,
"name",
"Name", 0,
"",
"Name for the new strip");
949 "The channel for the new strip",
959 "The start frame for the new strip",
970 parm =
RNA_def_string(func,
"name",
"Name", 0,
"",
"Name for the new strip");
972 parm =
RNA_def_string(func,
"filepath",
"File", 0,
"",
"Filepath to image");
980 "The channel for the new strip",
990 "The start frame for the new strip",
1007 parm =
RNA_def_string(func,
"name",
"Name", 0,
"",
"Name for the new strip");
1009 parm =
RNA_def_string(func,
"filepath",
"File", 0,
"",
"Filepath to movie");
1017 "The channel for the new strip",
1027 "The start frame for the new strip",
1044 parm =
RNA_def_string(func,
"name",
"Name", 0,
"",
"Name for the new strip");
1046 parm =
RNA_def_string(func,
"filepath",
"File", 0,
"",
"Filepath to movie");
1054 "The channel for the new strip",
1064 "The start frame for the new strip",
1075 parm =
RNA_def_string(func,
"name",
"Name", 0,
"",
"Name for the new strip");
1083 "The channel for the new strip",
1093 "The start frame for the new strip",
1104 parm =
RNA_def_string(func,
"name",
"Name", 0,
"",
"Name for the new strip");
1106 parm =
RNA_def_enum(func,
"type", strip_effect_items, 0,
"Type",
"type for the new strip");
1114 "The channel for the new strip",
1125 "The start frame for the new strip",
1135 "Length of the strip in frames, or the length of each strip if multiple are added",
1138 RNA_def_pointer(func,
"input1",
"Strip",
"",
"First input strip for effect");
1139 RNA_def_pointer(func,
"input2",
"Strip",
"",
"Second input strip for effect");
1147 parm =
RNA_def_pointer(func,
"sequence",
"Strip",
"",
"Strip to remove");
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_report(ReportList *reports, eReportType type, const char *message)
int BLI_findindex(const ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BLI_path_split_dir_file(const char *filepath, char *dir, size_t dir_maxncpy, char *file, size_t file_maxncpy) ATTR_NONNULL(1
char * STRNCPY(char(&dst)[N], const char *src)
#define STRNCPY_UTF8(dst, src)
void DEG_id_tag_update(ID *id, unsigned int flags)
void DEG_relations_tag_update(Main *bmain)
@ ID_RECALC_SEQUENCER_STRIPS
@ SEQ_CACHE_STORE_FINAL_OUT
@ STRIP_TYPE_GAUSSIAN_BLUR
@ SEQ_SINGLE_FRAME_CONTENT
#define MEM_reallocN(vmemh, len)
float4 load_data(StoredFloat4 data)
float length(VecOp< float, D >) RET
void * MEM_calloc_arrayN(size_t len, size_t size, const char *str)
void MEM_freeN(void *vmemh)
ccl_device_inline float2 mask(const MaskType mask, const float2 a)
Strip * lookup_meta_by_strip(Editing *ed, const Strip *key)
void relations_invalidate_cache(Scene *scene, Strip *strip)
void edit_remove_flagged_strips(Scene *scene, ListBase *seqbase)
void edit_flag_for_removal(Scene *scene, ListBase *seqbase, Strip *strip)
Editing * editing_get(const Scene *scene)
ListBase * get_seqbase_by_strip(const Scene *scene, Strip *strip)
Strip * add_effect_strip(Scene *scene, ListBase *seqbase, LoadData *load_data)
void add_image_load_file(Scene *scene, Strip *strip, size_t strip_frame, const char *filename)
void add_image_set_directory(Strip *strip, const char *dirpath)
Strip * add_sound_strip(Main *, Scene *, ListBase *, LoadData *)
void relations_invalidate_cache_raw(Scene *scene, Strip *strip)
void retiming_data_clear(Strip *strip)
Strip * add_meta_strip(Scene *scene, ListBase *seqbase, LoadData *load_data)
constexpr int MAX_CHANNELS
Strip * add_scene_strip(Scene *scene, ListBase *seqbase, LoadData *load_data)
bool edit_move_strip_to_meta(Scene *scene, Strip *src_strip, Strip *dst_stripm, const char **r_error_str)
void add_image_init_alpha_mode(Main *bmain, Scene *scene, Strip *strip)
Strip * add_image_strip(Main *bmain, Scene *scene, ListBase *seqbase, LoadData *load_data)
Strip * add_movieclip_strip(Scene *scene, ListBase *seqbase, LoadData *load_data)
bool edit_strip_swap(Scene *scene, Strip *strip_a, Strip *strip_b, const char **r_error_str)
Strip * add_mask_strip(Scene *scene, ListBase *seqbase, LoadData *load_data)
Strip * edit_strip_split(Main *bmain, Scene *scene, ListBase *seqbase, Strip *strip, const int timeline_frame, const eSplitMethod method, const bool ignore_connections, const char **r_error)
void strip_lookup_invalidate(const Editing *ed)
SeqRetimingKey * retiming_add_key(const Scene *scene, Strip *strip, const int timeline_frame)
Strip * add_movie_strip(Main *bmain, Scene *scene, ListBase *seqbase, LoadData *load_data)
void add_load_data_init(LoadData *load_data, const char *name, const char *path, const int start_frame, const int channel)
StripElem * render_give_stripelem(const Scene *scene, const Strip *strip, int timeline_frame)
int effect_get_num_inputs(int strip_type)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
void RNA_def_parameter_clear_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
void RNA_def_property_srna(PropertyRNA *prop, const char *type)
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
void RNA_def_function_flag(FunctionRNA *func, int flag)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, const int default_value, const int hardmin, const int hardmax, const char *ui_name, const char *ui_description, const int softmin, const int softmax)
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
const EnumPropertyItem rna_enum_strip_scale_method_items[]
void RNA_api_strip(StructRNA *srna)
void RNA_api_strip_retiming_keys(BlenderRNA *brna)
void RNA_api_strips(StructRNA *srna, const bool metastrip)
void RNA_api_strip_elements(BlenderRNA *brna, PropertyRNA *cprop)
ColorManagedViewSettings view_settings
void WM_main_add_notifier(uint type, void *reference)