Changes in clip editor's public api to make it's more clear
[blender.git] / source / blender / editors / space_clip / clip_graph_ops.c
index b7687eba717756f5a3f9de328e58c1febeeaf825..abf7f416b9ccc255b2784a4e1189340eafb2db80 100644 (file)
@@ -166,7 +166,7 @@ static void mouse_select_init_data(MouseSelectUserData *userdata, float *co)
 static int mouse_select_knot(bContext *C, float co[2], int extend)
 {
        SpaceClip *sc = CTX_wm_space_clip(C);
 static int mouse_select_knot(bContext *C, float co[2], int extend)
 {
        SpaceClip *sc = CTX_wm_space_clip(C);
-       MovieClip *clip = ED_space_clip(sc);
+       MovieClip *clip = ED_space_clip_get_clip(sc);
        ARegion *ar = CTX_wm_region(C);
        View2D *v2d = &ar->v2d;
        MovieTracking *tracking = &clip->tracking;
        ARegion *ar = CTX_wm_region(C);
        View2D *v2d = &ar->v2d;
        MovieTracking *tracking = &clip->tracking;
@@ -211,7 +211,7 @@ static int mouse_select_knot(bContext *C, float co[2], int extend)
 static int mouse_select_curve(bContext *C, float co[2], int extend)
 {
        SpaceClip *sc = CTX_wm_space_clip(C);
 static int mouse_select_curve(bContext *C, float co[2], int extend)
 {
        SpaceClip *sc = CTX_wm_space_clip(C);
-       MovieClip *clip = ED_space_clip(sc);
+       MovieClip *clip = ED_space_clip_get_clip(sc);
        MovieTracking *tracking = &clip->tracking;
        MovieTrackingTrack *act_track = BKE_tracking_track_get_active(tracking);
        MouseSelectUserData userdata;
        MovieTracking *tracking = &clip->tracking;
        MovieTrackingTrack *act_track = BKE_tracking_track_get_active(tracking);
        MouseSelectUserData userdata;
@@ -345,7 +345,7 @@ static int border_select_graph_exec(bContext *C, wmOperator *op)
 {
        SpaceClip *sc = CTX_wm_space_clip(C);
        ARegion *ar = CTX_wm_region(C);
 {
        SpaceClip *sc = CTX_wm_space_clip(C);
        ARegion *ar = CTX_wm_region(C);
-       MovieClip *clip = ED_space_clip(sc);
+       MovieClip *clip = ED_space_clip_get_clip(sc);
        MovieTracking *tracking = &clip->tracking;
        MovieTrackingTrack *act_track = BKE_tracking_track_get_active(tracking);
        BorderSelectuserData userdata;
        MovieTracking *tracking = &clip->tracking;
        MovieTrackingTrack *act_track = BKE_tracking_track_get_active(tracking);
        BorderSelectuserData userdata;
@@ -400,7 +400,7 @@ void CLIP_OT_graph_select_border(wmOperatorType *ot)
 static int graph_select_all_markers_exec(bContext *C, wmOperator *op)
 {
        SpaceClip *sc = CTX_wm_space_clip(C);
 static int graph_select_all_markers_exec(bContext *C, wmOperator *op)
 {
        SpaceClip *sc = CTX_wm_space_clip(C);
-       MovieClip *clip = ED_space_clip(sc);
+       MovieClip *clip = ED_space_clip_get_clip(sc);
        MovieTracking *tracking = &clip->tracking;
        MovieTrackingTrack *act_track = BKE_tracking_track_get_active(tracking);
        MovieTrackingMarker *marker;
        MovieTracking *tracking = &clip->tracking;
        MovieTrackingTrack *act_track = BKE_tracking_track_get_active(tracking);
        MovieTrackingMarker *marker;
@@ -466,7 +466,7 @@ void CLIP_OT_graph_select_all_markers(wmOperatorType *ot)
 static int delete_curve_exec(bContext *C, wmOperator *UNUSED(op))
 {
        SpaceClip *sc = CTX_wm_space_clip(C);
 static int delete_curve_exec(bContext *C, wmOperator *UNUSED(op))
 {
        SpaceClip *sc = CTX_wm_space_clip(C);
-       MovieClip *clip = ED_space_clip(sc);
+       MovieClip *clip = ED_space_clip_get_clip(sc);
        MovieTracking *tracking = &clip->tracking;
        ListBase *tracksbase = BKE_tracking_get_active_tracks(tracking);
        MovieTrackingTrack *act_track = BKE_tracking_track_get_active(tracking);
        MovieTracking *tracking = &clip->tracking;
        ListBase *tracksbase = BKE_tracking_get_active_tracks(tracking);
        MovieTrackingTrack *act_track = BKE_tracking_track_get_active(tracking);
@@ -498,7 +498,7 @@ void CLIP_OT_graph_delete_curve(wmOperatorType *ot)
 static int delete_knot_exec(bContext *C, wmOperator *UNUSED(op))
 {
        SpaceClip *sc = CTX_wm_space_clip(C);
 static int delete_knot_exec(bContext *C, wmOperator *UNUSED(op))
 {
        SpaceClip *sc = CTX_wm_space_clip(C);
-       MovieClip *clip = ED_space_clip(sc);
+       MovieClip *clip = ED_space_clip_get_clip(sc);
        MovieTracking *tracking = &clip->tracking;
        ListBase *tracksbase = BKE_tracking_get_active_tracks(tracking);
        MovieTrackingTrack *act_track = BKE_tracking_track_get_active(tracking);
        MovieTracking *tracking = &clip->tracking;
        ListBase *tracksbase = BKE_tracking_get_active_tracks(tracking);
        MovieTrackingTrack *act_track = BKE_tracking_track_get_active(tracking);
@@ -648,7 +648,7 @@ void CLIP_OT_graph_center_current_frame(wmOperatorType *ot)
 static int graph_disable_markers_exec(bContext *C, wmOperator *op)
 {
        SpaceClip *sc = CTX_wm_space_clip(C);
 static int graph_disable_markers_exec(bContext *C, wmOperator *op)
 {
        SpaceClip *sc = CTX_wm_space_clip(C);
-       MovieClip *clip = ED_space_clip(sc);
+       MovieClip *clip = ED_space_clip_get_clip(sc);
        MovieTracking *tracking = &clip->tracking;
        MovieTrackingTrack *act_track = BKE_tracking_track_get_active(tracking);
        MovieTrackingMarker *marker;
        MovieTracking *tracking = &clip->tracking;
        MovieTrackingTrack *act_track = BKE_tracking_track_get_active(tracking);
        MovieTrackingMarker *marker;