Blender  V2.93
sequencer_select.c File Reference
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "BLI_blenlib.h"
#include "BLI_ghash.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "DNA_scene_types.h"
#include "BKE_context.h"
#include "BKE_report.h"
#include "WM_api.h"
#include "WM_types.h"
#include "RNA_define.h"
#include "SEQ_iterator.h"
#include "SEQ_select.h"
#include "SEQ_sequencer.h"
#include "SEQ_transform.h"
#include "ED_outliner.h"
#include "ED_screen.h"
#include "ED_select_utils.h"
#include "ED_sequencer.h"
#include "UI_view2d.h"
#include "sequencer_intern.h"

Go to the source code of this file.

Functions

Selection Utilities
static void select_surrounding_handles (Scene *scene, Sequence *test)
 
static void select_active_side (ListBase *seqbase, int sel_side, int channel, int frame)
 
static void select_active_side_range (ListBase *seqbase, const int sel_side, const int frame_ranges[MAXSEQ], const int frame_ignore)
 
static void select_linked_time (ListBase *seqbase, Sequence *seq_link)
 
void ED_sequencer_select_sequence_single (Scene *scene, Sequence *seq, bool deselect_all)
 
void seq_rectf (Sequence *seq, rctf *rect)
 
Sequencefind_neighboring_sequence (Scene *scene, Sequence *test, int lr, int sel)
 
Sequencefind_nearest_seq (Scene *scene, View2D *v2d, int *hand, const int mval[2])
 
void recurs_sel_seq (Sequence *seq_meta)
 
(De)select All Operator
static int sequencer_de_select_all_exec (bContext *C, wmOperator *op)
 
void SEQUENCER_OT_select_all (struct wmOperatorType *ot)
 
Select Inverse Operator
static int sequencer_select_inverse_exec (bContext *C, wmOperator *UNUSED(op))
 
void SEQUENCER_OT_select_inverse (struct wmOperatorType *ot)
 
Select Operator
static int sequencer_select_exec (bContext *C, wmOperator *op)
 
void SEQUENCER_OT_select (wmOperatorType *ot)
 
Select More Operator
static bool select_linked_internal (Scene *scene)
 
static bool select_more_less_seq__internal (Scene *scene, bool select_more)
 
static int sequencer_select_more_exec (bContext *C, wmOperator *UNUSED(op))
 
void SEQUENCER_OT_select_more (wmOperatorType *ot)
 
Select Less Operator
static int sequencer_select_less_exec (bContext *C, wmOperator *UNUSED(op))
 
void SEQUENCER_OT_select_less (wmOperatorType *ot)
 
Select Pick Linked Operator
static int sequencer_select_linked_pick_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
void SEQUENCER_OT_select_linked_pick (wmOperatorType *ot)
 
Select Linked Operator
static int sequencer_select_linked_exec (bContext *C, wmOperator *UNUSED(op))
 
void SEQUENCER_OT_select_linked (wmOperatorType *ot)
 
Select Side of Frame Operator
static int sequencer_select_side_of_frame_exec (bContext *C, wmOperator *op)
 
void SEQUENCER_OT_select_side_of_frame (wmOperatorType *ot)
 
Select Side Operator
static int sequencer_select_side_exec (bContext *C, wmOperator *op)
 
void SEQUENCER_OT_select_side (wmOperatorType *ot)
 
Box Select Operator
static int sequencer_box_select_exec (bContext *C, wmOperator *op)
 
static int sequencer_box_select_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
void SEQUENCER_OT_select_box (wmOperatorType *ot)
 

Select Grouped Operator

#define SEQ_IS_SOUND(_seq)   ((_seq->type & SEQ_TYPE_SOUND_RAM) && !(_seq->type & SEQ_TYPE_EFFECT))
 
#define SEQ_IS_EFFECT(_seq)   ((_seq->type & SEQ_TYPE_EFFECT) != 0)
 
#define SEQ_USE_DATA(_seq)    (ELEM(_seq->type, SEQ_TYPE_SCENE, SEQ_TYPE_MOVIECLIP, SEQ_TYPE_MASK) || SEQ_HAS_PATH(_seq))
 
#define SEQ_CHANNEL_CHECK(_seq, _chan)   (ELEM((_chan), 0, (_seq)->machine))
 
