Merged changes in the trunk up to revision 42116.
[blender.git] / source / blender / editors / uvedit / uvedit_draw.c
index 0f21aa3759cf2507fe0170f497eb25257b7bfe0b..0da3f66fc6fd85d3d4b6b5dfd2581d16c4453cf7 100644 (file)
@@ -219,7 +219,7 @@ static void draw_uvs_stretch(SpaceImage *sima, Scene *scene, EditMesh *em, MTFac
                                                else
                                                        areadiff = 1.0f-(area/uvarea);
                                                
                                                else
                                                        areadiff = 1.0f-(area/uvarea);
                                                
-                                               weight_to_rgb(areadiff, col, col+1, col+2);
+                                               weight_to_rgb(col, areadiff);
                                                glColor3fv(col);
                                                
                                                glBegin(efa->v4?GL_QUADS:GL_TRIANGLES);
                                                glColor3fv(col);
                                                
                                                glBegin(efa->v4?GL_QUADS:GL_TRIANGLES);
@@ -298,19 +298,19 @@ static void draw_uvs_stretch(SpaceImage *sima, Scene *scene, EditMesh *em, MTFac
                                                 * 1.0-powf((1.0-a), 2) */
                                                
                                                a = fabsf(uvang1-ang1)/(float)M_PI;
                                                 * 1.0-powf((1.0-a), 2) */
                                                
                                                a = fabsf(uvang1-ang1)/(float)M_PI;
-                                               weight_to_rgb(1.0f-powf((1.0f-a), 2.0f), col, col+1, col+2);
+                                               weight_to_rgb(col, 1.0f-powf((1.0f-a), 2.0f));
                                                glColor3fv(col);
                                                glVertex2fv(tf->uv[0]);
                                                a = fabsf(uvang2-ang2)/(float)M_PI;
                                                glColor3fv(col);
                                                glVertex2fv(tf->uv[0]);
                                                a = fabsf(uvang2-ang2)/(float)M_PI;
-                                               weight_to_rgb(1.0f-powf((1.0f-a), 2.0f), col, col+1, col+2);
+                                               weight_to_rgb(col, 1.0f-powf((1.0f-a), 2.0f));
                                                glColor3fv(col);
                                                glVertex2fv(tf->uv[1]);
                                                a = fabsf(uvang3-ang3)/(float)M_PI;
                                                glColor3fv(col);
                                                glVertex2fv(tf->uv[1]);
                                                a = fabsf(uvang3-ang3)/(float)M_PI;
-                                               weight_to_rgb(1.0f-powf((1.0f-a), 2.0f), col, col+1, col+2);
+                                               weight_to_rgb(col, 1.0f-powf((1.0f-a), 2.0f));
                                                glColor3fv(col);
                                                glVertex2fv(tf->uv[2]);
                                                a = fabsf(uvang4-ang4)/(float)M_PI;
                                                glColor3fv(col);
                                                glVertex2fv(tf->uv[2]);
                                                a = fabsf(uvang4-ang4)/(float)M_PI;
-                                               weight_to_rgb(1.0f-powf((1.0f-a), 2.0f), col, col+1, col+2);
+                                               weight_to_rgb(col, 1.0f-powf((1.0f-a), 2.0f));
                                                glColor3fv(col);
                                                glVertex2fv(tf->uv[3]);
                                                
                                                glColor3fv(col);
                                                glVertex2fv(tf->uv[3]);
                                                
@@ -353,15 +353,15 @@ static void draw_uvs_stretch(SpaceImage *sima, Scene *scene, EditMesh *em, MTFac
                                                
                                                glBegin(GL_TRIANGLES);
                                                a = fabsf(uvang1-ang1)/(float)M_PI;
                                                
                                                glBegin(GL_TRIANGLES);
                                                a = fabsf(uvang1-ang1)/(float)M_PI;
-                                               weight_to_rgb(1.0f-powf((1.0f-a), 2.0f), col, col+1, col+2);
+                                               weight_to_rgb(col, 1.0f-powf((1.0f-a), 2.0f));
                                                glColor3fv(col);
                                                glVertex2fv(tf->uv[0]);
                                                a = fabsf(uvang2-ang2)/(float)M_PI;
                                                glColor3fv(col);
                                                glVertex2fv(tf->uv[0]);
                                                a = fabsf(uvang2-ang2)/(float)M_PI;
-                                               weight_to_rgb(1.0f-powf((1.0f-a), 2.0f), col, col+1, col+2);
+                                               weight_to_rgb(col, 1.0f-powf((1.0f-a), 2.0f));
                                                glColor3fv(col);
                                                glVertex2fv(tf->uv[1]);
                                                a = fabsf(uvang3-ang3)/(float)M_PI;
                                                glColor3fv(col);
                                                glVertex2fv(tf->uv[1]);
                                                a = fabsf(uvang3-ang3)/(float)M_PI;
-                                               weight_to_rgb(1.0f-powf((1.0f-a), 2.0f), col, col+1, col+2);
+                                               weight_to_rgb(col, 1.0f-powf((1.0f-a), 2.0f));
                                                glColor3fv(col);
                                                glVertex2fv(tf->uv[2]);
                                        }
                                                glColor3fv(col);
                                                glVertex2fv(tf->uv[2]);
                                        }