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:
authorJoseph Eagar <joeedh@gmail.com>2011-04-15 05:19:13 +0400
committerJoseph Eagar <joeedh@gmail.com>2011-04-15 05:19:13 +0400
commitc98148a963d37fc2f25e125afeb4cf21df6fbf14 (patch)
tree691a051e27f08e35bf09d35b6fb9c88e4c37b8d2 /source/blender/editors/sculpt_paint/paint_utils.c
parent0bba684d08952d0be822f3906ffb2a03b2674cc2 (diff)
parentfa63c297753636c149fbb1a3877d9b3d93601357 (diff)
=bmesh= merge from trunk at r36153
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_utils.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_utils.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c
index 9090093bd7c..1a672355e0e 100644
--- a/source/blender/editors/sculpt_paint/paint_utils.c
+++ b/source/blender/editors/sculpt_paint/paint_utils.c
@@ -1,3 +1,6 @@
+/** \file blender/editors/sculpt_paint/paint_utils.c
+ * \ingroup edsculpt
+ */
#include <math.h>
#include <stdlib.h>
@@ -81,7 +84,7 @@ float paint_get_tex_pixel(Brush* br, float u, float v)
hasrgb = multitex_ext(br->mtex.tex, co, NULL, NULL, 0, &texres);
if (hasrgb & TEX_RGB)
- texres.tin = (0.35*texres.tr + 0.45*texres.tg + 0.2*texres.tb)*texres.ta;
+ texres.tin = (0.35f*texres.tr + 0.45f*texres.tg + 0.2f*texres.tb)*texres.ta;
return texres.tin;
}
@@ -144,7 +147,7 @@ static void imapaint_tri_weights(Object *ob, float *v1, float *v2, float *v3, fl
void imapaint_pick_uv(Scene *scene, Object *ob, unsigned int faceindex, int *xy, float *uv)
{
DerivedMesh *dm = mesh_get_derived_final(scene, ob, CD_MASK_BAREMESH);
- int *index = dm->getTessFaceDataArray(dm, CD_ORIGINDEX);
+ const int *index = dm->getTessFaceDataArray(dm, CD_ORIGINDEX);
MTFace *tface = dm->getTessFaceDataArray(dm, CD_MTFACE), *tf;
int numfaces = dm->getNumTessFaces(dm), a, findex;
float p[2], w[3], absw, minabsw;
@@ -156,7 +159,7 @@ void imapaint_pick_uv(Scene *scene, Object *ob, unsigned int faceindex, int *xy,
/* test all faces in the derivedmesh with the original index of the picked face */
for(a = 0; a < numfaces; a++) {
- findex= (index)? index[a]: a;
+ findex= index ? index[a]: a;
if(findex == faceindex) {
dm->getTessFace(dm, a, &mf);