[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [44134] branches/soc-2011-tomato/source/ blender/editors/space_clip: Tomato: fixed incorrect behavior of textures buffer used in MCE together with 2d stabilization .

Sergey Sharybin sergey.vfx at gmail.com
Wed Feb 15 19:11:10 CET 2012


Revision: 44134
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44134
Author:   nazgul
Date:     2012-02-15 18:11:10 +0000 (Wed, 15 Feb 2012)
Log Message:
-----------
Tomato: fixed incorrect behavior of textures buffer used in MCE together with 2d stabilization.

Modified Paths:
--------------
    branches/soc-2011-tomato/source/blender/editors/space_clip/clip_draw.c
    branches/soc-2011-tomato/source/blender/editors/space_clip/clip_editor.c

Modified: branches/soc-2011-tomato/source/blender/editors/space_clip/clip_draw.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/space_clip/clip_draw.c	2012-02-15 17:41:48 UTC (rev 44133)
+++ branches/soc-2011-tomato/source/blender/editors/space_clip/clip_draw.c	2012-02-15 18:11:10 UTC (rev 44134)
@@ -232,9 +232,8 @@
 				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 @@
 		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);

Modified: branches/soc-2011-tomato/source/blender/editors/space_clip/clip_editor.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/space_clip/clip_editor.c	2012-02-15 17:41:48 UTC (rev 44133)
+++ branches/soc-2011-tomato/source/blender/editors/space_clip/clip_editor.c	2012-02-15 18:11:10 UTC (rev 44134)
@@ -323,6 +323,7 @@
 	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 @@
 	 * 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 @@
 		context->texture_ibuf = ibuf;
 		context->image_width = ibuf->x;
 		context->image_height = ibuf->y;
+		context->framenr = sc->user.framenr;
 
 		if (fscalerect)
 			MEM_freeN(fscalerect);




More information about the Bf-blender-cvs mailing list