67 int current_channel_index = 0, channel_index;
76 if (current_channel_index == channel_index) {
88 else if (show_selected_only ==
false) {
93 track->
flag &= ~TRACK_DOPE_SEL;
96 current_channel_index++;
110 ®ion->v2d, event->
mval[0], event->
mval[1], &location[0], &location[1]);
119 ot->
name =
"Select Channel";
121 ot->
idname =
"CLIP_OT_dopesheet_select_channel";
139 "Mouse location to select channel",
146 "Extend selection rather than clearing the existing selection");
155 View2D *v2d = ®ion->v2d;
159 int frame_min = INT_MAX, frame_max = INT_MIN;
162 frame_min =
min_ii(frame_min, channel->segments[0]);
163 frame_max =
max_ii(frame_max, channel->segments[channel->tot_segment]);
166 if (frame_min < frame_max) {
187 ot->
description =
"Reset viewable area to show full keyframe range";
188 ot->
idname =
"CLIP_OT_dopesheet_view_all";
SpaceClip * CTX_wm_space_clip(const bContext *C)
ARegion * CTX_wm_region(const bContext *C)
void BKE_tracking_track_deselect(struct MovieTrackingTrack *track, int area)
struct MovieTrackingObject * BKE_tracking_object_get_active(const struct MovieTracking *tracking)
void BKE_tracking_track_select(struct ListBase *tracksbase, struct MovieTrackingTrack *track, int area, bool extend)
#define LISTBASE_FOREACH(type, var, list)
MINLINE int min_ii(int a, int b)
MINLINE int max_ii(int a, int b)
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
@ TRACKING_DOPE_SELECTED_ONLY
MovieClip * ED_space_clip_get_clip(const SpaceClip *sc)
bool ED_space_clip_tracking_poll(bContext *C)
void ED_region_tag_redraw(ARegion *region)
void UI_view2d_region_to_view(const View2D *v2d, float x, float y, float *r_view_x, float *r_view_y) ATTR_NONNULL()
static bool space_clip_dopesheet_poll(bContext *C)
void CLIP_OT_dopesheet_view_all(wmOperatorType *ot)
static int dopesheet_view_all_exec(bContext *C, wmOperator *)
void CLIP_OT_dopesheet_select_channel(wmOperatorType *ot)
static int dopesheet_select_channel_exec(bContext *C, wmOperator *op)
static int dopesheet_select_channel_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static bool dopesheet_select_channel_poll(bContext *C)
#define CHANNEL_HEIGHT_HALF
void RNA_float_get_array(PointerRNA *ptr, const char *name, float *values)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
void RNA_float_set_array(PointerRNA *ptr, const char *name, const float *values)
PropertyRNA * RNA_def_float_vector(StructOrFunctionRNA *cont_, const char *identifier, const int len, const float *default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
MovieTrackingTrack * active_track
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
int(* invoke)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
int(* exec)(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
void WM_event_add_notifier(const bContext *C, uint type, void *reference)