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-02-15 22:11:10 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-02-15 22:11:10 +0400
commit9251d64e2b6bbcdbe051f4c99cdb2e5a2071509a (patch)
tree5ba0843c1d34d0e8dba73b192d5e2191a7a2388c /source/blender
parentbd249c3bffed10a7634ed83fcd5cd07729182689 (diff)
Tomato: fixed incorrect behavior of textures buffer used in MCE together with 2d stabilization.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/space_clip/clip_draw.c7
-rw-r--r--source/blender/editors/space_clip/clip_editor.c3
2 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c
index afc0d84ed9a..43068c38116 100644
--- a/source/blender/editors/space_clip/clip_draw.c
+++ b/source/blender/editors/space_clip/clip_draw.c
@@ -232,9 +232,8 @@ static void draw_movieclip_buffer(SpaceClip *sc, ARegion *ar, ImBuf *ibuf,
ED_space_clip_load_movieclip_buffer(sc, ibuf);
glPushMatrix();
- glTranslatef(x, y, 0);
+ glTranslatef(x, y, 0.0f);
glScalef(zoomx, zoomy, 1.0f);
- glMultMatrixf(sc->stabmat);
glBegin(GL_QUADS);
glTexCoord2f(0.0f, 0.0f); glVertex2f(0.0f, 0.0f);
@@ -268,9 +267,9 @@ static void draw_movieclip_buffer(SpaceClip *sc, ARegion *ar, ImBuf *ibuf,
glLogicOp(GL_NOR);
glPushMatrix();
- glTranslatef(x, y, 0);
+ glTranslatef(x, y, 0.0f);
- glScalef(zoomx, zoomy, 0);
+ glScalef(zoomx, zoomy, 1.0f);
glMultMatrixf(sc->stabmat);
glBegin(GL_LINE_LOOP);
diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c
index 9835a1cf43b..5f042e6a2be 100644
--- a/source/blender/editors/space_clip/clip_editor.c
+++ b/source/blender/editors/space_clip/clip_editor.c
@@ -323,6 +323,7 @@ typedef struct SpaceClipDrawContext {
struct ImBuf *texture_ibuf; /* image buffer for which texture was created */
int image_width, image_height; /* image width and height for which texture was created */
unsigned last_texture; /* ID of previously used texture, so it'll be restored after clip drawing */
+ int framenr;
} SpaceClipDrawContext;
void ED_space_clip_load_movieclip_buffer(SpaceClip *sc, ImBuf *ibuf)
@@ -342,6 +343,7 @@ void ED_space_clip_load_movieclip_buffer(SpaceClip *sc, ImBuf *ibuf)
* assuming displaying happens of footage frames only on which painting doesn't heppen.
* so not changed image buffer pointer means unchanged image content */
need_rebind |= context->texture_ibuf != ibuf;
+ need_rebind |= context->framenr != sc->user.framenr;
if (need_rebind) {
int width = ibuf->x, height = ibuf->y;
@@ -423,6 +425,7 @@ void ED_space_clip_load_movieclip_buffer(SpaceClip *sc, ImBuf *ibuf)
context->texture_ibuf = ibuf;
context->image_width = ibuf->x;
context->image_height = ibuf->y;
+ context->framenr = sc->user.framenr;
if (fscalerect)
MEM_freeN(fscalerect);