diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-01-08 15:43:44 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-01-08 15:43:44 +0300 |
commit | 3b74074aec8ad551f210fda9ed13cf654d98876f (patch) | |
tree | eec1e688ae024187c2d999126da5cdd61fc1b875 /source/blender/blenkernel | |
parent | 988e5371fac894a6b35e561fc43e5e9ea6bc3c40 (diff) |
remove unused code & variables.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/DerivedMesh.c | 11 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/cloth.c | 7 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/colortools.c | 12 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/font.c | 5 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/modifier.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/particle_system.c | 3 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/seqeffects.c | 7 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/subsurf_ccg.c | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/text.c | 4 |
9 files changed, 20 insertions, 34 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index aeb1f525943..cdf2991f532 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -2602,15 +2602,8 @@ void DM_add_tangent_layer(DerivedMesh *dm) /* write tangent to layer */ for(i=0, tf=mtface, mf=mface; i < totface; mf++, tf++, i++, tangent+=4) { len= (mf->v4)? 4 : 3; - - if(mtface) { - uv1= tf->uv[0]; - uv2= tf->uv[1]; - uv3= tf->uv[2]; - uv4= tf->uv[3]; - } - else { - uv1= uv[0]; uv2= uv[1]; uv3= uv[2]; uv4= uv[3]; + + if(mtface == NULL) { map_to_sphere( &uv[0][0], &uv[0][1],orco[mf->v1][0], orco[mf->v1][1], orco[mf->v1][2]); map_to_sphere( &uv[1][0], &uv[1][1],orco[mf->v2][0], orco[mf->v2][1], orco[mf->v2][2]); map_to_sphere( &uv[2][0], &uv[2][1],orco[mf->v3][0], orco[mf->v3][1], orco[mf->v3][2]); diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 8cc3a3fc07a..cc54468a1de 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -431,7 +431,7 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd, Scene *scene, Object *ob, PointCache *cache; PTCacheID pid; float timescale; - int framedelta, framenr, startframe, endframe; + int framenr, startframe, endframe; int cache_result; clmd->scene= scene; /* nice to pass on later :) */ @@ -487,11 +487,6 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd, Scene *scene, Object *ob, framenr= endframe; } - if(cache->flag & PTCACHE_SIMULATION_VALID) - framedelta= framenr - cache->simframe; - else - framedelta= -1; - /* initialize simulation data if it didn't exist already */ if(!do_init_cloth(ob, clmd, dm, framenr)) return result; diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c index 1bfefef4b71..7cf6b21e2f1 100644 --- a/source/blender/blenkernel/intern/colortools.c +++ b/source/blender/blenkernel/intern/colortools.c @@ -1012,6 +1012,9 @@ void scopes_update(Scopes *scopes, ImBuf *ibuf, int use_color_management) int savedlines, saveline; float rgb[3], ycc[3], luma; int ycc_mode=-1; + const short is_float = (ibuf->rect_float != NULL); + + if (ibuf->rect==NULL && ibuf->rect_float==NULL) return; if (scopes->ok == 1 ) return; @@ -1019,6 +1022,7 @@ void scopes_update(Scopes *scopes, ImBuf *ibuf, int use_color_management) /* hmmmm */ if (!(ELEM(ibuf->channels, 3, 4))) return; + scopes->hist.channels = 3; scopes->hist.x_resolution = 256; @@ -1073,9 +1077,9 @@ void scopes_update(Scopes *scopes, ImBuf *ibuf, int use_color_management) scopes->waveform_3= MEM_callocN(scopes->waveform_tot * 2 * sizeof(float), "waveform point channel 3"); scopes->vecscope= MEM_callocN(scopes->waveform_tot * 2 * sizeof(float), "vectorscope point channel"); - if (ibuf->rect_float) + if (is_float) rf = ibuf->rect_float; - else if (ibuf->rect) + else rc = (unsigned char *)ibuf->rect; for (y = 0; y < ibuf->y; y++) { @@ -1084,13 +1088,13 @@ void scopes_update(Scopes *scopes, ImBuf *ibuf, int use_color_management) } else saveline=0; for (x = 0; x < ibuf->x; x++) { - if (ibuf->rect_float) { + if (is_float) { if (use_color_management) linearrgb_to_srgb_v3_v3(rgb, rf); else copy_v3_v3(rgb, rf); } - else if (ibuf->rect) { + else { for (c=0; c<3; c++) rgb[c] = rc[c] * INV_255; } diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c index 9a9d67a01f8..ecaa15c8f7d 100644 --- a/source/blender/blenkernel/intern/font.c +++ b/source/blender/blenkernel/intern/font.c @@ -859,12 +859,15 @@ struct chartrans *BKE_text_to_curve(Scene *scene, Object *ob, int mode) yof= cu->yof + tb->y/cu->fsize; } + /* XXX, has been unused for years, need to check if this is useful, r4613 r5282 - campbell */ +#if 0 if(ascii == '\n' || ascii == '\r') xof = cu->xof; else xof= cu->xof + (tb->x/cu->fsize); - +#else xof= cu->xof + (tb->x/cu->fsize); +#endif lnr++; cnr= 0; wsnr= 0; diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index cc3d6a96092..03091b9b0a4 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -149,14 +149,14 @@ ModifierData *modifiers_findByName(Object *ob, const char *name) void modifiers_clearErrors(Object *ob) { ModifierData *md = ob->modifiers.first; - int qRedraw = 0; + /* int qRedraw = 0; */ for (; md; md=md->next) { if (md->error) { MEM_freeN(md->error); md->error = NULL; - qRedraw = 1; + /* qRedraw = 1; */ } } } diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 45016e2db73..3534a7dba37 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -3488,7 +3488,7 @@ static void cached_step(ParticleSimulationData *sim, float cfra) ParticleSystem *psys = sim->psys; ParticleSettings *part = psys->part; PARTICLE_P; - float disp, birthtime, dietime; + float disp, dietime; BLI_srandom(psys->seed); @@ -3503,7 +3503,6 @@ static void cached_step(ParticleSimulationData *sim, float cfra) psys->lattice= psys_get_lattice(sim); - birthtime = pa->time; dietime = pa->dietime; /* update alive status and push events */ diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c index 2d31cf7ba46..2f90da2296b 100644 --- a/source/blender/blenkernel/intern/seqeffects.c +++ b/source/blender/blenkernel/intern/seqeffects.c @@ -1592,15 +1592,10 @@ static void precalc_wipe_zone(WipeZone *wipezone, WipeVars *wipe, int xo, int yo // This function calculates the blur band for the wipe effects static float in_band(WipeZone *wipezone,float width,float dist,float perc,int side,int dir) { - float t1,t2,alpha,percwidth; + float t1,t2,alpha; if(width == 0) return (float)side; - - if(side == 1) - percwidth = width * perc; - else - percwidth = width * (1 - perc); if(width < dist) return side; diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index 40fe71ded23..e139820be32 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -1373,7 +1373,6 @@ static void ccgDM_drawMappedFacesGLSL(DerivedMesh *dm, int (*setMaterial)(int, v ccgdm_pbvh_update(ccgdm); doDraw = 0; - numVerts = 0; matnr = -1; transp = GPU_get_material_blend_mode(); orig_transp = transp; diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index 5ae35aaa266..0b5347ca304 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -1233,7 +1233,7 @@ int txt_find_string(Text *text, char *findstr, int wrap) { TextLine *tl, *startl; char *s= NULL; - int oldcl, oldsl, oldcc, oldsc; + int oldcl, oldsl; if (!text || !text->curl || !text->sell) return 0; @@ -1242,8 +1242,6 @@ int txt_find_string(Text *text, char *findstr, int wrap) oldcl= txt_get_span(text->lines.first, text->curl); oldsl= txt_get_span(text->lines.first, text->sell); tl= startl= text->sell; - oldcc= text->curc; - oldsc= text->selc; s= strstr(&tl->line[text->selc], findstr); while (!s) { |