diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-01-17 11:31:57 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-01-17 11:31:57 +0300 |
commit | 9d2292ef7e39756d249797a6b972076f096f2750 (patch) | |
tree | b25fc88001a820ca64c2a05edd14bc902042122a /source/blender/blenkernel/intern/mball.c | |
parent | c42e38299434b44ee9fd30c250a615915de58d01 (diff) |
misc maintenance changes
- metaball tessellation functuion was calculating density when it didn't need to.
- image drawing was using a float as a loop counter, in extreme cases this could cause an infinite loop.
- remove/comment unused vars.
Diffstat (limited to 'source/blender/blenkernel/intern/mball.c')
-rw-r--r-- | source/blender/blenkernel/intern/mball.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c index 6e48b922424..a22fc165de7 100644 --- a/source/blender/blenkernel/intern/mball.c +++ b/source/blender/blenkernel/intern/mball.c @@ -1422,7 +1422,7 @@ void find_first_points(PROCESS *mbproc, MetaBall *mb, int a) int i, j, k, c_i, c_j, c_k; int index[3]={1,0,-1}; float f =0.0f; - float in_v, out_v; + float in_v /*, out_v*/; MB_POINT workp; float tmp_v, workp_v, max_len, len, dx, dy, dz, nx, ny, nz, MAXN; @@ -1483,7 +1483,7 @@ void find_first_points(PROCESS *mbproc, MetaBall *mb, int a) calc_mballco(ml, (float *)&out); - out_v = mbproc->function(out.x, out.y, out.z); + /*out_v = mbproc->function(out.x, out.y, out.z);*/ /*UNUSED*/ /* find "first points" on Implicit Surface of MetaElemnt ml */ workp.x = in.x; @@ -1582,8 +1582,8 @@ float init_meta(Scene *scene, Object *ob) /* return totsize */ Object *bob; MetaBall *mb; MetaElem *ml; - float size, totsize, (*mat)[4] = NULL, (*imat)[4] = NULL, obinv[4][4], obmat[4][4], vec[3]; - float temp1[4][4], temp2[4][4], temp3[4][4]; //max=0.0; + float size, totsize, obinv[4][4], obmat[4][4], vec[3]; + //float max=0.0; int a, obnr, zero_size=0; char obname[32]; @@ -1602,7 +1602,6 @@ float init_meta(Scene *scene, Object *ob) /* return totsize */ ml= NULL; if(bob==ob && (base->flag & OB_FROMDUPLI)==0) { - mat= imat= 0; mb= ob->data; if(mb->editelems) ml= mb->editelems->first; @@ -1649,6 +1648,8 @@ float init_meta(Scene *scene, Object *ob) /* return totsize */ while(ml) { if(!(ml->flag & MB_HIDE)) { int i; + float temp1[4][4], temp2[4][4], temp3[4][4]; + float (*mat)[4] = NULL, (*imat)[4] = NULL; float max_x, max_y, max_z, min_x, min_y, min_z; max_x = max_y = max_z = -3.4e38; |