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:
authorCampbell Barton <ideasman42@gmail.com>2008-03-09 10:35:12 +0300
committerCampbell Barton <ideasman42@gmail.com>2008-03-09 10:35:12 +0300
commitd9da14d8a72aa99ea09d979de154798d30e653cb (patch)
tree389478476e3437c91c18efbd035f4d8cbaf1d9c6 /source/blender/src/drawimage.c
parenta339bca9a137eb3fc7cea546094dbc88e7bce06d (diff)
fix for uninitialized variables in uv stretch drawing,
[#8428] 'Editmesh_active' theme colour not accessible via Python bugfix problem where saving a theme would raise and error when ~/.blender didnt exist. bugfix for file selector staying open (introduced with own undo resistant scripts)
Diffstat (limited to 'source/blender/src/drawimage.c')
-rw-r--r--source/blender/src/drawimage.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/source/blender/src/drawimage.c b/source/blender/src/drawimage.c
index bd293663bde..c68f81a8675 100644
--- a/source/blender/src/drawimage.c
+++ b/source/blender/src/drawimage.c
@@ -583,8 +583,8 @@ void draw_uvs_sima(void)
switch (G.sima->dt_uvstretch) {
case SI_UVDT_STRETCH_AREA:
{
- float totarea, totuvarea, areadiff, uvarea, area, col[3];
- int uvarea_error = 0;
+ float totarea=0.0f, totuvarea=0.0f, areadiff, uvarea, area, col[3];
+
for (efa= em->faces.first; efa; efa= efa->next) {
tface= CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
@@ -601,16 +601,18 @@ void draw_uvs_sima(void)
}
if (totarea==0.0 || totarea==0.0) {
- col[0] - 1.0;
+ col[0] = 1.0;
col[1] = col[2] = 0.0;
glColor3fv(col);
for (efa= em->faces.first; efa; efa= efa->next) {
- glBegin(efa->v4?GL_QUADS:GL_TRIANGLES);
- glVertex2fv(tface->uv[0]);
- glVertex2fv(tface->uv[1]);
- glVertex2fv(tface->uv[2]);
- if(efa->v4) glVertex2fv(tface->uv[3]);
- glEnd();
+ if ((tface=(MTFace *)efa->tmp.p)) {
+ glBegin(efa->v4?GL_QUADS:GL_TRIANGLES);
+ glVertex2fv(tface->uv[0]);
+ glVertex2fv(tface->uv[1]);
+ glVertex2fv(tface->uv[2]);
+ if(efa->v4) glVertex2fv(tface->uv[3]);
+ glEnd();
+ }
}
}
@@ -652,7 +654,6 @@ void draw_uvs_sima(void)
if (simaFaceDraw_Check(efa, tface)) {
efa->tmp.p = tface;
-
if (efa->v4) {
uvang1 = VecAngle3_2D(tface->uv[3], tface->uv[0], tface->uv[1]);
ang1 = VecAngle3(efa->v4->co, efa->v1->co, efa->v2->co);