Camera tracking integration
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 8 Aug 2011 20:25:00 +0000 (20:25 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 8 Aug 2011 20:25:00 +0000 (20:25 +0000)
===========================

- Code cleanup.
- Fixed small bug with cleanup operator.

source/blender/blenkernel/intern/constraint.c
source/blender/blenkernel/intern/tracking.c
source/blender/editors/interface/interface_handlers.c
source/blender/editors/space_clip/tracking_ops.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/imbuf/intern/indexer.c
source/blender/imbuf/intern/indexer_dv.c
source/blender/makesrna/intern/rna_movieclip.c
source/blender/makesrna/intern/rna_tracking.c

index 4ab1255797137de563a05f6400a4c82c9b31c534..c771754b0668888e52134bf07c9ae0c00a4f8bdb 100644 (file)
@@ -4118,7 +4118,6 @@ static void camerasolver_evaluate (bConstraint *con, bConstraintOb *cob, ListBas
        Scene *scene= cob->scene;
        bCameraSolverConstraint *data= con->data;
        MovieClip *clip= data->clip;
-       MovieReconstructedCamera *camera;
 
        if(data->flag&CAMERASOLVER_DEFAULTCLIP)
                clip= scene->clip;
index 2a6d6e88c625641a8c42f0667d6166af2f72c8f8..a90d3d09b0558347cb140ae9c86a1ae6ea883af1 100644 (file)
@@ -1081,7 +1081,6 @@ static int reconstruction_camera_index(MovieTracking *tracking, int framenr, int
 
        while(a>=0 && a<reconstruction->camnr) {
                int cfra= cameras[a].framenr;
-               int ok= cfra==framenr;
 
                /* check if needed framenr was "skipped" -- no data for requested frame */
 
index 9da2bbbed39ed9bc479f6ef945fb04e6dff16ba9..628ca196c0a9ddc1e55721af24bd1545eec1cc52 100644 (file)
@@ -4075,9 +4075,8 @@ static int ui_do_but_LINK(bContext *C, uiBut *but, uiHandleButtonData *data, wmE
 static int ui_numedit_but_TRACKPREVIEW(bContext *C, uiBut *but, uiHandleButtonData *data, int mx, int my, int shift)
 {
        MovieClipScopes *scopes = (MovieClipScopes *)but->poin;
-       /* rcti rect; */
        int changed= 1;
-       float dx, dy, yfac=1.f;
+       float dx, dy;
 
        dx = mx - data->draglastx;
        dy = my - data->draglasty;
index a11d776c4dbdccaf91b5f7cd00da2c74ba6d9ced..f7c4ff8442e024dbed35a8c5fcc313a53f632a57 100644 (file)
@@ -2734,9 +2734,10 @@ static int clean_tracks_exec(bContext *C, wmOperator *op)
 
        track= tracking->tracks.first;
        while(track) {
+               next= track->next;
+
                if((track->flag&TRACK_HIDDEN)==0 && (track->flag&TRACK_LOCKED)==0) {
                        int ok= 1;
-                       next= track->next;
 
                        ok&= is_track_clean(track, frames, action==2);
                        ok&= error == 0.f || (track->flag&TRACK_HAS_BUNDLE)==0  || track->error < error;
index d5f8bce297081ca4ff831b471e8286880ae017c6..9832406a3aa7dc69f286be129e9ad21135c9e886 100644 (file)
@@ -1246,7 +1246,6 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d)
 
                if (ca && (ca->flag & CAM_SHOWSENSOR)) {
                        /* assume fixed sensor width for now */
-                       float sensor_aspect = ca->sensor_x / ca->sensor_y;
                        float sensor_scale = (x2i-x1i) / ca->sensor_x;
                        float sensor_height = sensor_scale * ca->sensor_y;
 
index 0247d5e88d34b6880bf158e5ceff3f498b3a2ab8..dda9440ffb56a9fd44302f061fa0c98cbd9421ed 100644 (file)
@@ -401,7 +401,7 @@ static int round_up(int x, int mod)
 static struct proxy_output_ctx * alloc_proxy_output_ffmpeg(
        struct anim * anim,
        AVStream * st, int proxy_size, int width, int height,
-       int quality)
+       int UNUSED(quality))
 {
        struct proxy_output_ctx * rv = MEM_callocN(
                sizeof(struct proxy_output_ctx), "alloc_proxy_output");
@@ -862,7 +862,7 @@ static AviMovie * alloc_proxy_output_avi(
 }
 
 static void index_rebuild_fallback(struct anim * anim,
-                                  IMB_Timecode_Type tcs_in_use,
+                                  IMB_Timecode_Type UNUSED(tcs_in_use),
                                   IMB_Proxy_Size proxy_sizes_in_use,
                                   int quality,
                                   short *stop, short *do_update, 
index 0d984aaecd8c0b69195314f30933a9f8c2996c5e..5cdbf8d70d2c0aa9e171e67b66c7fa8688e872af 100644 (file)
@@ -253,7 +253,7 @@ static void fill_gap(indexer_dv_context * This, int isPAL)
 }
 
 static void proc_frame(indexer_dv_context * This,
-                      unsigned char* framebuffer, int isPAL)
+                      unsigned char* UNUSED(framebuffer), int isPAL)
 {
        struct tm recDate;
        time_t t;
@@ -303,7 +303,7 @@ static void proc_frame(indexer_dv_context * This,
 
 static void indexer_dv_proc_frame(anim_index_builder * idx, 
                                  unsigned char * buffer,
-                                 int data_size
+                                 int UNUSED(data_size)
                                  struct anim_index_entry * entry)
 {
        int isPAL;
index 326c4a0a1ad01f7d686d97427a0bb9b2dde61bb0..2e4fe3d40db0898c4a885eaa4675a900102fa480 100644 (file)
@@ -52,7 +52,7 @@
 
 #include "BKE_depsgraph.h"
 
-static void rna_MovieClip_reload_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_MovieClip_reload_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
 {
        MovieClip *clip= (MovieClip*)ptr->data;
 
index 3af443115f768581dd04b1601ab523bc51466fe0..3ebb64724c3784b1f609e73ba689c37ecb6871e5 100644 (file)
@@ -81,7 +81,7 @@ void rna_trackingTrack_name_set(PointerRNA *ptr, const char *value)
        BKE_track_unique_name(&clip->tracking, track);
 }
 
-static void rna_tracking_trackerPattern_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_tracking_trackerPattern_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
 {
        MovieClip *clip= (MovieClip*)ptr->id.data;
        MovieTrackingTrack *track;
@@ -94,7 +94,7 @@ static void rna_tracking_trackerPattern_update(Main *bmain, Scene *scene, Pointe
        }
 }
 
-static void rna_tracking_trackerSearch_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_tracking_trackerSearch_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
 {
        MovieClip *clip= (MovieClip*)ptr->id.data;
        MovieTrackingTrack *track;
@@ -185,7 +185,7 @@ static void rna_tracking_stabTracks_active_index_range(PointerRNA *ptr, int *min
        *max= MAX2(0, *max);
 }
 
-static void rna_tracking_flushUpdate(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_tracking_flushUpdate(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
 {
        MovieClip *clip= (MovieClip*)ptr->id.data;
        MovieTrackingStabilization *stab= &clip->tracking.stabilization;