[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [39574] branches/soc-2011-onion/source/ blender/editors/sculpt_paint/paint_image.c: weight export in uv space
Antony Riakiotakis
kalast at gmail.com
Sat Aug 20 23:17:58 CEST 2011
Revision: 39574
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39574
Author: psy-fi
Date: 2011-08-20 21:17:58 +0000 (Sat, 20 Aug 2011)
Log Message:
-----------
weight export in uv space
==========================
-fix: the tool exported in {0.0, 1.0} range while viewport in openGL is {-1.0, 1.0}. Result: only one quarter of the image was used by the exporter
Did I tell you that screencasts do expose bugs?
Modified Paths:
--------------
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_image.c
Modified: branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_image.c
===================================================================
--- branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_image.c 2011-08-20 20:19:58 UTC (rev 39573)
+++ branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_image.c 2011-08-20 21:17:58 UTC (rev 39574)
@@ -5790,15 +5790,15 @@
glBegin(GL_TRIANGLES);
}
glColor4f(col1,col1,col1, col1);
- glVertex2fv(tface->uv[0]);
+ glVertex2f(2.0*tface->uv[0][0] - 1.0, 2.0*tface->uv[0][1] - 1.0);
glColor4f(col2,col2,col2,col2);
- glVertex2fv(tface->uv[1]);
+ glVertex2f(2.0*tface->uv[1][0] - 1.0, 2.0*tface->uv[1][1] - 1.0);
glColor4f(col3,col3,col3,col3);
- glVertex2fv(tface->uv[2]);
+ glVertex2f(2.0*tface->uv[2][0] - 1.0, 2.0*tface->uv[2][1] - 1.0);
if(mface->v4){
float col4 = defvert_find_weight(dw+mface->v4, defnum);
glColor4f(col4,col4,col4,col4);
- glVertex2fv(tface->uv[3]);
+ glVertex2f(2.0*tface->uv[3][0] - 1.0, 2.0*tface->uv[3][1] - 1.0);
}
glEnd();
}
More information about the Bf-blender-cvs
mailing list