77 # include <AUD_Sequence.h>
93 #define SEQPROP_STARTFRAME (1 << 0)
94 #define SEQPROP_ENDFRAME (1 << 1)
95 #define SEQPROP_NOPATHS (1 << 2)
96 #define SEQPROP_NOCHAN (1 << 3)
97 #define SEQPROP_FIT_METHOD (1 << 4)
98 #define SEQPROP_VIEW_TRANSFORM (1 << 5)
101 {
SEQ_SCALE_TO_FIT,
"FIT", 0,
"Scale to Fit",
"Scale image to fit within the canvas"},
102 {
SEQ_SCALE_TO_FILL,
"FILL", 0,
"Scale to Fill",
"Scale image to completely fill the canvas"},
103 {
SEQ_STRETCH_TO_FILL,
"STRETCH", 0,
"Stretch to Fill",
"Stretch image to fill the canvas"},
119 "Start frame of the sequence strip",
132 "End frame for the color strip",
138 ot->
srna,
"channel", 1, 1,
MAXSEQ,
"Channel",
"Channel to place this strip into", 1,
MAXSEQ);
141 ot->
srna,
"replace_sel", 1,
"Replace Selection",
"Replace the current selection");
145 ot->
srna,
"overlap", 0,
"Allow Overlap",
"Don't correct overlap on new sequence strips");
159 "set_view_transform",
161 "Set view transform",
162 "Set appropriate view transform based on media colorspace");
168 const char *identifier)
189 int timeline_frame = (int)
CFRA;
190 int proximity = INT_MAX;
198 (timeline_frame - seq->
enddisp < proximity)) {
200 proximity = timeline_frame - seq->
enddisp;
214 int timeline_frame = (int)
CFRA;
344 if (
STR_ELEM(prop_id,
"frame_start",
"frame_end")) {
362 if (sce_seq ==
NULL) {
373 load_data.
scene = sce_seq;
415 ot->
name =
"Add Scene Strip";
416 ot->
idname =
"SEQUENCER_OT_scene_strip_add";
417 ot->
description =
"Add a strip to the sequencer using a blender scene as a source";
452 load_data.
clip = clip;
478 ot->
name =
"Add MovieClip Strip";
479 ot->
idname =
"SEQUENCER_OT_movieclip_strip_add";
542 ot->
name =
"Add Mask Strip";
543 ot->
idname =
"SEQUENCER_OT_mask_strip_add";
580 return !(
STR_ELEM(prop_id,
"filepath",
"directory",
"filename"));
592 switch (sl->spacetype) {
649 double video_start_offset;
654 if (seq_movie ==
NULL) {
678 double video_start_offset;
684 if (seq_movie ==
NULL) {
787 ot->
name =
"Add Movie Strip";
788 ot->
idname =
"SEQUENCER_OT_movie_strip_add";
815 "Use Movie Framerate",
816 "Use framerate from the movie to keep sound and video in sync");
916 ot->
name =
"Add Sound Strip";
917 ot->
idname =
"SEQUENCER_OT_sound_strip_add";
956 minframe =
min_ii(minframe, frame);
957 maxframe =
max_ii(maxframe, frame);
967 maxframe = minframe + 1;
970 *r_minframe = minframe;
971 *r_numdigits = numdigits;
973 return maxframe - minframe + 1;
979 char *filename =
NULL;
992 for (
int i = 0; i <
len; i++, se++) {
993 BLI_strncpy(filename_stripped, filename,
sizeof(filename_stripped));
1003 const int start_frame,
1009 if (use_placeholders) {
1020 char directory[768];
1024 if (use_placeholders) {
1029 size_t strip_frame = 0;
1048 int minframe, numdigits;
1050 op, load_data.
start_frame, &minframe, &numdigits);
1114 ot->
name =
"Add Image Strip";
1115 ot->
idname =
"SEQUENCER_OT_image_strip_add";
1116 ot->
description =
"Add an image or image sequence to the sequencer";
1143 "Use placeholders for missing frames of the strip");
1150 const char *error_msg;
1224 ot->
name =
"Add Effect Strip";
1225 ot->
idname =
"SEQUENCER_OT_effect_strip_add";
1226 ot->
description =
"Add an effect to the sequencer, most are applied on top of existing strips";
1242 "Sequencer effect type");
1252 "Initialize the strip with this color",
struct ScrArea * CTX_wm_area(const bContext *C)
struct Scene * CTX_data_scene(const bContext *C)
struct wmWindowManager * CTX_wm_manager(const bContext *C)
struct bScreen * CTX_wm_screen(const bContext *C)
struct Main * CTX_data_main(const bContext *C)
const char * BKE_main_blendfile_path(const struct Main *bmain) ATTR_NONNULL()
void BKE_report(ReportList *reports, ReportType type, const char *message)
void BKE_reportf(ReportList *reports, ReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
bool BLI_ghashutil_strcmp(const void *a, const void *b)
unsigned int BLI_ghashutil_strhash_p(const void *ptr)
GSet * BLI_gset_new(GSetHashFP hashfp, GSetCmpFP cmpfp, const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
void BLI_gset_free(GSet *gs, GSetKeyFreeFP keyfreefp)
#define LISTBASE_FOREACH(type, var, list)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE int min_ii(int a, int b)
MINLINE int max_ii(int a, int b)
MINLINE int max_iii(int a, int b, int c)
const char * BLI_path_basename(const char *path) ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT
bool BLI_path_frame(char *path, int frame, int digits) ATTR_NONNULL()
void BLI_split_dir_part(const char *string, char *dir, const size_t dirlen)
bool BLI_path_frame_get(char *path, int *r_frame, int *numdigits) ATTR_NONNULL()
void BLI_path_frame_strip(char *path, char *ext) ATTR_NONNULL()
void BLI_join_dirfile(char *__restrict dst, const size_t maxlen, const char *__restrict dir, const char *__restrict file) ATTR_NONNULL()
void BLI_path_rel(char *file, const char *relfile) ATTR_NONNULL()
bool BLI_path_abs(char *path, const char *basepath) ATTR_NONNULL()
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
#define BLT_I18NCONTEXT_ID_MOVIECLIP
void DEG_id_tag_update(struct ID *id, int flag)
void DEG_relations_tag_update(struct Main *bmain)
@ ID_RECALC_SEQUENCER_STRIPS
#define SEQ_HAS_PATH(_seq)
@ SEQ_PROXY_SKIP_EXISTING
@ SEQ_VIEW_SEQUENCE_PREVIEW
@ USER_SEQ_PROXY_SETUP_AUTOMATIC
void ED_area_tag_redraw(ScrArea *area)
bool ED_operator_sequencer_active_editable(struct bContext *C)
void ED_sequencer_deselect_all(struct Scene *scene)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
Read Guarded memory(de)allocation.
#define RNA_BEGIN(sptr, itemptr, propname)
#define RNA_PROP_BEGIN(sptr, itemptr, prop)
StructRNA RNA_ImageFormatSettings
const EnumPropertyItem * RNA_scene_without_active_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free)
const EnumPropertyItem * RNA_movieclip_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free)
const EnumPropertyItem * RNA_mask_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free)
@ SEQ_LOAD_SET_VIEW_TRANSFORM
@ SEQ_LOAD_MOVIE_SYNC_FPS
eAutoPropButsReturn uiDefAutoButsRNA(uiLayout *layout, struct PointerRNA *ptr, bool(*check_prop)(struct PointerRNA *ptr, struct PropertyRNA *prop, void *user_data), void *user_data, struct PropertyRNA *prop_activate_init, eButLabelAlign label_align, const bool compact)
@ UI_BUT_LABEL_ALIGN_NONE
void uiTemplateImageFormatViews(uiLayout *layout, struct PointerRNA *imfptr, struct PointerRNA *ptr)
#define WM_FILESEL_DIRECTORY
#define WM_FILESEL_SHOW_PROPS
#define WM_FILESEL_RELPATH
#define WM_FILESEL_FILEPATH
int SEQ_effect_get_num_inputs(int seq_type)
static const int proxy_sizes[]
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
static void area(int d1, int d2, int e1, int e2, float weights[2])
void SEQ_proxy_set(struct Sequence *seq, bool value)
int SEQ_rendersize_to_proxysize(int render_size)
bool SEQ_proxy_rebuild_context(Main *bmain, Depsgraph *depsgraph, Scene *scene, Sequence *seq, struct GSet *file_list, ListBase *queue)
ProxyJob * ED_seq_proxy_job_get(const bContext *C, wmJob *wm_job)
struct wmJob * ED_seq_proxy_wm_job_get(const bContext *C)
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
int RNA_collection_length(PointerRNA *ptr, const char *name)
const char * RNA_property_identifier(const PropertyRNA *prop)
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
void RNA_int_set(PointerRNA *ptr, const char *name, int value)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
void RNA_float_get_array(PointerRNA *ptr, const char *name, float *values)
bool RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop)
int RNA_property_int_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_string_get(PointerRNA *ptr, const char *name, char *value)
int RNA_int_get(PointerRNA *ptr, const char *name)
void RNA_property_string_get(PointerRNA *ptr, PropertyRNA *prop, char *value)
void RNA_property_boolean_set(PointerRNA *ptr, PropertyRNA *prop, bool value)
bool RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
int RNA_enum_get(PointerRNA *ptr, const char *name)
int RNA_property_collection_length(PointerRNA *ptr, PropertyRNA *prop)
char * RNA_string_get_alloc(PointerRNA *ptr, const char *name, char *fixedbuf, int fixedlen)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_float_color(StructOrFunctionRNA *cont_, const char *identifier, int len, const float *default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, int default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
void RNA_def_enum_funcs(PropertyRNA *prop, EnumPropertyItemFunc itemfunc)
void RNA_def_property_subtype(PropertyRNA *prop, PropertySubType subtype)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
const EnumPropertyItem DummyRNA_NULL_items[]
eSeqImageFitMethod SEQ_tool_settings_fit_method_get(Scene *scene)
void SEQ_tool_settings_fit_method_set(Scene *scene, eSeqImageFitMethod fit_method)
Editing * SEQ_editing_get(Scene *scene, bool alloc)
static void sequencer_add_sound_multiple_strips(bContext *C, wmOperator *op, SeqLoadData *load_data)
static void load_data_init_from_operator(SeqLoadData *load_data, bContext *C, wmOperator *op)
static void sequencer_add_init(bContext *UNUSED(C), wmOperator *op)
static int sequencer_add_effect_strip_exec(bContext *C, wmOperator *op)
static int sequencer_add_mask_strip_exec(bContext *C, wmOperator *op)
static void sequencer_add_draw(bContext *C, wmOperator *op)
static IMB_Proxy_Size seq_get_proxy_size_flags(bContext *C)
static void sequencer_generic_invoke_path__internal(bContext *C, wmOperator *op, const char *identifier)
static int sequencer_add_mask_strip_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static int sequencer_add_image_strip_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
static int sequencer_add_image_strip_calculate_length(wmOperator *op, const int start_frame, int *minframe, int *numdigits)
void SEQUENCER_OT_mask_strip_add(struct wmOperatorType *ot)
static int sequencer_add_sound_strip_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
#define SEQPROP_VIEW_TRANSFORM
static bool seq_effect_add_properties_poll(const bContext *UNUSED(C), wmOperator *op, const PropertyRNA *prop)
static const EnumPropertyItem scale_fit_methods[]
static void sequencer_generic_invoke_xy__internal(bContext *C, wmOperator *op, int flag, int type)
static bool sequencer_add_sound_single_strip(bContext *C, wmOperator *op, SeqLoadData *load_data)
struct SequencerAddData SequencerAddData
static int sequencer_add_movieclip_strip_exec(bContext *C, wmOperator *op)
static int sequencer_add_scene_strip_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static int sequencer_add_scene_strip_exec(bContext *C, wmOperator *op)
static int sequencer_add_effect_strip_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
static void sequencer_add_image_strip_load_files(wmOperator *op, Sequence *seq, SeqLoadData *load_data, const int minframe, const int numdigits)
static void sequencer_generic_props__internal(wmOperatorType *ot, int flag)
static void seq_build_proxy(bContext *C, Sequence *seq)
static int sequencer_add_movieclip_strip_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static void seq_load_apply_generic_options(bContext *C, wmOperator *op, Sequence *seq)
static int sequencer_add_movie_strip_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
void SEQUENCER_OT_scene_strip_add(struct wmOperatorType *ot)
static bool sequencer_add_draw_check_fn(PointerRNA *UNUSED(ptr), PropertyRNA *prop, void *UNUSED(user_data))
#define SEQPROP_STARTFRAME
void SEQUENCER_OT_movie_strip_add(struct wmOperatorType *ot)
void SEQUENCER_OT_effect_strip_add(struct wmOperatorType *ot)
static void sequencer_add_cancel(bContext *UNUSED(C), wmOperator *op)
static int sequencer_add_sound_strip_exec(bContext *C, wmOperator *op)
void sequencer_image_seq_reserve_frames(wmOperator *op, StripElem *se, int len, int minframe, int numdigits)
static void sequencer_add_movie_multiple_strips(bContext *C, wmOperator *op, SeqLoadData *load_data)
void SEQUENCER_OT_movieclip_strip_add(struct wmOperatorType *ot)
static int sequencer_generic_invoke_xy_guess_channel(bContext *C, int type)
static bool sequencer_add_movie_single_strip(bContext *C, wmOperator *op, SeqLoadData *load_data)
static int sequencer_add_image_strip_exec(bContext *C, wmOperator *op)
#define SEQPROP_FIT_METHOD
int sequencer_image_seq_get_minmax_frame(wmOperator *op, int sfra, int *r_minframe, int *r_numdigits)
static int sequencer_add_movie_strip_exec(bContext *C, wmOperator *op)
void SEQUENCER_OT_image_strip_add(struct wmOperatorType *ot)
static void sequencer_disable_one_time_properties(bContext *C, wmOperator *op)
void SEQUENCER_OT_sound_strip_add(struct wmOperatorType *ot)
int seq_effect_find_selected(Scene *scene, Sequence *activeseq, int type, Sequence **r_selseq1, Sequence **r_selseq2, Sequence **r_selseq3, const char **r_error_str)
EnumPropertyItem sequencer_prop_effect_types[]
void SEQ_add_image_load_file(Sequence *seq, size_t strip_frame, char *filename)
Sequence * SEQ_add_movie_strip(Main *bmain, Scene *scene, ListBase *seqbase, SeqLoadData *load_data, double *r_video_start_offset)
Sequence * SEQ_add_mask_strip(Scene *scene, ListBase *seqbase, struct SeqLoadData *load_data)
Sequence * SEQ_add_image_strip(Main *bmain, Scene *scene, ListBase *seqbase, SeqLoadData *load_data)
Sequence * SEQ_add_effect_strip(Scene *scene, ListBase *seqbase, struct SeqLoadData *load_data)
Sequence * SEQ_add_movieclip_strip(Scene *scene, ListBase *seqbase, struct SeqLoadData *load_data)
void SEQ_add_image_set_directory(Sequence *seq, char *path)
void SEQ_add_image_init_alpha_mode(Sequence *seq)
Sequence * SEQ_add_sound_strip(Main *UNUSED(bmain), Scene *UNUSED(scene), ListBase *UNUSED(seqbase), SeqLoadData *UNUSED(load_data), const double UNUSED(audio_offset))
Sequence * SEQ_add_scene_strip(Scene *scene, ListBase *seqbase, struct SeqLoadData *load_data)
Sequence * SEQ_select_active_get(Scene *scene)
void SEQ_select_active_set(Scene *scene, Sequence *seq)
void SEQ_time_update_sequence(Scene *scene, Sequence *seq)
struct Depsgraph * depsgraph
struct SeqLoadData::@1139 image
eSeqImageFitMethod fit_method
struct Stereo3dFormat * stereo3d_format
struct SeqLoadData::@1140 effect
ImageFormatData im_format
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
bool(* poll_property)(const struct bContext *C, struct wmOperator *op, const PropertyRNA *prop) ATTR_WARN_UNUSED_RESULT
void(* cancel)(struct bContext *, struct wmOperator *)
void(* ui)(struct bContext *, struct wmOperator *)
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
struct wmOperatorType * type
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
void WM_event_add_fileselect(bContext *C, wmOperator *op)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
void WM_jobs_start(wmWindowManager *wm, wmJob *wm_job)
bool WM_jobs_is_running(wmJob *wm_job)
void WM_operator_properties_filesel(wmOperatorType *ot, int filter, short type, short action, short flag, short display, short sort)
int WM_enum_search_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))