Revision: 41395
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=41395
Author:   nazgul
Date:     2011-10-30 23:35:01 +0000 (Sun, 30 Oct 2011)
Log Message:
-----------
Camera tracking integration
===========================

- Hopefully last fix for sensor-related compilation error.
- Set SAD correlation and KLT pyramid level for tracks created
  on previous version of Blender.
- Do not flip current frame number when it's getting to close to
  right boundary of clip editor.

Modified Paths:
--------------
    branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c
    branches/soc-2011-tomato/source/blender/editors/space_clip/clip_draw.c
    branches/soc-2011-tomato/source/blender/editors/space_view3d/view3d_intern.h

Modified: branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c        
2011-10-30 23:01:24 UTC (rev 41394)
+++ branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c        
2011-10-30 23:35:01 UTC (rev 41395)
@@ -130,6 +130,7 @@
 #include "BKE_screen.h"
 #include "BKE_sequencer.h"
 #include "BKE_texture.h" // for open_plugin_tex
+#include "BKE_tracking.h"
 #include "BKE_utildefines.h" // SWITCH_INT DATA ENDB DNA1 O_BINARY GLOB USER 
TEST REND
 #include "BKE_sound.h"
 
@@ -12368,6 +12369,8 @@
                        }
 
                        for (clip= main->movieclip.first; clip; clip= 
clip->id.next) {
+                               MovieTrackingTrack *track;
+
                                if(clip->aspx<1.0f) {
                                        clip->aspx= 1.0f;
                                        clip->aspy= 1.0f;
@@ -12383,6 +12386,17 @@
 
                                if(clip->tracking.camera.pixel_aspect<0.01f)
                                        clip->tracking.camera.pixel_aspect= 1.f;
+
+                               track= clip->tracking.tracks.first;
+                               while(track) {
+                                       if(track->pyramid_levels==0)
+                                               track->pyramid_levels= 2;
+
+                                       if(track->minimum_correlation==0.0f)
+                                               track->minimum_correlation= 
0.75f;
+
+                                       track= track->next;
+                               }
                        }
                }
        }

Modified: branches/soc-2011-tomato/source/blender/editors/space_clip/clip_draw.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/space_clip/clip_draw.c      
2011-10-30 23:01:24 UTC (rev 41394)
+++ branches/soc-2011-tomato/source/blender/editors/space_clip/clip_draw.c      
2011-10-30 23:35:01 UTC (rev 41395)
@@ -175,19 +175,11 @@
        fontsize= BLF_height(fontid, str);
        fontwidth= BLF_width(fontid, str);
 
-       if(x+fontwidth+6.0f<=ar->winx) {
-               glRecti(x, 8, x+fontwidth+6, 12+fontsize);
+       glRecti(x, 8, x+fontwidth+6, 12+fontsize);
 
-               UI_ThemeColor(TH_TEXT);
-               BLF_position(fontid, x+2.0f, 10.0f, 0.0f);
-               BLF_draw(fontid, str, strlen(str));
-       } else {
-               glRecti(x+framelen, 8.0f, x+framelen-fontwidth-6.0f, 
12.0f+fontsize);
-
-               UI_ThemeColor(TH_TEXT);
-               BLF_position(fontid, x-2.0f-fontwidth+framelen, 10.0f, 0.0f);
-               BLF_draw(fontid, str, strlen(str));
-       }
+       UI_ThemeColor(TH_TEXT);
+       BLF_position(fontid, x+2.0f, 10.0f, 0.0f);
+       BLF_draw(fontid, str, strlen(str));
 }
 
 static void draw_movieclip_notes(SpaceClip *sc, ARegion *ar)

Modified: 
branches/soc-2011-tomato/source/blender/editors/space_view3d/view3d_intern.h
===================================================================
--- 
branches/soc-2011-tomato/source/blender/editors/space_view3d/view3d_intern.h    
    2011-10-30 23:01:24 UTC (rev 41394)
+++ 
branches/soc-2011-tomato/source/blender/editors/space_view3d/view3d_intern.h    
    2011-10-30 23:35:01 UTC (rev 41395)
@@ -136,7 +136,7 @@
 void view3d_clr_clipping(void);
 void view3d_set_clipping(RegionView3D *rv3d);
 void add_view3d_after(ListBase *lb, Base *base, int flag);
-void view3d_viewborder_size_get(struct Scene *scene, struct Objecy *camob, 
struct ARegion *ar, float size_r[2]);
+void view3d_viewborder_size_get(struct Scene *scene, struct Object *camob, 
struct ARegion *ar, float size_r[2]);
 
 void circf(float x, float y, float rad);
 void circ(float x, float y, float rad);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to