[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46453] trunk/blender/source/blender/ blenkernel/intern: Camera tracking: fixes for tracking of float images
Sergey Sharybin
sergey.vfx at gmail.com
Wed May 9 10:33:11 CEST 2012
Revision: 46453
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46453
Author: nazgul
Date: 2012-05-09 08:33:11 +0000 (Wed, 09 May 2012)
Log Message:
-----------
Camera tracking: fixes for tracking of float images
- Fixed suddenly disappearing preview image from track widget
- Also suddenly stopping tracking should be fixed now
Both issues were caused by mixing working with floats and bytes and
in some cases it was wrong or missed checks done for this.
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/movieclip.c
trunk/blender/source/blender/blenkernel/intern/tracking.c
Modified: trunk/blender/source/blender/blenkernel/intern/movieclip.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/movieclip.c 2012-05-09 08:33:05 UTC (rev 46452)
+++ trunk/blender/source/blender/blenkernel/intern/movieclip.c 2012-05-09 08:33:11 UTC (rev 46453)
@@ -1040,7 +1040,7 @@
scopes->track_disabled = FALSE;
- if (ibuf && ibuf->rect) {
+ if (ibuf && (ibuf->rect || ibuf->rect_float)) {
ImBuf *tmpibuf;
MovieTrackingMarker undist_marker = *marker;
Modified: trunk/blender/source/blender/blenkernel/intern/tracking.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/tracking.c 2012-05-09 08:33:05 UTC (rev 46452)
+++ trunk/blender/source/blender/blenkernel/intern/tracking.c 2012-05-09 08:33:11 UTC (rev 46453)
@@ -1193,7 +1193,11 @@
x1 = x - (int)(w * (-min[0] / (max[0] - min[0])));
y1 = y - (int)(h * (-min[1] / (max[1] - min[1])));
- tmpibuf = IMB_allocImBuf(w + margin * 2, h + margin * 2, 32, IB_rect);
+ if (ibuf->rect_float)
+ tmpibuf = IMB_allocImBuf(w + margin * 2, h + margin * 2, 32, IB_rectfloat);
+ else
+ tmpibuf = IMB_allocImBuf(w + margin * 2, h + margin * 2, 32, IB_rect);
+
IMB_rectcpy(tmpibuf, ibuf, 0, 0, x1 - margin, y1 - margin, w + margin * 2, h + margin * 2);
if (pos != NULL) {
More information about the Bf-blender-cvs
mailing list