Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_sequencer/sequencer_select.c
| Show First 20 Lines • Show All 956 Lines • ▼ Show 20 Lines | static int sequencer_select_side_exec(bContext *C, wmOperator *op) | ||||
| const int sel_side = RNA_enum_get(op->ptr, "side"); | const int sel_side = RNA_enum_get(op->ptr, "side"); | ||||
| const int frame_init = sel_side == SEQ_SIDE_LEFT ? INT_MIN : INT_MAX; | const int frame_init = sel_side == SEQ_SIDE_LEFT ? INT_MIN : INT_MAX; | ||||
| int frame_ranges[MAXSEQ]; | int frame_ranges[MAXSEQ]; | ||||
| bool selected = false; | bool selected = false; | ||||
| copy_vn_i(frame_ranges, ARRAY_SIZE(frame_ranges), frame_init); | copy_vn_i(frame_ranges, ARRAY_SIZE(frame_ranges), frame_init); | ||||
| for (Sequence *seq = ed->seqbasep->first; seq; seq = seq->next) { | LISTBASE_FOREACH (Sequence *, seq, ed->seqbasep) { | ||||
| if (UNLIKELY(seq->machine >= MAXSEQ)) { | if (UNLIKELY(seq->machine >= MAXSEQ)) { | ||||
| continue; | continue; | ||||
| } | } | ||||
| int *frame_limit_p = &frame_ranges[seq->machine]; | int *frame_limit_p = &frame_ranges[seq->machine]; | ||||
| if (seq->flag & SELECT) { | if (seq->flag & SELECT) { | ||||
| selected = true; | selected = true; | ||||
| if (sel_side == SEQ_SIDE_LEFT) { | if (sel_side == SEQ_SIDE_LEFT) { | ||||
| *frame_limit_p = max_ii(*frame_limit_p, seq->startdisp); | *frame_limit_p = max_ii(*frame_limit_p, seq->startdisp); | ||||
| ▲ Show 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | static int sequencer_box_select_exec(bContext *C, wmOperator *op) | ||||
| if (SEL_OP_USE_PRE_DESELECT(sel_op)) { | if (SEL_OP_USE_PRE_DESELECT(sel_op)) { | ||||
| ED_sequencer_deselect_all(scene); | ED_sequencer_deselect_all(scene); | ||||
| } | } | ||||
| rctf rectf; | rctf rectf; | ||||
| WM_operator_properties_border_to_rctf(op, &rectf); | WM_operator_properties_border_to_rctf(op, &rectf); | ||||
| UI_view2d_region_to_view_rctf(v2d, &rectf, &rectf); | UI_view2d_region_to_view_rctf(v2d, &rectf, &rectf); | ||||
| for (Sequence *seq = ed->seqbasep->first; seq; seq = seq->next) { | LISTBASE_FOREACH (Sequence *, seq, ed->seqbasep) { | ||||
| rctf rq; | rctf rq; | ||||
| seq_rectf(seq, &rq); | seq_rectf(seq, &rq); | ||||
| if (BLI_rctf_isect(&rq, &rectf, NULL)) { | if (BLI_rctf_isect(&rq, &rectf, NULL)) { | ||||
| if (handles) { | if (handles) { | ||||
| /* Get the handles draw size. */ | /* Get the handles draw size. */ | ||||
| float pixelx = BLI_rctf_size_x(&v2d->cur) / BLI_rcti_size_x(&v2d->mask); | float pixelx = BLI_rctf_size_x(&v2d->cur) / BLI_rcti_size_x(&v2d->mask); | ||||
| float handsize = sequence_handle_size_get_clamped(seq, pixelx); | float handsize = sequence_handle_size_get_clamped(seq, pixelx); | ||||
| ▲ Show 20 Lines • Show All 456 Lines • Show Last 20 Lines | |||||