94 for (seq = seqbase->
first; seq; seq = seq->
next) {
121 const int frame_ranges[
MAXSEQ],
122 const int frame_ignore)
126 for (seq = seqbase->
first; seq; seq = seq->
next) {
128 const int frame = frame_ranges[seq->
machine];
129 if (frame == frame_ignore) {
159 for (seq = seqbase->
first; seq; seq = seq->
next) {
164 if (left_match && right_match) {
171 else if (seq_link->
flag &
SELECT && (left_match || right_match)) {
251 ((sel == -1) || (sel && (seq->
flag &
SELECT)) ||
302 if (displen / pixelx > 16) {
307 if ((displen / 3) < 30 * pixelx) {
308 handsize = displen / 3;
311 CLAMP(handsize, 7 * pixelx, 30 * pixelx);
317 else if (-handsize + seq->
enddisp <=
x) {
331 static void select_neighbor_from_last(
Scene *
scene,
int lr)
335 bool changed =
false;
443 ot->
name =
"(De)select All";
444 ot->
idname =
"SEQUENCER_OT_select_all";
489 ot->
name =
"Select Inverse";
490 ot->
idname =
"SEQUENCER_OT_select_inverse";
524 Sequence *seq, *neighbor, *act_orig;
532 wait_to_deselect_others =
false;
538 if (seq && linked_time) {
539 side_of_frame =
false;
545 if (extend ==
false) {
552 if (((
x <
CFRA) && (seq_iter->enddisp <=
CFRA)) ||
553 ((
x >=
CFRA) && (seq_iter->startdisp >=
CFRA))) {
587 if (wait_to_deselect_others && (seq->
flag &
SELECT) &&
591 else if (!extend && !linked_handle) {
697 if (linked_handle == 0) {
729 else if (deselect_all) {
749 ot->
description =
"Select a strip (last selected becomes the \"active strip\")";
769 "Deselect On Nothing",
770 "Deselect all when nothing under the cursor");
777 "Select handles next to the active strip");
781 ot->
srna,
"linked_time",
false,
"Linked Time",
"Select other strips at the same time");
789 "Select all strips on same side of the current frame as the mouse cursor");
808 bool changed =
false;
842 const int neighbor_selection_filter = select_more ? 0 :
SELECT;
843 const int selection_filter = select_more ?
SELECT : 0;
846 if ((seq->
flag &
SELECT) != selection_filter) {
860 bool changed =
false;
899 ot->
idname =
"SEQUENCER_OT_select_more";
900 ot->
description =
"Select more strips adjacent to the current selection";
935 ot->
idname =
"SEQUENCER_OT_select_less";
936 ot->
description =
"Shrink the current selection of adjacent selected strips";
990 ot->
name =
"Select Pick Linked";
991 ot->
idname =
"SEQUENCER_OT_select_linked_pick";
992 ot->
description =
"Select a chain of linked strips nearest to the mouse pointer";
1031 ot->
name =
"Select Linked";
1032 ot->
idname =
"SEQUENCER_OT_select_linked";
1033 ot->
description =
"Select all strips adjacent to the current selection";
1141 ot->
name =
"Select Handles";
1142 ot->
idname =
"SEQUENCER_OT_select_handles";
1143 ot->
description =
"Select gizmo handles on the sides of the selected strip";
1158 "The side of the handle that is selected");
1177 if (extend ==
false) {
1180 const int timeline_frame =
CFRA;
1185 test = (timeline_frame >= seq->
enddisp);
1188 test = (timeline_frame <= seq->
startdisp);
1191 test = (timeline_frame <= seq->
enddisp) && (timeline_frame >= seq->
startdisp);
1211 {-1,
"LEFT", 0,
"Left",
"Select to the left of the current frame"},
1212 {1,
"RIGHT", 0,
"Right",
"Select to the right of the current frame"},
1217 ot->
name =
"Select Side of Frame";
1218 ot->
idname =
"SEQUENCER_OT_select_side_of_frame";
1219 ot->
description =
"Select strips relative to the current frame";
1245 const int frame_init = sel_side ==
SEQ_SIDE_LEFT ? INT_MIN : INT_MAX;
1246 int frame_ranges[
MAXSEQ];
1247 bool selected =
false;
1255 int *frame_limit_p = &frame_ranges[seq->
machine];
1267 if (selected ==
false) {
1283 ot->
name =
"Select Side";
1284 ot->
idname =
"SEQUENCER_OT_select_side";
1285 ot->
description =
"Select strips on the nominated side of the selected strips";
1300 "The side to which the selection is applied");
1407 ot->
idname =
"SEQUENCER_OT_select_box";
1426 ot->
srna,
"tweak", 0,
"Tweak",
"Operator has been activated using a tweak event");
1429 ot->
srna,
"include_handles", 0,
"Select Handles",
"Select the strips and their handles");
1455 "All strips of same basic type (graphical or sound)"},
1460 "Shared strip effect type (if active strip is not an effect one, select all non-effect "
1468 "Other strips affected by the active one (sharing some time, and below or effect-assigned)"},
1473 #define SEQ_IS_SOUND(_seq) ((_seq->type & SEQ_TYPE_SOUND_RAM) && !(_seq->type & SEQ_TYPE_EFFECT))
1475 #define SEQ_IS_EFFECT(_seq) ((_seq->type & SEQ_TYPE_EFFECT) != 0)
1477 #define SEQ_USE_DATA(_seq) \
1478 (ELEM(_seq->type, SEQ_TYPE_SCENE, SEQ_TYPE_MOVIECLIP, SEQ_TYPE_MASK) || SEQ_HAS_PATH(_seq))
1480 #define SEQ_CHANNEL_CHECK(_seq, _chan) (ELEM((_chan), 0, (_seq)->machine))
1484 bool changed =
false;
1498 bool changed =
false;
1513 bool changed =
false;
1529 bool changed =
false;
1558 seq->
clip == clip) {
1579 bool changed =
false;
1589 effects[seq->
type] =
true;
1613 bool changed =
false;
1627 bool changed =
false;
1630 int enddisp = actseq->
enddisp;
1631 int machine = actseq->
machine;
1659 if (enddisp < seq->enddisp) {
1662 if (machine < seq->machine) {
1677 else if (seq->
machine < machine || is_audio) {
1688 #undef SEQ_IS_EFFECT
1697 if (actseq ==
NULL) {
1706 bool changed =
false;
1754 ot->
name =
"Select Grouped";
1755 ot->
idname =
"SEQUENCER_OT_select_grouped";
1756 ot->
description =
"Select all strips grouped by various properties";
1772 "Extend selection instead of deselecting everything first");
1774 "use_active_channel",
1777 "Only consider strips on the same channel as the active one");
typedef float(TangentPoint)[2]
struct Scene * CTX_data_scene(const bContext *C)
struct SpaceSeq * CTX_wm_space_seq(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
void BKE_report(ReportList *reports, ReportType type, const char *message)
unsigned int BLI_ghashutil_ptrhash(const void *key)
GSet * BLI_gset_new(GSetHashFP hashfp, GSetCmpFP cmpfp, const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
bool BLI_ghashutil_ptrcmp(const void *a, const void *b)
BLI_INLINE bool BLI_gsetIterator_done(GSetIterator *gsi)
BLI_INLINE void BLI_gsetIterator_init(GSetIterator *gsi, GSet *gs)
void BLI_gset_free(GSet *gs, GSetKeyFreeFP keyfreefp)
BLI_INLINE void BLI_gsetIterator_step(GSetIterator *gsi)
BLI_INLINE void * BLI_gsetIterator_getKey(GSetIterator *gsi)
bool BLI_gset_add(GSet *gs, void *key)
#define LISTBASE_FOREACH(type, var, list)
MINLINE int min_ii(int a, int b)
MINLINE int max_ii(int a, int b)
void copy_vn_i(int *array_tar, const int size, const int val)
bool BLI_rctf_isect(const struct rctf *src1, const struct rctf *src2, struct rctf *dest)
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
#define POINTER_FROM_INT(i)
#define SET_FLAG_FROM_TEST(value, test, flag)
#define SEQ_HAS_PATH(_seq)
#define SEQ_STRIP_OFSBOTTOM
void ED_outliner_select_sync_from_sequence_tag(struct bContext *C)
bool ED_operator_sequencer_active(struct bContext *C)
#define SEL_OP_USE_PRE_DESELECT(sel_op)
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
_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 const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
Group RGB to Bright Vector Camera CLAMP
struct View2D * UI_view2d_fromcontext(const struct bContext *C)
void UI_view2d_region_to_view_rctf(const struct View2D *v2d, const struct rctf *rect_src, struct rctf *rect_dst) ATTR_NONNULL()
void UI_view2d_region_to_view(const struct View2D *v2d, float x, float y, float *r_view_x, float *r_view_y) ATTR_NONNULL()
float UI_view2d_region_to_view_x(const struct View2D *v2d, float x)
void SEQ_iterator_end(SeqIterator *iter)
void SEQ_iterator_begin(Editing *ed, SeqIterator *iter, const bool use_current_sequences)
void SEQ_iterator_next(SeqIterator *iter)
int RNA_int_get(PointerRNA *ptr, const char *name)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
ListBase * SEQ_active_seqbase_get(const Editing *ed)
Editing * SEQ_editing_get(Scene *scene, bool alloc)
float sequence_handle_size_get_clamped(Sequence *seq, const float pixelx)
EnumPropertyItem prop_side_types[]
bool sequencer_edit_poll(bContext *C)
static void select_active_side_range(ListBase *seqbase, const int sel_side, const int frame_ranges[MAXSEQ], const int frame_ignore)
static int sequencer_select_linked_pick_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static int sequencer_box_select_invoke(bContext *C, wmOperator *op, const wmEvent *event)
#define SEQ_USE_DATA(_seq)
static bool select_grouped_effect_link(Editing *ed, Sequence *actseq, const int channel)
static bool select_grouped_type(Editing *ed, Sequence *actseq, const int channel)
void recurs_sel_seq(Sequence *seq_meta)
static int sequencer_box_select_exec(bContext *C, wmOperator *op)
static bool select_grouped_data(Editing *ed, Sequence *actseq, const int channel)
void SEQUENCER_OT_select_side_of_frame(wmOperatorType *ot)
@ 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
void SEQUENCER_OT_select_more(wmOperatorType *ot)
@ SEQ_SELECT_GROUP_TYPE_EFFECT
@ SEQ_SELECT_GROUP_TYPE_BASIC
@ SEQ_SELECT_GROUP_EFFECT_LINK
@ SEQ_SELECT_GROUP_EFFECT
@ SEQ_SELECT_GROUP_OVERLAP
static bool select_grouped_time_overlap(Editing *ed, Sequence *actseq)
#define SEQ_CHANNEL_CHECK(_seq, _chan)
static int sequencer_select_handles_exec(bContext *C, wmOperator *op)
static void select_surrounding_handles(Scene *scene, Sequence *test)
void ED_sequencer_select_sequence_single(Scene *scene, Sequence *seq, bool deselect_all)
static int sequencer_de_select_all_exec(bContext *C, wmOperator *op)
static void select_linked_time(ListBase *seqbase, Sequence *seq_link)
void SEQUENCER_OT_select_linked_pick(wmOperatorType *ot)
void seq_rectf(Sequence *seq, rctf *rect)
void SEQUENCER_OT_select_box(wmOperatorType *ot)
static bool select_grouped_type_effect(Editing *ed, Sequence *actseq, const int channel)
static int sequencer_select_linked_exec(bContext *C, wmOperator *UNUSED(op))
#define SEQ_IS_EFFECT(_seq)
static const EnumPropertyItem sequencer_prop_select_grouped_types[]
void SEQUENCER_OT_select_linked(wmOperatorType *ot)
void SEQUENCER_OT_select_side(wmOperatorType *ot)
static int sequencer_select_less_exec(bContext *C, wmOperator *UNUSED(op))
Sequence * find_nearest_seq(Scene *scene, View2D *v2d, int *hand, const int mval[2])
static bool select_linked_internal(Scene *scene)
void SEQUENCER_OT_select(wmOperatorType *ot)
static int sequencer_select_more_exec(bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_select_grouped(wmOperatorType *ot)
void SEQUENCER_OT_select_handles(wmOperatorType *ot)
void SEQUENCER_OT_select_all(struct wmOperatorType *ot)
Sequence * find_neighboring_sequence(Scene *scene, Sequence *test, int lr, int sel)
static const EnumPropertyItem prop_select_handles_side_types[]
static int sequencer_select_grouped_exec(bContext *C, wmOperator *op)
void SEQUENCER_OT_select_inverse(struct wmOperatorType *ot)
void SEQUENCER_OT_select_less(wmOperatorType *ot)
static int sequencer_select_inverse_exec(bContext *C, wmOperator *UNUSED(op))
static bool select_grouped_effect(Editing *ed, Sequence *actseq, const int channel)
static int sequencer_select_side_exec(bContext *C, wmOperator *op)
static int sequencer_select_side_of_frame_exec(bContext *C, wmOperator *op)
static int sequencer_select_exec(bContext *C, wmOperator *op)
static bool select_more_less_seq__internal(Scene *scene, bool select_more)
#define SEQ_IS_SOUND(_seq)
static void select_active_side(ListBase *seqbase, int sel_side, int channel, int frame)
static bool select_grouped_type_basic(Editing *ed, Sequence *actseq, const int channel)
Sequence * SEQ_select_active_get(Scene *scene)
void SEQ_select_active_set(Scene *scene, Sequence *seq)
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
int(* modal)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
void(* cancel)(struct bContext *, struct wmOperator *)
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
__forceinline const avxb select(const avxb &m, const avxb &t, const avxb &f)
__forceinline const avxi abs(const avxi &a)
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
void WM_gesture_box_cancel(bContext *C, wmOperator *op)
int WM_gesture_box_invoke(bContext *C, wmOperator *op, const wmEvent *event)
int WM_gesture_box_modal(bContext *C, wmOperator *op, const wmEvent *event)
void WM_operator_properties_gesture_box(wmOperatorType *ot)
void WM_operator_properties_select_operation_simple(wmOperatorType *ot)
void WM_operator_properties_generic_select(wmOperatorType *ot)
void WM_operator_properties_select_all(wmOperatorType *ot)
void WM_operator_properties_border_to_rctf(struct wmOperator *op, rctf *rect)
int WM_generic_select_invoke(bContext *C, wmOperator *op, const wmEvent *event)
int WM_menu_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
int WM_generic_select_modal(bContext *C, wmOperator *op, const wmEvent *event)