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
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-04-07 20:59:06 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-04-07 20:59:06 +0400
commitfec5221a65e9fe762f9bcbd2fd46317dc647a4ad (patch)
treed23b01a22b99a0265c20e9d24ad963cc7acec268 /source/blender/editors/space_clip
parent7018345beecf0163ccae9077c150e7b74610a852 (diff)
Disabling color channels for float images in clip editor now works fine.
Diffstat (limited to 'source/blender/editors/space_clip')
-rw-r--r--source/blender/editors/space_clip/clip_draw.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c
index 019b23c231b..bf8976035a8 100644
--- a/source/blender/editors/space_clip/clip_draw.c
+++ b/source/blender/editors/space_clip/clip_draw.c
@@ -216,6 +216,13 @@ static void draw_movieclip_notes(SpaceClip *sc, ARegion *ar)
ED_region_info_draw(ar, str, block, 0.6f);
}
+static void verify_buffer_float(ImBuf *ibuf)
+{
+ if (ibuf->rect_float && (ibuf->rect == NULL || (ibuf->userflags & IB_RECT_INVALID))) {
+ IMB_rect_from_float(ibuf);
+ }
+}
+
static void draw_movieclip_buffer(SpaceClip *sc, ARegion *ar, ImBuf *ibuf,
int width, int height, float zoomx, float zoomy)
{
@@ -233,9 +240,7 @@ static void draw_movieclip_buffer(SpaceClip *sc, ARegion *ar, ImBuf *ibuf,
glRectf(x, y, x + zoomx * width, y + zoomy * height);
}
else {
- if (ibuf->rect_float && !ibuf->rect) {
- IMB_rect_from_float(ibuf);
- }
+ verify_buffer_float(ibuf);
if (ibuf->rect)
glaDrawPixelsSafe(x, y, ibuf->x, ibuf->y, ibuf->x, GL_RGBA, GL_UNSIGNED_BYTE, ibuf->rect);