Revision: 41989
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=41989
Author:   nazgul
Date:     2011-11-19 20:14:57 +0000 (Sat, 19 Nov 2011)
Log Message:
-----------
Camera tracking fixes:
- Fixed incorrect memory access on distoritons more than 128 pixels
- Do not use UNDO operators flags for delete proxy operator (files can't be 
restored form disk),
  and also do not use UNDO for set as background operator (background images 
are storing in
  3d viewport which isn't getting re-loaded on undo which can lead to incorrect 
users count
  of movie clip user).

Modified Paths:
--------------
    trunk/blender/extern/libmv/libmv/simple_pipeline/camera_intrinsics.cc
    trunk/blender/release/scripts/startup/bl_operators/clip.py

Modified: trunk/blender/extern/libmv/libmv/simple_pipeline/camera_intrinsics.cc
===================================================================
--- trunk/blender/extern/libmv/libmv/simple_pipeline/camera_intrinsics.cc       
2011-11-19 18:35:42 UTC (rev 41988)
+++ trunk/blender/extern/libmv/libmv/simple_pipeline/camera_intrinsics.cc       
2011-11-19 20:14:57 UTC (rev 41989)
@@ -24,7 +24,7 @@
 namespace libmv {
 
 struct Offset {
-  signed char ix, iy;
+  short ix, iy;
   unsigned char fx,fy;
 };
 
@@ -201,20 +201,14 @@
       warp_y = warp_y*aspy + 0.5 * overscan * h;
       int ix = int(warp_x), iy = int(warp_y);
       int fx = round((warp_x-ix)*256), fy = round((warp_y-iy)*256);
-      if(fx == 256) { fx=0; ix++; }
-      if(fy == 256) { fy=0; iy++; }
       // Use nearest border pixel
       if( ix < 0 ) { ix = 0, fx = 0; }
       if( iy < 0 ) { iy = 0, fy = 0; }
       if( ix >= width-2 ) ix = width-2;
       if( iy >= height-2 ) iy = height-2;
-      if ( ix-x > -128 && ix-x < 128 && iy-y > -128 && iy-y < 128 ) {
-        Offset offset = { ix-x, iy-y, fx, fy };
-        grid->offset[y*width+x] = offset;
-      } else {
-        Offset offset = { 0, 0, 0, 0 };
-        grid->offset[y*width+x] = offset;
-      }
+
+      Offset offset = { ix-x, iy-y, fx, fy };
+      grid->offset[y*width+x] = offset;
     }
   }
 }

Modified: trunk/blender/release/scripts/startup/bl_operators/clip.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_operators/clip.py  2011-11-19 
18:35:42 UTC (rev 41988)
+++ trunk/blender/release/scripts/startup/bl_operators/clip.py  2011-11-19 
20:14:57 UTC (rev 41989)
@@ -116,7 +116,7 @@
 
     bl_idname = "clip.delete_proxy"
     bl_label = "Delete Proxy"
-    bl_options = {'UNDO', 'REGISTER'}
+    bl_options = {'REGISTER'}
 
     @classmethod
     def poll(cls, context):
@@ -191,7 +191,7 @@
 
     bl_idname = "clip.set_viewport_background"
     bl_label = "Set as Background"
-    bl_options = {'UNDO', 'REGISTER'}
+    bl_options = {'REGISTER'}
 
     @classmethod
     def poll(cls, context):

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

Reply via email to