Tracking dopesheet missed tagigng for update in some cases.
authorSergey Sharybin <sergey.vfx@gmail.com>
Sun, 24 Jun 2012 18:00:14 +0000 (18:00 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Sun, 24 Jun 2012 18:00:14 +0000 (18:00 +0000)
source/blender/editors/space_clip/tracking_ops.c

index 926d34776d12a45a16deda09e8adc38909068ee4..2e4ba844646801ecd36aa8dea26dd95ae7638abc 100644 (file)
@@ -1586,14 +1586,15 @@ static int clear_track_path_exec(bContext *C, wmOperator *op)
 {
        SpaceClip *sc = CTX_wm_space_clip(C);
        MovieClip *clip = ED_space_clip_get_clip(sc);
+       MovieTracking *tracking = &clip->tracking;
        MovieTrackingTrack *track;
-       ListBase *tracksbase = BKE_tracking_get_active_tracks(&clip->tracking);
+       ListBase *tracksbase = BKE_tracking_get_active_tracks(tracking);
        int action = RNA_enum_get(op->ptr, "action");
        int clear_active = RNA_boolean_get(op->ptr, "clear_active");
        int framenr = ED_space_clip_get_clip_frame_number(sc);
 
        if (clear_active) {
-               track = BKE_tracking_track_get_active(&clip->tracking);
+               track = BKE_tracking_track_get_active(tracking);
                BKE_tracking_track_path_clear(track, framenr, action);
        }
        else {
@@ -1606,6 +1607,7 @@ static int clear_track_path_exec(bContext *C, wmOperator *op)
                }
        }
 
+       BKE_tracking_dopesheet_tag_update(tracking);
        WM_event_add_notifier(C, NC_MOVIECLIP | NA_EVALUATED, clip);
 
        return OPERATOR_FINISHED;
@@ -2606,6 +2608,7 @@ static int detect_features_exec(bContext *C, wmOperator *op)
 
        IMB_freeImBuf(ibuf);
 
+       BKE_tracking_dopesheet_tag_update(tracking);
        WM_event_add_notifier(C, NC_MOVIECLIP | NA_EDITED, NULL);
 
        return OPERATOR_FINISHED;