Revision: 39003
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39003
Author:   nazgul
Date:     2011-08-03 19:05:58 +0000 (Wed, 03 Aug 2011)
Log Message:
-----------
Camera tracking integration
===========================

- Fixed crash when Display->Stable is enabled before
  loading clip.
- Fixed bug with location influence on stabilization data.

Modified Paths:
--------------
    branches/soc-2011-tomato/source/blender/blenkernel/intern/tracking.c
    branches/soc-2011-tomato/source/blender/editors/space_clip/space_clip.c

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/tracking.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/tracking.c        
2011-08-03 18:47:20 UTC (rev 39002)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/tracking.c        
2011-08-03 19:05:58 UTC (rev 39003)
@@ -1308,7 +1308,6 @@
 static void calculate_stabdata(MovieTrackingStabilization *stab, float width, 
float height,
                        float firstmedian[2], float curmedian[2], float loc[2], 
float *scale)
 {
-       mul_v2_fl(loc, stab->locinf);
        *scale= (stab->scale-1.f)*stab->scaleinf+1.f;
 
        loc[0]= (firstmedian[0]-curmedian[0])*width*(*scale);
@@ -1316,8 +1315,11 @@
 
        loc[0]-= (firstmedian[0]*(*scale)-firstmedian[0])*width;
        loc[1]-= (firstmedian[1]*(*scale)-firstmedian[1])*height;
+
+       mul_v2_fl(loc, stab->locinf);
 }
 
+
 static ImBuf* stabilize_acquire_ibuf(ImBuf *cacheibuf, ImBuf *srcibuf, int 
fill)
 {
        int flags;

Modified: 
branches/soc-2011-tomato/source/blender/editors/space_clip/space_clip.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/space_clip/space_clip.c     
2011-08-03 18:47:20 UTC (rev 39002)
+++ branches/soc-2011-tomato/source/blender/editors/space_clip/space_clip.c     
2011-08-03 19:05:58 UTC (rev 39003)
@@ -88,9 +88,12 @@
 {
        SpaceClip *sc= (SpaceClip *)sa->spacedata.first;
        MovieClip *clip= ED_space_clip(sc);
-       MovieTrackingStabilization *stab= &clip->tracking.stabilization;
 
-       stab->ok= 0;
+       if(clip) {
+               MovieTrackingStabilization *stab= &clip->tracking.stabilization;
+
+               stab->ok= 0;
+       }
 }
 
 /* ******************** default callbacks for clip space ***************** */

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

Reply via email to