66 int current_channel_index = 0, channel_index;
75 if (current_channel_index == channel_index) {
87 else if (show_selected_only ==
false) {
95 current_channel_index++;
111 ®ion->
v2d, event->
mval[0], event->
mval[1], &location[0], &location[1]);
120 ot->name =
"Select Channel";
121 ot->description =
"Select movie tracking channel";
122 ot->idname =
"CLIP_OT_dopesheet_select_channel";
140 "Mouse location to select channel",
147 "Extend selection rather than clearing the existing selection");
160 int frame_min = INT_MAX, frame_max = INT_MIN;
163 if (channel->segments) {
164 frame_min =
min_ii(frame_min, channel->segments[0]);
165 frame_max =
max_ii(frame_max, channel->segments[channel->tot_segment]);
169 if (frame_min < frame_max) {
189 ot->name =
"Frame All";
190 ot->description =
"Reset viewable area to show full keyframe range";
191 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 wmOperatorStatus dopesheet_view_all_exec(bContext *C, wmOperator *)
void CLIP_OT_dopesheet_select_channel(wmOperatorType *ot)
static wmOperatorStatus dopesheet_select_channel_exec(bContext *C, wmOperator *op)
static wmOperatorStatus 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)
struct MovieTracking tracking
MovieTrackingTrack * active_track
MovieTrackingDopesheet dopesheet
void WM_event_add_notifier(const bContext *C, uint type, void *reference)