Blender V2.61 - r43446
Classes | Typedefs | Functions | Variables

sequencer_edit.c File Reference

#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BLI_threads.h"
#include "DNA_scene_types.h"
#include "DNA_userdef_types.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_main.h"
#include "BKE_sequencer.h"
#include "BKE_report.h"
#include "BKE_sound.h"
#include "WM_api.h"
#include "WM_types.h"
#include "RNA_define.h"
#include "RNA_enum_types.h"
#include "ED_screen.h"
#include "ED_transform.h"
#include "ED_sequencer.h"
#include "UI_view2d.h"
#include "sequencer_intern.h"

Go to the source code of this file.

Classes

struct  TransSeq
struct  ProxyBuildJob

Typedefs

typedef struct TransSeq TransSeq
typedef struct ProxyBuildJob ProxyJob

Functions

static int okee (const char *UNUSED(dummy))
static void proxy_freejob (void *pjv)
static void proxy_startjob (void *pjv, short *stop, short *do_update, float *progress)
static void proxy_endjob (void *UNUSED(customdata))
static void seq_proxy_build_job (const bContext *C, Sequence *seq)
void seq_rectf (Sequence *seq, rctf *rectf)
static void UNUSED_FUNCTION() change_plugin_seq (Scene *scene, char *str)
void boundbox_seq (Scene *scene, rctf *rect)
static int mouse_frame_side (View2D *v2d, short mouse_x, int frame)
Sequencefind_neighboring_sequence (Scene *scene, Sequence *test, int lr, int sel)
static Sequencefind_next_prev_sequence (Scene *scene, Sequence *test, int lr, int sel)
Sequencefind_nearest_seq (Scene *scene, View2D *v2d, int *hand, const int mval[2])
static int seq_is_parent (Sequence *par, Sequence *seq)
static int seq_is_predecessor (Sequence *pred, Sequence *seq)
void deselect_all_seq (Scene *scene)
void recurs_sel_seq (Sequence *seqm)
int seq_effect_find_selected (Scene *scene, Sequence *activeseq, int type, Sequence **selseq1, Sequence **selseq2, Sequence **selseq3, const char **error_str)
static Sequencedel_seq_find_replace_recurs (Scene *scene, Sequence *seq)
static void recurs_del_seq_flag (Scene *scene, ListBase *lb, short flag, short deleteall)
static Sequencecut_seq_hard (Scene *scene, Sequence *seq, int cutframe)
static Sequencecut_seq_soft (Scene *scene, Sequence *seq, int cutframe)
static int cut_seq_list (Scene *scene, ListBase *old, ListBase *new, int cutframe, Sequence *(*cut_seq)(Scene *, Sequence *, int))
static int insert_gap (Scene *scene, int gap, int cfra)
static void UNUSED_FUNCTION() touch_seq_files (Scene *scene)
static void UNUSED_FUNCTION() seq_remap_paths (Scene *scene)
static void UNUSED_FUNCTION() no_gaps (Scene *scene)
int sequencer_edit_poll (bContext *C)
int sequencer_strip_poll (bContext *C)
int sequencer_strip_has_path_poll (bContext *C)
int sequencer_view_poll (bContext *C)
static int sequencer_snap_exec (bContext *C, wmOperator *op)
static int sequencer_snap_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(event))
void SEQUENCER_OT_snap (struct wmOperatorType *ot)
static int sequencer_mute_exec (bContext *C, wmOperator *op)
void SEQUENCER_OT_mute (struct wmOperatorType *ot)
static int sequencer_unmute_exec (bContext *C, wmOperator *op)
void SEQUENCER_OT_unmute (struct wmOperatorType *ot)
static int sequencer_lock_exec (bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_lock (struct wmOperatorType *ot)
static int sequencer_unlock_exec (bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_unlock (struct wmOperatorType *ot)
static int sequencer_reload_exec (bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_reload (struct wmOperatorType *ot)
static int sequencer_refresh_all_exec (bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_refresh_all (struct wmOperatorType *ot)
static int sequencer_reassign_inputs_exec (bContext *C, wmOperator *op)
static int sequencer_effect_poll (bContext *C)
void SEQUENCER_OT_reassign_inputs (struct wmOperatorType *ot)
static int sequencer_swap_inputs_exec (bContext *C, wmOperator *op)
void SEQUENCER_OT_swap_inputs (struct wmOperatorType *ot)
static int sequencer_cut_exec (bContext *C, wmOperator *op)
static int sequencer_cut_invoke (bContext *C, wmOperator *op, wmEvent *event)
void SEQUENCER_OT_cut (struct wmOperatorType *ot)
static int apply_unique_name_cb (Sequence *seq, void *arg_pt)
static int sequencer_add_duplicate_exec (bContext *C, wmOperator *UNUSED(op))
static int sequencer_add_duplicate_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(event))
void SEQUENCER_OT_duplicate (wmOperatorType *ot)
static int sequencer_delete_exec (bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_delete (wmOperatorType *ot)
static int sequencer_offset_clear_exec (bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_offset_clear (wmOperatorType *ot)
static int sequencer_separate_images_exec (bContext *C, wmOperator *op)
void SEQUENCER_OT_images_separate (wmOperatorType *ot)
static int sequencer_meta_toggle_exec (bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_meta_toggle (wmOperatorType *ot)
static int sequencer_meta_make_exec (bContext *C, wmOperator *op)
void SEQUENCER_OT_meta_make (wmOperatorType *ot)
static int seq_depends_on_meta (Sequence *seq, Sequence *seqm)
static int sequencer_meta_separate_exec (bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_meta_separate (wmOperatorType *ot)
static int sequencer_view_all_exec (bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_view_all (wmOperatorType *ot)
static int sequencer_view_all_preview_exec (bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_view_all_preview (wmOperatorType *ot)
static int sequencer_view_zoom_ratio_exec (bContext *C, wmOperator *op)
void SEQUENCER_OT_view_zoom_ratio (wmOperatorType *ot)
static int sequencer_view_toggle_exec (bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_view_toggle (wmOperatorType *ot)
static int sequencer_view_selected_exec (bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_view_selected (wmOperatorType *ot)
static int find_next_prev_edit (Scene *scene, int cfra, int side)
static int next_prev_edit_internal (Scene *scene, int side)
static int sequencer_next_edit_exec (bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_next_edit (wmOperatorType *ot)
static int sequencer_previous_edit_exec (bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_previous_edit (wmOperatorType *ot)
static void swap_sequence (Scene *scene, Sequence *seqa, Sequence *seqb)
static int sequencer_swap_exec (bContext *C, wmOperator *op)
void SEQUENCER_OT_swap (wmOperatorType *ot)
static int sequencer_rendersize_exec (bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_rendersize (wmOperatorType *ot)
static void seq_del_sound (Scene *scene, Sequence *seq)
static int sequencer_copy_exec (bContext *C, wmOperator *op)
void SEQUENCER_OT_copy (wmOperatorType *ot)
static int sequencer_paste_exec (bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_paste (wmOperatorType *ot)
static int sequencer_swap_data_exec (bContext *C, wmOperator *op)
void SEQUENCER_OT_swap_data (wmOperatorType *ot)
static int view_ghost_border_exec (bContext *C, wmOperator *op)
void SEQUENCER_OT_view_ghost_border (wmOperatorType *ot)
static int sequencer_rebuild_proxy_exec (bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_rebuild_proxy (wmOperatorType *ot)
static int sequencer_change_effect_input_exec (bContext *C, wmOperator *op)
void SEQUENCER_OT_change_effect_input (struct wmOperatorType *ot)
static int sequencer_change_effect_type_exec (bContext *C, wmOperator *op)
void SEQUENCER_OT_change_effect_type (struct wmOperatorType *ot)
static int sequencer_change_path_exec (bContext *C, wmOperator *op)
static int sequencer_change_path_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(event))
void SEQUENCER_OT_change_path (struct wmOperatorType *ot)

Variables

EnumPropertyItem sequencer_prop_effect_types []
EnumPropertyItem prop_side_types []
static EnumPropertyItem prop_side_lr_types []
static EnumPropertyItem prop_cut_types []
static EnumPropertyItem prop_change_effect_input_types []

Detailed Description

Definition in file sequencer_edit.c.


Typedef Documentation

typedef struct ProxyBuildJob ProxyJob
typedef struct TransSeq TransSeq

Function Documentation

static int apply_unique_name_cb ( Sequence seq,
void *  arg_pt 
) [static]
void boundbox_seq ( Scene scene,
rctf rect 
)
static void UNUSED_FUNCTION() change_plugin_seq ( Scene scene,
char *  str 
) [static]
static Sequence* cut_seq_hard ( Scene scene,
Sequence seq,
int  cutframe 
) [static]
static int cut_seq_list ( Scene scene,
ListBase old,
ListBase new,
int  cutframe,
Sequence *(*)(Scene *, Sequence *, int)  cut_seq 
) [static]
static Sequence* cut_seq_soft ( Scene scene,
Sequence seq,
int  cutframe 
) [static]
static Sequence* del_seq_find_replace_recurs ( Scene scene,
Sequence seq 
) [static]
void deselect_all_seq ( Scene scene)
Sequence* find_nearest_seq ( Scene scene,
View2D v2d,
int *  hand,
const int  mval[2] 
) [read]
Sequence* find_neighboring_sequence ( Scene scene,
Sequence test,
int  lr,
int  sel 
) [read]
static int find_next_prev_edit ( Scene scene,
int  cfra,
int  side 
) [static]
static Sequence* find_next_prev_sequence ( Scene scene,
Sequence test,
int  lr,
int  sel 
) [static]
static int insert_gap ( Scene scene,
int  gap,
int  cfra 
) [static]
static int mouse_frame_side ( View2D v2d,
short  mouse_x,
int  frame 
) [static]

Definition at line 293 of file sequencer_edit.c.

References SEQ_SIDE_LEFT, SEQ_SIDE_RIGHT, and UI_view2d_region_to_view().

Referenced by sequencer_cut_invoke().

static int next_prev_edit_internal ( Scene scene,
int  side 
) [static]

Definition at line 2321 of file sequencer_edit.c.

References CFRA, and find_next_prev_edit().

Referenced by sequencer_next_edit_exec(), and sequencer_previous_edit_exec().

static void UNUSED_FUNCTION() no_gaps ( Scene scene) [static]

Definition at line 960 of file sequencer_edit.c.

References CFRA, EFRA, evaluate_seq_frame(), FALSE, insert_gap(), NULL, and seq_give_editing().

static int okee ( const char *  UNUSEDdummy) [static]

Definition at line 76 of file sequencer_edit.c.

Referenced by touch_seq_files().

static void proxy_endjob ( void *  UNUSEDcustomdata) [static]

Definition at line 183 of file sequencer_edit.c.

Referenced by seq_proxy_build_job().

static void proxy_freejob ( void *  pjv) [static]
static void proxy_startjob ( void *  pjv,
short *  stop,
short *  do_update,
float *  progress 
) [static]
static void recurs_del_seq_flag ( Scene scene,
ListBase lb,
short  flag,
short  deleteall 
) [static]
void recurs_sel_seq ( Sequence seqm)
static void seq_del_sound ( Scene scene,
Sequence seq 
) [static]
static int seq_depends_on_meta ( Sequence seq,
Sequence seqm 
) [static]

Definition at line 1956 of file sequencer_edit.c.

References Sequence::seq1, Sequence::seq2, and Sequence::seq3.

Referenced by sequencer_meta_separate_exec().

int seq_effect_find_selected ( Scene scene,
Sequence activeseq,
int  type,
Sequence **  selseq1,
Sequence **  selseq2,
Sequence **  selseq3,
const char **  error_str 
)
static int seq_is_parent ( Sequence par,
Sequence seq 
) [static]

Definition at line 445 of file sequencer_edit.c.

References Sequence::seq1, Sequence::seq2, and Sequence::seq3.

Referenced by seq_is_predecessor(), and sequencer_swap_exec().

static int seq_is_predecessor ( Sequence pred,
Sequence seq 
) [static]
static void seq_proxy_build_job ( const bContext C,
Sequence seq 
) [static]
void seq_rectf ( Sequence seq,
rctf rectf 
)
static void UNUSED_FUNCTION() seq_remap_paths ( Scene scene) [static]
static int sequencer_add_duplicate_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int sequencer_add_duplicate_invoke ( bContext C,
wmOperator op,
wmEvent UNUSEDevent 
) [static]
static int sequencer_change_effect_input_exec ( bContext C,
wmOperator op 
) [static]
static int sequencer_change_effect_type_exec ( bContext C,
wmOperator op 
) [static]
static int sequencer_change_path_exec ( bContext C,
wmOperator op 
) [static]
static int sequencer_change_path_invoke ( bContext C,
wmOperator op,
wmEvent UNUSEDevent 
) [static]
static int sequencer_copy_exec ( bContext C,
wmOperator op 
) [static]
static int sequencer_cut_exec ( bContext C,
wmOperator op 
) [static]
static int sequencer_cut_invoke ( bContext C,
wmOperator op,
wmEvent event 
) [static]
static int sequencer_delete_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
int sequencer_edit_poll ( bContext C)
static int sequencer_effect_poll ( bContext C) [static]
static int sequencer_lock_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int sequencer_meta_make_exec ( bContext C,
wmOperator op 
) [static]
static int sequencer_meta_separate_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int sequencer_meta_toggle_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int sequencer_mute_exec ( bContext C,
wmOperator op 
) [static]
static int sequencer_next_edit_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int sequencer_offset_clear_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
void SEQUENCER_OT_change_effect_input ( struct wmOperatorType ot)
void SEQUENCER_OT_change_effect_type ( struct wmOperatorType ot)
void SEQUENCER_OT_change_path ( struct wmOperatorType ot)
void SEQUENCER_OT_copy ( wmOperatorType ot)
void SEQUENCER_OT_cut ( struct wmOperatorType ot)
void SEQUENCER_OT_delete ( wmOperatorType ot)
void SEQUENCER_OT_duplicate ( wmOperatorType ot)
void SEQUENCER_OT_images_separate ( wmOperatorType ot)
void SEQUENCER_OT_lock ( struct wmOperatorType ot)
void SEQUENCER_OT_meta_make ( wmOperatorType ot)
void SEQUENCER_OT_meta_separate ( wmOperatorType ot)
void SEQUENCER_OT_meta_toggle ( wmOperatorType ot)
void SEQUENCER_OT_mute ( struct wmOperatorType ot)
void SEQUENCER_OT_next_edit ( wmOperatorType ot)
void SEQUENCER_OT_offset_clear ( wmOperatorType ot)
void SEQUENCER_OT_paste ( wmOperatorType ot)
void SEQUENCER_OT_previous_edit ( wmOperatorType ot)
void SEQUENCER_OT_reassign_inputs ( struct wmOperatorType ot)
void SEQUENCER_OT_rebuild_proxy ( wmOperatorType ot)
void SEQUENCER_OT_refresh_all ( struct wmOperatorType ot)
void SEQUENCER_OT_reload ( struct wmOperatorType ot)
void SEQUENCER_OT_rendersize ( wmOperatorType ot)
void SEQUENCER_OT_snap ( struct wmOperatorType ot)
void SEQUENCER_OT_swap ( wmOperatorType ot)
void SEQUENCER_OT_swap_data ( wmOperatorType ot)
void SEQUENCER_OT_swap_inputs ( struct wmOperatorType ot)
void SEQUENCER_OT_unlock ( struct wmOperatorType ot)
void SEQUENCER_OT_unmute ( struct wmOperatorType ot)
void SEQUENCER_OT_view_all ( wmOperatorType ot)
void SEQUENCER_OT_view_all_preview ( wmOperatorType ot)
void SEQUENCER_OT_view_ghost_border ( wmOperatorType ot)
void SEQUENCER_OT_view_selected ( wmOperatorType ot)
void SEQUENCER_OT_view_toggle ( wmOperatorType ot)
void SEQUENCER_OT_view_zoom_ratio ( wmOperatorType ot)
static int sequencer_paste_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int sequencer_previous_edit_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int sequencer_reassign_inputs_exec ( bContext C,
wmOperator op 
) [static]
static int sequencer_rebuild_proxy_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int sequencer_refresh_all_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int sequencer_reload_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int sequencer_rendersize_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int sequencer_separate_images_exec ( bContext C,
wmOperator op 
) [static]
static int sequencer_snap_exec ( bContext C,
wmOperator op 
) [static]
static int sequencer_snap_invoke ( bContext C,
wmOperator op,
wmEvent UNUSEDevent 
) [static]

Definition at line 1088 of file sequencer_edit.c.

References CFRA, CTX_data_scene(), wmOperator::ptr, RNA_int_set(), and sequencer_snap_exec().

Referenced by SEQUENCER_OT_snap().

int sequencer_strip_has_path_poll ( bContext C)
int sequencer_strip_poll ( bContext C)

Definition at line 1006 of file sequencer_edit.c.

References Editing::act_seq, CTX_data_scene(), FALSE, NULL, and seq_give_editing().

static int sequencer_swap_data_exec ( bContext C,
wmOperator op 
) [static]
static int sequencer_swap_exec ( bContext C,
wmOperator op 
) [static]
static int sequencer_swap_inputs_exec ( bContext C,
wmOperator op 
) [static]
static int sequencer_unlock_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int sequencer_unmute_exec ( bContext C,
wmOperator op 
) [static]
static int sequencer_view_all_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int sequencer_view_all_preview_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
int sequencer_view_poll ( bContext C)
static int sequencer_view_selected_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int sequencer_view_toggle_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int sequencer_view_zoom_ratio_exec ( bContext C,
wmOperator op 
) [static]
static void swap_sequence ( Scene scene,
Sequence seqa,
Sequence seqb 
) [static]
static void UNUSED_FUNCTION() touch_seq_files ( Scene scene) [static]
static int view_ghost_border_exec ( bContext C,
wmOperator op 
) [static]

Variable Documentation

Initial value:
 {
    {0, "A_B", 0, "A -> B", ""},
    {1, "B_C", 0, "B -> C", ""},
    {2, "A_C", 0, "A -> C", ""},
    {0, NULL, 0, NULL, NULL}
}

Definition at line 2834 of file sequencer_edit.c.

Initial value:
 {
    {SEQ_CUT_SOFT, "SOFT", 0, "Soft", ""},
    {SEQ_CUT_HARD, "HARD", 0, "Hard", ""},
    {0, NULL, 0, NULL, NULL}
}

Definition at line 1434 of file sequencer_edit.c.

Initial value:
 {
    {SEQ_SIDE_LEFT, "LEFT", 0, "Left", ""},
    {SEQ_SIDE_RIGHT, "RIGHT", 0, "Right", ""},
    {0, NULL, 0, NULL, NULL}
}

Definition at line 110 of file sequencer_edit.c.

Initial value:
 {
    {SEQ_SIDE_LEFT, "LEFT", 0, "Left", ""},
    {SEQ_SIDE_RIGHT, "RIGHT", 0, "Right", ""},
    {SEQ_SIDE_BOTH, "BOTH", 0, "Both", ""},
    {0, NULL, 0, NULL, NULL}
}

Definition at line 103 of file sequencer_edit.c.

Referenced by SEQUENCER_OT_select_active_side(), and SEQUENCER_OT_select_handles().

Initial value:
 {
    {SEQ_CROSS, "CROSS", 0, "Crossfade", "Crossfade effect strip type"},
    {SEQ_ADD, "ADD", 0, "Add", "Add effect strip type"},
    {SEQ_SUB, "SUBTRACT", 0, "Subtract", "Subtract effect strip type"},
    {SEQ_ALPHAOVER, "ALPHA_OVER", 0, "Alpha Over", "Alpha Over effect strip type"},
    {SEQ_ALPHAUNDER, "ALPHA_UNDER", 0, "Alpha Under", "Alpha Under effect strip type"},
    {SEQ_GAMCROSS, "GAMMA_CROSS", 0, "Gamma Cross", "Gamma Cross effect strip type"},
    {SEQ_MUL, "MULTIPLY", 0, "Multiply", "Multiply effect strip type"},
    {SEQ_OVERDROP, "OVER_DROP", 0, "Alpha Over Drop", "Alpha Over Drop effect strip type"},
    {SEQ_PLUGIN, "PLUGIN", 0, "Plugin", "Plugin effect strip type"},
    {SEQ_WIPE, "WIPE", 0, "Wipe", "Wipe effect strip type"},
    {SEQ_GLOW, "GLOW", 0, "Glow", "Glow effect strip type"},
    {SEQ_TRANSFORM, "TRANSFORM", 0, "Transform", "Transform effect strip type"},
    {SEQ_COLOR, "COLOR", 0, "Color", "Color effect strip type"},
    {SEQ_SPEED, "SPEED", 0, "Speed", "Color effect strip type"},
    {SEQ_MULTICAM, "MULTICAM", 0, "Multicam Selector", ""},
    {SEQ_ADJUSTMENT, "ADJUSTMENT", 0, "Adjustment Layer", ""},
    {0, NULL, 0, NULL, NULL}
}

Definition at line 81 of file sequencer_edit.c.

Referenced by SEQUENCER_OT_effect_strip_add().