Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-05-09 12:33:11 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-05-09 12:33:11 +0400
commitf4705b38f9c0006e38029eeef7966c9d052b5e91 (patch)
tree6380e80ab19f8653a2c1f9ab3b1da144af38ae29 /source
parent91227ff6d0d49b67f4b332deeb29052502280981 (diff)
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.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/movieclip.c2
-rw-r--r--source/blender/blenkernel/intern/tracking.c6
2 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c
index cf63fb267e8..f07de7f0127 100644
--- a/source/blender/blenkernel/intern/movieclip.c
+++ b/source/blender/blenkernel/intern/movieclip.c
@@ -1040,7 +1040,7 @@ void BKE_movieclip_update_scopes(MovieClip *clip, MovieClipUser *user, MovieClip
scopes->track_disabled = FALSE;
- if (ibuf && ibuf->rect) {
+ if (ibuf && (ibuf->rect || ibuf->rect_float)) {
ImBuf *tmpibuf;
MovieTrackingMarker undist_marker = *marker;
diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c
index b27a065730b..f1100a1ae08 100644
--- a/source/blender/blenkernel/intern/tracking.c
+++ b/source/blender/blenkernel/intern/tracking.c
@@ -1193,7 +1193,11 @@ static ImBuf *get_area_imbuf(ImBuf *ibuf, MovieTrackingTrack *track, MovieTracki
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) {