[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56993] trunk/blender/source/blender: fix own error in r56649, caused normal calculation to fail, reported as [ #35448], also quiet float/double warning.
Campbell Barton
ideasman42 at gmail.com
Fri May 24 08:50:16 CEST 2013
Revision: 56993
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56993
Author: campbellbarton
Date: 2013-05-24 06:50:15 +0000 (Fri, 24 May 2013)
Log Message:
-----------
fix own error in r56649, caused normal calculation to fail, reported as [#35448], also quiet float/double warning.
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56649
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/mesh.c
trunk/blender/source/blender/editors/sculpt_paint/paint_image_proj.c
Modified: trunk/blender/source/blender/blenkernel/intern/mesh.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/mesh.c 2013-05-24 01:04:37 UTC (rev 56992)
+++ trunk/blender/source/blender/blenkernel/intern/mesh.c 2013-05-24 06:50:15 UTC (rev 56993)
@@ -1951,9 +1951,9 @@
/* Polygon Normal and edge-vector */
/* inline version of #BKE_mesh_calc_poly_normal, also does edge-vectors */
{
- float const *v_prev = mvert[ml[nverts - 1].v].co;
- float const *v_curr;
int i_prev = nverts - 1;
+ float const *v_prev = mvert[ml[i_prev].v].co;
+ float const *v_curr;
zero_v3(polyno);
/* Newell's Method */
@@ -1979,14 +1979,13 @@
for (i = 0; i < nverts; i++) {
const float *cur_edge = edgevecbuf[i];
- unsigned int vindex = ml[i].v;
/* calculate angle between the two poly edges incident on
* this vertex */
const float fac = saacos(-dot_v3v3(cur_edge, prev_edge));
/* accumulate */
- madd_v3_v3fl(tnorms[vindex], polyno, fac);
+ madd_v3_v3fl(tnorms[ml[i].v], polyno, fac);
prev_edge = cur_edge;
}
}
Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_image_proj.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/paint_image_proj.c 2013-05-24 01:04:37 UTC (rev 56992)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_image_proj.c 2013-05-24 06:50:15 UTC (rev 56993)
@@ -3844,7 +3844,7 @@
if (ps->is_maskbrush) {
float texmask = BKE_brush_sample_masktex(ps->scene, ps->brush, projPixel->projCoSS, thread_index, pool);
- CLAMP(texmask, 0.0, 1.0);
+ CLAMP(texmask, 0.0f, 1.0f);
mask = mask_accum + (brush_alpha * texmask * 65535.0f - mask_accum) * mask;
}
else {
@@ -3865,7 +3865,7 @@
mask *= brush_alpha;
if (ps->is_maskbrush) {
float texmask = BKE_brush_sample_masktex(ps->scene, ps->brush, projPixel->projCoSS, thread_index, pool);
- CLAMP(texmask, 0.0, 1.0);
+ CLAMP(texmask, 0.0f, 1.0f);
mask *= texmask;
}
}
More information about the Bf-blender-cvs
mailing list