enum  {
  SEQ_SELECT_GROUP_TYPE , SEQ_SELECT_GROUP_TYPE_BASIC , SEQ_SELECT_GROUP_TYPE_EFFECT , SEQ_SELECT_GROUP_DATA ,
  SEQ_SELECT_GROUP_EFFECT , SEQ_SELECT_GROUP_EFFECT_LINK , SEQ_SELECT_GROUP_OVERLAP
}
 
static const EnumPropertyItem sequencer_prop_select_grouped_types []
 
static bool select_grouped_type (Editing *ed, Sequence *actseq, const int channel)
 
static bool select_grouped_type_basic (Editing *ed, Sequence *actseq, const int channel)
 
static bool select_grouped_type_effect (Editing *ed, Sequence *actseq, const int channel)
 
static bool select_grouped_data (Editing *ed, Sequence *actseq, const int channel)
 
static bool select_grouped_effect (Editing *ed, Sequence *actseq, const int channel)
 
static bool select_grouped_time_overlap (Editing *ed, Sequence *actseq)
 
static bool select_grouped_effect_link (Editing *ed, Sequence *actseq, const int channel)
 
static int sequencer_select_grouped_exec (bContext *C, wmOperator *op)
 
void SEQUENCER_OT_select_grouped (wmOperatorType *ot)
 

Select Handles Operator

enum  {
  SEQ_SELECT_HANDLES_SIDE_LEFT , SEQ_SELECT_HANDLES_SIDE_RIGHT , SEQ_SELECT_HANDLES_SIDE_BOTH , SEQ_SELECT_HANDLES_SIDE_LEFT_NEIGHBOR ,
  SEQ_SELECT_HANDLES_SIDE_RIGHT_NEIGHBOR , SEQ_SELECT_HANDLES_SIDE_BOTH_NEIGHBORS
}
 
static const EnumPropertyItem prop_select_handles_side_types []
 
static int sequencer_select_handles_exec (bContext *C, wmOperator *op)
 
void SEQUENCER_OT_select_handles (wmOperatorType *ot)
 

Macro Definition Documentation

◆ SEQ_CHANNEL_CHECK

#define SEQ_CHANNEL_CHECK (   _seq,
  _chan 
)    (ELEM((_chan), 0, (_seq)->machine))

Definition at line 1480 of file sequencer_select.c.

◆ SEQ_IS_EFFECT

#define SEQ_IS_EFFECT (   _seq)    ((_seq->type & SEQ_TYPE_EFFECT) != 0)

Definition at line 1475 of file sequencer_select.c.

◆ SEQ_IS_SOUND

#define SEQ_IS_SOUND (   _seq)    ((_seq->type & SEQ_TYPE_SOUND_RAM) && !(_seq->type & SEQ_TYPE_EFFECT))

Definition at line 1473 of file sequencer_select.c.

◆ SEQ_USE_DATA

#define SEQ_USE_DATA (   _seq)     (ELEM(_seq->type, SEQ_TYPE_SCENE, SEQ_TYPE_MOVIECLIP, SEQ_TYPE_MASK) || SEQ_HAS_PATH(_seq))

Definition at line 1477 of file sequencer_select.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
SEQ_SELECT_HANDLES_SIDE_LEFT 
SEQ_SELECT_HANDLES_SIDE_RIGHT 
SEQ_SELECT_HANDLES_SIDE_BOTH 
SEQ_SELECT_HANDLES_SIDE_LEFT_NEIGHBOR 
SEQ_SELECT_HANDLES_SIDE_RIGHT_NEIGHBOR 
SEQ_SELECT_HANDLES_SIDE_BOTH_NEIGHBORS 

Definition at line 1049 of file sequencer_select.c.

◆ anonymous enum

anonymous enum
Enumerator
SEQ_SELECT_GROUP_TYPE 
SEQ_SELECT_GROUP_TYPE_BASIC 
SEQ_SELECT_GROUP_TYPE_EFFECT 
SEQ_SELECT_GROUP_DATA 
SEQ_SELECT_GROUP_EFFECT 
SEQ_SELECT_GROUP_EFFECT_LINK 
SEQ_SELECT_GROUP_OVERLAP 

Definition at line 1439 of file sequencer_select.c.

Function Documentation

◆ ED_sequencer_select_sequence_single()

