diff options
Diffstat (limited to 'source/blender')
21 files changed, 110 insertions, 106 deletions
diff --git a/source/blender/blenkernel/intern/boids.c b/source/blender/blenkernel/intern/boids.c index d8926fc5753..5c62e434cb6 100644 --- a/source/blender/blenkernel/intern/boids.c +++ b/source/blender/blenkernel/intern/boids.c @@ -76,7 +76,7 @@ static int rule_goal_avoid(BoidRule *rule, BoidBrainData *bbd, BoidValues *val, Object *priority_ob = NULL; float vec[3] = {0.0f, 0.0f, 0.0f}, loc[3] = {0.0f, 0.0f, 0.0f}; float mul = (rule->type == eBoidRuleType_Avoid ? 1.0 : -1.0); - float priority = 0.0f, len; + float priority = 0.0f, len = 0.0f; int ret = 0; /* first find out goal/predator with highest priority */ @@ -614,7 +614,7 @@ static int rule_fight(BoidRule *rule, BoidBrainData *bbd, BoidValues *val, Parti KDTreeNearest *ptn = NULL; ParticleTarget *pt; ParticleData *epars; - ParticleData *enemy_pa; + ParticleData *enemy_pa = NULL; /* friends & enemies */ float closest_enemy[3] = {0.0f,0.0f,0.0f}; float closest_dist = fbr->distance + 1.0f; diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 32f70bc690c..5e2a00c219d 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -2571,6 +2571,7 @@ int object_insert_ptcache(Object *ob) return i; } +#if 0 static int pc_findindex(ListBase *listbase, int index) { LinkData *link= NULL; @@ -2590,11 +2591,10 @@ static int pc_findindex(ListBase *listbase, int index) return -1; } -#if 0 void object_delete_ptcache(Object *ob, int index) { int list_index = pc_findindex(&ob->pc_ids, index); LinkData *link = BLI_findlink(&ob->pc_ids, list_index); BLI_freelinkN(&ob->pc_ids, link); } -#endif
\ No newline at end of file +#endif diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index dcd3fcd2f89..bf642a14a49 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -3238,7 +3238,7 @@ static void deflect_particle(Scene *scene, Object *pob, ParticleSystemModifierDa ParticleCollision col; BVHTreeRayHit hit; float ray_dir[3], zerovec[3]={0.0,0.0,0.0}; - float radius = ((part->flag & PART_SIZE_DEFL)?pa->size:0.0f), boid_z; + float radius = ((part->flag & PART_SIZE_DEFL)?pa->size:0.0f), boid_z = 0.0f; int deflections=0, max_deflections=10; VECCOPY(col.co1, pa->prev_state.co); diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 42bea260450..69da8f19d8c 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -424,8 +424,6 @@ void BKE_ptcache_id_from_softbody(PTCacheID *pid, Object *ob, SoftBody *sb) void BKE_ptcache_id_from_particles(PTCacheID *pid, Object *ob, ParticleSystem *psys) { - ParticleSystemModifierData *psmd= psys_get_modifier(ob, psys); - memset(pid, 0, sizeof(PTCacheID)); pid->ob= ob; @@ -484,7 +482,7 @@ static int ptcache_file_write(PTCacheFile *pf, void *f, size_t tot, int size); static int ptcache_compress_write(PTCacheFile *pf, unsigned char *in, unsigned int in_len, unsigned char *out, int mode) { - int r; + int r = 0; unsigned char compressed; LZO_HEAP_ALLOC(wrkmem, LZO1X_MEM_COMPRESS); unsigned int out_len = LZO_OUT_LEN(in_len); @@ -566,11 +564,12 @@ static int ptcache_write_smoke(PTCacheFile *pf, void *smoke_v) return 0; } +/* static int ptcache_write_smoke_turbulence(PTCacheFile *pf, void *smoke_v) { SmokeModifierData *smd= (SmokeModifierData *)smoke_v; SmokeDomainSettings *sds = smd->domain; - /* + if(sds->wt) { unsigned int res_big[3]; size_t res = sds->res[0]*sds->res[1]*sds->res[2]; @@ -599,16 +598,16 @@ static int ptcache_write_smoke_turbulence(PTCacheFile *pf, void *smoke_v) return 1; } -*/ return 0; } +*/ // forward decleration static int ptcache_file_read(PTCacheFile *pf, void *f, size_t tot, int size); static int ptcache_compress_read(PTCacheFile *pf, unsigned char *result, unsigned int len) { - int r; + int r = 0; unsigned char compressed = 0; unsigned int in_len; unsigned int out_len = len; @@ -673,11 +672,12 @@ static void ptcache_read_smoke(PTCacheFile *pf, void *smoke_v) } } +/* static void ptcache_read_smoke_turbulence(PTCacheFile *pf, void *smoke_v) { SmokeModifierData *smd= (SmokeModifierData *)smoke_v; SmokeDomainSettings *sds = smd->domain; - /* + if(sds->fluid) { unsigned int res[3]; float *dens, *densold, *tcu, *tcv, *tcw; @@ -690,8 +690,8 @@ static void ptcache_read_smoke_turbulence(PTCacheFile *pf, void *smoke_v) ptcache_compress_read(pf, (unsigned char*)dens, out_len); } - */ } +*/ void BKE_ptcache_id_from_smoke(PTCacheID *pid, struct Object *ob, struct SmokeModifierData *smd) { @@ -1162,7 +1162,7 @@ int BKE_ptcache_read_cache(PTCacheID *pid, float cfra, float frs_sec) int cfra1 = 0, cfra2 = 0; int totpoint = 0, totpoint2 = 0; int *index = &i, *index2 = &i; - int use_old = 0, old_frame; + int use_old = 0, old_frame = 0; int ret = 0, error = 0; @@ -2084,7 +2084,7 @@ void BKE_ptcache_make_cache(PTCacheBaker* baker) Base *base; ListBase pidlist; PTCacheID *pid = baker->pid; - PointCache *cache; + PointCache *cache = NULL; float frameleno = scene->r.framelen; int cfrao = CFRA; int startframe = MAXFRAME; diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c index cd9679be486..223d48012df 100644 --- a/source/blender/blenkernel/intern/smoke.c +++ b/source/blender/blenkernel/intern/smoke.c @@ -92,10 +92,10 @@ static void tend ( void ) { QueryPerformanceCounter ( &liCurrentTime ); } -static double tval() -{ - return ((double)( (liCurrentTime.QuadPart - liStartTime.QuadPart)* (double)1000.0/(double)liFrequency.QuadPart )); -} +//static double tval() +//{ +// return ((double)( (liCurrentTime.QuadPart - liStartTime.QuadPart)* (double)1000.0/(double)liFrequency.QuadPart )); +//} #else #include <sys/time.h> static struct timeval _tstart, _tend; @@ -788,9 +788,8 @@ void smokeModifier_do(SmokeModifierData *smd, Scene *scene, Object *ob, DerivedM } else if(smd->type & MOD_SMOKE_TYPE_DOMAIN) { - PointCache *cache, *cache_wt; + PointCache *cache; PTCacheID pid; - PTCacheID pid_wt; float timescale; int cache_result = 0; int startframe, endframe, framenr; @@ -1424,7 +1423,6 @@ void smoke_calc_transparency(float *result, float *p0, float *p1, int res[3], fl { int x, y, z; float bv[6]; - float bigfactor = 1.0; // x bv[0] = p0[0]; diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c index 96e9f54fc0c..61f62b2222d 100644 --- a/source/blender/blenkernel/intern/texture.c +++ b/source/blender/blenkernel/intern/texture.c @@ -750,7 +750,7 @@ void make_local_texture(Tex *tex) void autotexname(Tex *tex) { - char texstr[20][12]= {"None" , "Clouds" , "Wood", "Marble", "Magic" , "Blend", + char texstr[20][15]= {"None" , "Clouds" , "Wood", "Marble", "Magic" , "Blend", "Stucci", "Noise" , "Image", "Plugin", "EnvMap" , "Musgrave", "Voronoi", "DistNoise", "Point Density", "Voxel Data", "", "", "", ""}; Image *ima; diff --git a/source/blender/blenlib/BLI_voxel.h b/source/blender/blenlib/BLI_voxel.h index 091d8e3682d..9b815ccbf42 100644 --- a/source/blender/blenlib/BLI_voxel.h +++ b/source/blender/blenlib/BLI_voxel.h @@ -37,4 +37,4 @@ float voxel_sample_nearest(float *data, int *res, float *co); float voxel_sample_trilinear(float *data, int *res, float *co); float voxel_sample_tricubic(float *data, int *res, float *co); -#endif /* BLI_VOXEL_H */
\ No newline at end of file +#endif /* BLI_VOXEL_H */ diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c index fc67ee34a2e..ced3c117700 100644 --- a/source/blender/editors/animation/keyframes_general.c +++ b/source/blender/editors/animation/keyframes_general.c @@ -127,11 +127,11 @@ void duplicate_fcurve_keys(FCurve *fcu) { BezTriple *newbezt; int i; - - if (fcu == NULL) + + /* this can only work when there is an F-Curve, and also when there are some BezTriples */ + if ELEM(NULL, fcu, fcu->bezt) return; - // XXX this does not take into account sample data... for (i=0; i < fcu->totvert; i++) { /* If a key is selected */ if (fcu->bezt[i].f2 & SELECT) { @@ -160,7 +160,7 @@ void duplicate_fcurve_keys(FCurve *fcu) /* **************************************************** */ /* Various Tools */ -/* Basic IPO-Curve 'cleanup' function that removes 'double points' and unnecessary keyframes on linear-segments only */ +/* Basic F-Curve 'cleanup' function that removes 'double points' and unnecessary keyframes on linear-segments only */ void clean_fcurve(FCurve *fcu, float thresh) { BezTriple *old_bezts, *bezt, *beztn; @@ -285,74 +285,74 @@ void smooth_fcurve (FCurve *fcu) } } - /* if any points were selected, allocate tSmooth_Bezt points to work on */ - if (totSel >= 3) { - tSmooth_Bezt *tarray, *tsb; - - /* allocate memory in one go */ - tsb= tarray= MEM_callocN(totSel*sizeof(tSmooth_Bezt), "tSmooth_Bezt Array"); - - /* populate tarray with data of selected points */ - bezt= fcu->bezt; - for (i=0, x=0; (i < fcu->totvert) && (x < totSel); i++, bezt++) { - if (BEZSELECTED(bezt)) { - /* tsb simply needs pointer to vec, and index */ - tsb->h1 = &bezt->vec[0][1]; - tsb->h2 = &bezt->vec[1][1]; - tsb->h3 = &bezt->vec[2][1]; - - /* advance to the next tsb to populate */ - if (x < totSel- 1) - tsb++; - else - break; - } + /* if any points were selected, allocate tSmooth_Bezt points to work on */ + if (totSel >= 3) { + tSmooth_Bezt *tarray, *tsb; + + /* allocate memory in one go */ + tsb= tarray= MEM_callocN(totSel*sizeof(tSmooth_Bezt), "tSmooth_Bezt Array"); + + /* populate tarray with data of selected points */ + bezt= fcu->bezt; + for (i=0, x=0; (i < fcu->totvert) && (x < totSel); i++, bezt++) { + if (BEZSELECTED(bezt)) { + /* tsb simply needs pointer to vec, and index */ + tsb->h1 = &bezt->vec[0][1]; + tsb->h2 = &bezt->vec[1][1]; + tsb->h3 = &bezt->vec[2][1]; + + /* advance to the next tsb to populate */ + if (x < totSel- 1) + tsb++; + else + break; } + } - /* calculate the new smoothed F-Curve's with weighted averages: - * - this is done with two passes - * - uses 5 points for each operation (which stores in the relevant handles) - * - previous: w/a ratio = 3:5:2:1:1 - * - next: w/a ratio = 1:1:2:5:3 - */ - - /* round 1: calculate previous and next */ - tsb= tarray; - for (i=0; i < totSel; i++, tsb++) { - /* don't touch end points (otherwise, curves slowly explode) */ - if (ELEM(i, 0, (totSel-1)) == 0) { - const tSmooth_Bezt *tP1 = tsb - 1; - const tSmooth_Bezt *tP2 = (i-2 > 0) ? (tsb - 2) : (NULL); - const tSmooth_Bezt *tN1 = tsb + 1; - const tSmooth_Bezt *tN2 = (i+2 < totSel) ? (tsb + 2) : (NULL); - - const float p1 = *tP1->h2; - const float p2 = (tP2) ? (*tP2->h2) : (*tP1->h2); - const float c1 = *tsb->h2; - const float n1 = *tN1->h2; - const float n2 = (tN2) ? (*tN2->h2) : (*tN1->h2); + /* calculate the new smoothed F-Curve's with weighted averages: + * - this is done with two passes + * - uses 5 points for each operation (which stores in the relevant handles) + * - previous: w/a ratio = 3:5:2:1:1 + * - next: w/a ratio = 1:1:2:5:3 + */ + + /* round 1: calculate previous and next */ + tsb= tarray; + for (i=0; i < totSel; i++, tsb++) { + /* don't touch end points (otherwise, curves slowly explode) */ + if (ELEM(i, 0, (totSel-1)) == 0) { + const tSmooth_Bezt *tP1 = tsb - 1; + const tSmooth_Bezt *tP2 = (i-2 > 0) ? (tsb - 2) : (NULL); + const tSmooth_Bezt *tN1 = tsb + 1; + const tSmooth_Bezt *tN2 = (i+2 < totSel) ? (tsb + 2) : (NULL); + + const float p1 = *tP1->h2; + const float p2 = (tP2) ? (*tP2->h2) : (*tP1->h2); + const float c1 = *tsb->h2; + const float n1 = *tN1->h2; + const float n2 = (tN2) ? (*tN2->h2) : (*tN1->h2); + + /* calculate previous and next */ + *tsb->h1= (3*p2 + 5*p1 + 2*c1 + n1 + n2) / 12; + *tsb->h3= (p2 + p1 + 2*c1 + 5*n1 + 3*n2) / 12; + } + } + + /* round 2: calculate new values and reset handles */ + tsb= tarray; + for (i=0; i < totSel; i++, tsb++) { + /* calculate new position by averaging handles */ + *tsb->h2 = (*tsb->h1 + *tsb->h3) / 2; - /* calculate previous and next */ - *tsb->h1= (3*p2 + 5*p1 + 2*c1 + n1 + n2) / 12; - *tsb->h3= (p2 + p1 + 2*c1 + 5*n1 + 3*n2) / 12; + /* reset handles now */ + *tsb->h1 = *tsb->h2; + *tsb->h3 = *tsb->h2; } - } - - /* round 2: calculate new values and reset handles */ - tsb= tarray; - for (i=0; i < totSel; i++, tsb++) { - /* calculate new position by averaging handles */ - *tsb->h2 = (*tsb->h1 + *tsb->h3) / 2; - /* reset handles now */ - *tsb->h1 = *tsb->h2; - *tsb->h3 = *tsb->h2; + /* free memory required for tarray */ + MEM_freeN(tarray); } - /* free memory required for tarray */ - MEM_freeN(tarray); -} - /* recalculate handles */ calchandles_fcurve(fcu); } @@ -371,7 +371,6 @@ ListBase animcopybuf = {NULL, NULL}; static float animcopy_firstframe= 999999999.0f; /* datatype for use in copy/paste buffer */ -// XXX F-Curve editor should use this too typedef struct tAnimCopybufItem { struct tAnimCopybufItem *next, *prev; diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index e83dca5a500..1d911fef418 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -1330,7 +1330,7 @@ static void ui_block_func_MENUSTR(bContext *C, uiLayout *layout, void *arg_str) { uiBlock *block= uiLayoutGetBlock(layout); uiPopupBlockHandle *handle= block->handle; - uiLayout *split, *column; + uiLayout *split, *column=NULL; uiBut *bt; MenuData *md; MenuEntry *entry; diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 4cfc44e56c8..6aa5f5efc41 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -1318,7 +1318,7 @@ ListBase uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, char *pr Panel *pa; ListBase lb, *itemlb; char *name, str[32]; - int icon=0, i= 0, activei= 0, len, items, found, min, max; + int icon=0, i= 0, activei= 0, len= 0, items, found, min, max; lb.first= lb.last= NULL; diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index a55b11afe48..f0085f71373 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -1946,12 +1946,12 @@ static void widget_pulldownbut(uiWidgetColors *wcol, rcti *rect, int state, int { if(state & UI_ACTIVE) { uiWidgetBase wtb; - float rad= 0.5f*(rect->ymax - rect->ymin); + float rad= 0.5f*(rect->ymax - rect->ymin); // 4.0f widget_init(&wtb); /* half rounded */ - round_box_edges(&wtb, 15, rect, 4.0f); + round_box_edges(&wtb, 15, rect, rad); widgetbase_draw(&wtb, wcol); } @@ -2045,12 +2045,12 @@ static void widget_but(uiWidgetColors *wcol, rcti *rect, int state, int roundbox static void widget_roundbut(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign) { uiWidgetBase wtb; - float rad= 0.5f*(rect->ymax - rect->ymin); + float rad= 5.0f; //0.5f*(rect->ymax - rect->ymin); widget_init(&wtb); /* half rounded */ - round_box_edges(&wtb, roundboxalign, rect, 5.0f); + round_box_edges(&wtb, roundboxalign, rect, rad); widgetbase_draw(&wtb, wcol); } diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c index d564573a543..fca5b0cc59a 100644 --- a/source/blender/editors/space_outliner/outliner.c +++ b/source/blender/editors/space_outliner/outliner.c @@ -5274,7 +5274,10 @@ void draw_outliner(const bContext *C) sizex_rna= MAX2(OL_RNA_COLX, sizex_rna+OL_RNA_COL_SPACEX); /* get width of data (for setting 'tot' rect, this is column 1 + column 2 + a bit extra) */ - sizex= sizex_rna + OL_RNA_COL_SIZEX + 50; + if (soops->outlinevis == SO_KEYMAP) + sizex= sizex_rna + OL_RNA_COL_SIZEX*3 + 50; // XXX this is only really a quick hack to make this wide enough... + else + sizex= sizex_rna + OL_RNA_COL_SIZEX + 50; } else { /* width must take into account restriction columns (if visible) so that entries will still be visible */ diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c index 5d58ea431a9..bdedef4b6c8 100644 --- a/source/blender/editors/space_sequencer/sequencer_add.c +++ b/source/blender/editors/space_sequencer/sequencer_add.c @@ -291,7 +291,7 @@ static int sequencer_add_movie_strip_exec(bContext *C, wmOperator *op) struct anim *an; char filename[FILE_MAX]; - Sequence *seq, *soundseq; /* generic strip vars */ + Sequence *seq, *soundseq=NULL; /* generic strip vars */ Strip *strip; StripElem *se; diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index 6773985e07c..eee85f21798 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -1005,9 +1005,10 @@ static uiBlock *view3d_object_mirrormenu(bContext *C, ARegion *ar, void *arg_unu #endif #endif +#if 0 static void view3d_edit_object_transformmenu(bContext *C, uiLayout *layout, void *arg_unused) { -#if 0 +#if 0 // XXX not used anymore uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Apply Scale/Rotation to ObData|Ctrl A, 1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, ""); apply_objects_locrot(); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Apply Visual Transform|Ctrl A, 2", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 7, ""); @@ -1024,6 +1025,7 @@ static void view3d_edit_object_transformmenu(bContext *C, uiLayout *layout, void uiItemO(layout, NULL, 0, "OBJECT_OT_scale_clear"); uiItemO(layout, NULL, 0, "OBJECT_OT_origin_clear"); } +#endif #if 0 static void do_view3d_edit_object_makelocalmenu(bContext *C, void *arg, int event) diff --git a/source/blender/makesdna/DNA_smoke_types.h b/source/blender/makesdna/DNA_smoke_types.h index a8ab4734af0..7c6c7fab9e4 100644 --- a/source/blender/makesdna/DNA_smoke_types.h +++ b/source/blender/makesdna/DNA_smoke_types.h @@ -32,7 +32,7 @@ /* flags */ #define MOD_SMOKE_HIGHRES (1<<1) /* enable high resolution */ #define MOD_SMOKE_DISSOLVE (1<<2) /* let smoke dissolve */ -#define MOD_SMOKE_DISSOLVE_LOG (1<<3) /* using 1/x for dissolve * +#define MOD_SMOKE_DISSOLVE_LOG (1<<3) /* using 1/x for dissolve */ /* noise */ #define MOD_SMOKE_NOISEWAVE (1<<0) diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c index 5ef25edacf7..d7c70d8b9e9 100644 --- a/source/blender/makesrna/intern/rna_smoke.c +++ b/source/blender/makesrna/intern/rna_smoke.c @@ -79,12 +79,14 @@ static void rna_Smoke_reset_dependancy(bContext *C, PointerRNA *ptr) rna_Smoke_dependency_update(C, ptr); } +#if 0 static void rna_Smoke_redraw(bContext *C, PointerRNA *ptr) { SmokeDomainSettings *settings = (SmokeDomainSettings*)ptr->data; - // settings->flags |= MOD_SMOKE_VIEW_REDRAWNICE; + settings->flags |= MOD_SMOKE_VIEW_REDRAWNICE; } +#endif static char *rna_SmokeDomainSettings_path(PointerRNA *ptr) { diff --git a/source/blender/render/intern/include/volume_precache.h b/source/blender/render/intern/include/volume_precache.h index d8a94c2d560..dbd02759a63 100644 --- a/source/blender/render/intern/include/volume_precache.h +++ b/source/blender/render/intern/include/volume_precache.h @@ -31,4 +31,4 @@ void free_volume_precache(Render *re); int point_inside_volume_objectinstance(ObjectInstanceRen *obi, float *co); int using_lightcache(Material *ma); -#define VOL_MS_TIMESTEP 0.1f
\ No newline at end of file +#define VOL_MS_TIMESTEP 0.1f diff --git a/source/blender/render/intern/include/volumetric.h b/source/blender/render/intern/include/volumetric.h index 543e179bc88..026b4840ea3 100644 --- a/source/blender/render/intern/include/volumetric.h +++ b/source/blender/render/intern/include/volumetric.h @@ -44,4 +44,4 @@ void shade_volume_shadow(struct ShadeInput *shi, struct ShadeResult *shr, struct #define VOL_BOUNDS_SS 1 #define VOL_SHADE_OUTSIDE 0 -#define VOL_SHADE_INSIDE 1
\ No newline at end of file +#define VOL_SHADE_INSIDE 1 diff --git a/source/blender/render/intern/source/pointdensity.c b/source/blender/render/intern/source/pointdensity.c index fbc39b61257..5f8cf5504fa 100644 --- a/source/blender/render/intern/source/pointdensity.c +++ b/source/blender/render/intern/source/pointdensity.c @@ -324,7 +324,7 @@ void accum_density(void *userdata, int index, float squared_dist) { PointDensityRangeData *pdr = (PointDensityRangeData *)userdata; const float dist = (pdr->squared_radius - squared_dist) / pdr->squared_radius * 0.5f; - float density; + float density = 0.0f; if (pdr->falloff_type == TEX_PD_FALLOFF_STD) density = dist; diff --git a/source/blender/render/intern/source/volumetric.c b/source/blender/render/intern/source/volumetric.c index 0e2e3913819..13996905437 100644 --- a/source/blender/render/intern/source/volumetric.c +++ b/source/blender/render/intern/source/volumetric.c @@ -685,4 +685,4 @@ void shade_volume_inside(ShadeInput *shi, ShadeResult *shr) volume_trace(shi, shr, VOL_SHADE_INSIDE); shi->mat = mat_backup; -}
\ No newline at end of file +} diff --git a/source/blender/render/intern/source/voxeldata.c b/source/blender/render/intern/source/voxeldata.c index f1f01f873a5..836faeb05b9 100644 --- a/source/blender/render/intern/source/voxeldata.c +++ b/source/blender/render/intern/source/voxeldata.c @@ -162,7 +162,7 @@ void init_frame_smoke(Render *re, VoxelData *vd, Tex *tex) ob= vd->object; /* draw code for smoke */ - if(md = (ModifierData *)modifiers_findByType(ob, eModifierType_Smoke)) + if( (md = (ModifierData *)modifiers_findByType(ob, eModifierType_Smoke)) ) { SmokeModifierData *smd = (SmokeModifierData *)md; |