void ED_sequencer_select_sequence_single ( Scene scene,
Sequence seq,
bool  deselect_all 
)

◆ find_nearest_seq()

Sequence* find_nearest_seq ( Scene scene,
View2D v2d,
int *  hand,
const int  mval[2] 
)

◆ find_neighboring_sequence()

Sequence* find_neighboring_sequence ( Scene scene,
Sequence test,
int  lr,
int  sel 
)

◆ recurs_sel_seq()

void recurs_sel_seq ( Sequence seq_meta)

◆ select_active_side()

static void select_active_side ( ListBase seqbase,
int  sel_side,
int  channel,
int  frame 
)
static

◆ select_active_side_range()

static void select_active_side_range ( ListBase seqbase,
const int  sel_side,
const int  frame_ranges[MAXSEQ],
const int  frame_ignore 
)
static

◆ select_grouped_data()

static bool select_grouped_data ( Editing ed,
Sequence actseq,
const int  channel 
)
static

◆ select_grouped_effect()

static bool select_grouped_effect ( Editing ed,
Sequence actseq,
const int  channel 
)
static

◆ select_grouped_effect_link()

static bool select_grouped_effect_link ( Editing ed,
Sequence actseq,
const int  channel 
)
static

◆ select_grouped_time_overlap()

static bool select_grouped_time_overlap ( Editing ed,
Sequence actseq 
)
static

◆ select_grouped_type()

static bool select_grouped_type ( Editing ed,
Sequence actseq,
const int  channel 
)
static

◆ select_grouped_type_basic()

static bool select_grouped_type_basic ( Editing ed,
Sequence actseq,
const int  channel 
)
static

◆ select_grouped_type_effect()

static bool select_grouped_type_effect ( Editing ed,
Sequence actseq,
const int  channel 
)
static

◆ select_linked_internal()

static bool select_linked_internal ( Scene scene)
static

◆ select_linked_time()

static void select_linked_time ( ListBase seqbase,
Sequence seq_link 
)
static

◆ select_more_less_seq__internal()

static bool select_more_less_seq__internal ( Scene scene,
bool  select_more 
)
static

◆ select_surrounding_handles()

static void select_surrounding_handles ( Scene scene,
Sequence test 
)
static

◆ seq_rectf()

void seq_rectf ( Sequence seq,
rctf rect 
)

◆ sequencer_box_select_exec()

static int sequencer_box_select_exec ( bContext C,
wmOperator op 
)
static

◆ sequencer_box_select_invoke()

static int sequencer_box_select_invoke ( bContext C,
wmOperator op,
const wmEvent event 
)
static

◆ sequencer_de_select_all_exec()

static int sequencer_de_select_all_exec ( bContext C,
wmOperator op 
)
static

◆ SEQUENCER_OT_select()

void SEQUENCER_OT_select ( wmOperatorType ot)

◆ SEQUENCER_OT_select_all()

void SEQUENCER_OT_select_all ( struct wmOperatorType ot)

◆ SEQUENCER_OT_select_box()

void SEQUENCER_OT_select_box ( wmOperatorType ot)

◆ SEQUENCER_OT_select_grouped()

void SEQUENCER_OT_select_grouped ( wmOperatorType ot)

◆ SEQUENCER_OT_select_handles()

void SEQUENCER_OT_select_handles ( wmOperatorType ot)

◆ SEQUENCER_OT_select_inverse()

void SEQUENCER_OT_select_inverse ( struct wmOperatorType ot)

◆ SEQUENCER_OT_select_less()

void SEQUENCER_OT_select_less ( wmOperatorType ot)

◆ SEQUENCER_OT_select_linked()

void SEQUENCER_OT_select_linked ( wmOperatorType ot)

◆ SEQUENCER_OT_select_linked_pick()

void SEQUENCER_OT_select_linked_pick ( wmOperatorType ot)

◆ SEQUENCER_OT_select_more()

void SEQUENCER_OT_select_more ( wmOperatorType ot)

◆ SEQUENCER_OT_select_side()

void SEQUENCER_OT_select_side ( wmOperatorType ot)

◆ SEQUENCER_OT_select_side_of_frame()

void SEQUENCER_OT_select_side_of_frame ( wmOperatorType ot)

◆ sequencer_select_exec()

static int sequencer_select_exec ( bContext C,
wmOperator op 
)
static

◆ sequencer_select_grouped_exec()

static int sequencer_select_grouped_exec ( bContext C,
wmOperator op 
)
static

◆ sequencer_select_handles_exec()

static int sequencer_select_handles_exec ( bContext C,
wmOperator op 
)
static

◆ sequencer_select_inverse_exec()

static int sequencer_select_inverse_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ sequencer_select_less_exec()

static int sequencer_select_less_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ sequencer_select_linked_exec()

static int sequencer_select_linked_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ sequencer_select_linked_pick_invoke()

static int sequencer_select_linked_pick_invoke ( bContext C,
wmOperator op,
const wmEvent event 
)
static

◆ sequencer_select_more_exec()

static int sequencer_select_more_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ sequencer_select_side_exec()

static int sequencer_select_side_exec ( bContext C,
wmOperator op 
)
static

◆ sequencer_select_side_of_frame_exec()

static int sequencer_select_side_of_frame_exec ( bContext C,
wmOperator op 
)
static

Variable Documentation

◆ prop_select_handles_side_types

const EnumPropertyItem prop_select_handles_side_types[]
static
Initial value:
= {
{SEQ_SELECT_HANDLES_SIDE_LEFT, "LEFT", 0, "Left", ""},
{SEQ_SELECT_HANDLES_SIDE_RIGHT, "RIGHT", 0, "Right", ""},
{SEQ_SELECT_HANDLES_SIDE_BOTH, "BOTH", 0, "Both", ""},
{SEQ_SELECT_HANDLES_SIDE_LEFT_NEIGHBOR, "LEFT_NEIGHBOR", 0, "Left Neighbor", ""},
{SEQ_SELECT_HANDLES_SIDE_RIGHT_NEIGHBOR, "RIGHT_NEIGHBOR", 0, "Right Neighbor", ""},
{SEQ_SELECT_HANDLES_SIDE_BOTH_NEIGHBORS, "BOTH_NEIGHBORS", 0, "Both Neighbors", ""},
{0, NULL, 0, NULL, NULL},
}
@ SEQ_SELECT_HANDLES_SIDE_LEFT_NEIGHBOR
@ SEQ_SELECT_HANDLES_SIDE_LEFT
@ SEQ_SELECT_HANDLES_SIDE_BOTH
@ SEQ_SELECT_HANDLES_SIDE_BOTH_NEIGHBORS
@ SEQ_SELECT_HANDLES_SIDE_RIGHT_NEIGHBOR
@ SEQ_SELECT_HANDLES_SIDE_RIGHT

Definition at line 1058 of file sequencer_select.c.

Referenced by SEQUENCER_OT_select_handles().

◆ sequencer_prop_select_grouped_types

const EnumPropertyItem sequencer_prop_select_grouped_types[]
static
Initial value:
= {
{SEQ_SELECT_GROUP_TYPE, "TYPE", 0, "Type", "Shared strip type"},
"TYPE_BASIC",
0,
"Global Type",
"All strips of same basic type (graphical or sound)"},
"TYPE_EFFECT",
0,
"Effect Type",
"Shared strip effect type (if active strip is not an effect one, select all non-effect "
"strips)"},
{SEQ_SELECT_GROUP_DATA, "DATA", 0, "Data", "Shared data (scene, image, sound, etc.)"},
{SEQ_SELECT_GROUP_EFFECT, "EFFECT", 0, "Effect", "Shared effects"},
"EFFECT_LINK",
0,
"Effect/Linked",
"Other strips affected by the active one (sharing some time, and below or effect-assigned)"},
{SEQ_SELECT_GROUP_OVERLAP, "OVERLAP", 0, "Overlap", "Overlapping time"},
{0, NULL, 0, NULL, NULL},
}
@ SEQ_SELECT_GROUP_TYPE_EFFECT
@ SEQ_SELECT_GROUP_TYPE_BASIC
@ SEQ_SELECT_GROUP_EFFECT_LINK
@ SEQ_SELECT_GROUP_EFFECT
@ SEQ_SELECT_GROUP_OVERLAP
@ SEQ_SELECT_GROUP_TYPE
@ SEQ_SELECT_GROUP_DATA

Definition at line 1449 of file sequencer_select.c.

Referenced by SEQUENCER_OT_select_grouped().