From be5ef51b731655b5c0473ea5601d7a6b5e6b8e3f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 8 Nov 2011 09:02:47 +0000 Subject: use some more logical BLI math functions & tracking used INT_MAX on a short. --- source/blender/blenkernel/intern/particle_system.c | 2 +- source/blender/editors/armature/reeb.c | 2 +- source/blender/editors/space_view3d/drawobject.c | 2 +- source/blender/editors/space_view3d/view3d_snap.c | 2 +- source/blender/makesrna/intern/rna_tracking.c | 2 +- source/blender/render/intern/source/occlusion.c | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) (limited to 'source') diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 3e88fb7d65e..cb12230615e 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -3176,7 +3176,7 @@ static int collision_response(ParticleData *pa, ParticleCollision *col, BVHTreeR mul_v3_fl(v1_tan, 1.0f - 0.01f * frict); /* surface_velocity is opposite to cm velocity */ - mul_v3_v3fl(vr_tan, v1_tan, -1.0f); + negate_v3_v3(vr_tan, v1_tan); /* get back to global coordinates */ add_v3_v3(v1_tan, vc_tan); diff --git a/source/blender/editors/armature/reeb.c b/source/blender/editors/armature/reeb.c index 0b214e48b6a..ce4092b2b84 100644 --- a/source/blender/editors/armature/reeb.c +++ b/source/blender/editors/armature/reeb.c @@ -3684,7 +3684,7 @@ void REEB_draw() if (G.scene->toolsettings->skgen_options & SKGEN_DISP_INDEX) { - interp_v3_v3v3(vec, arc->head->p, arc->tail->p, 0.5f); + mid_v3_v3v3(vec, arc->head->p, arc->tail->p); s += sprintf(s, "%i (%i-%i-%i) ", i, arc->symmetry_level, arc->symmetry_flag, arc->symmetry_group); if (G.scene->toolsettings->skgen_options & SKGEN_DISP_WEIGHT) diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 4809e463d75..f2bd4b51d94 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -2561,7 +2561,7 @@ static void draw_em_measure_stats(View3D *v3d, RegionView3D *rv3d, Object *ob, E copy_v3_v3(v1, eed->v1->co); copy_v3_v3(v2, eed->v2->co); - interp_v3_v3v3(vmid, v1, v2, 0.5f); + mid_v3_v3v3(vmid, v1, v2); if(do_global) { mul_mat3_m4_v3(ob->obmat, v1); diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c index 012e08f98cb..7cd9c07c00c 100644 --- a/source/blender/editors/space_view3d/view3d_snap.c +++ b/source/blender/editors/space_view3d/view3d_snap.c @@ -781,7 +781,7 @@ static void bundle_midpoint(Scene *scene, Object *ob, float vec[3]) } if(ok) { - interp_v3_v3v3(vec, min, max, 0.5); + mid_v3_v3v3(vec, min, max); } } diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c index 15ded001237..f8bdeef379f 100644 --- a/source/blender/makesrna/intern/rna_tracking.c +++ b/source/blender/makesrna/intern/rna_tracking.c @@ -242,7 +242,7 @@ static void rna_def_trackingSettings(BlenderRNA *brna) prop= RNA_def_property(srna, "frames_limit", PROP_INT, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_int_sdna(prop, NULL, "frames_limit"); - RNA_def_property_range(prop, 0, INT_MAX); + RNA_def_property_range(prop, 0, SHRT_MAX); RNA_def_property_ui_text(prop, "Frames Limit", "Amount of frames to be tracked during single tracking operation"); /* adjust frames */ diff --git a/source/blender/render/intern/source/occlusion.c b/source/blender/render/intern/source/occlusion.c index 7434425d24b..0984c9e784f 100644 --- a/source/blender/render/intern/source/occlusion.c +++ b/source/blender/render/intern/source/occlusion.c @@ -321,7 +321,7 @@ static void occ_face(const OccFace *face, float co[3], float normal[3], float *a if(co) { if(vlr->v4) - interp_v3_v3v3(co, vlr->v1->co, vlr->v3->co, 0.5f); + mid_v3_v3v3(co, vlr->v1->co, vlr->v3->co); else cent_tri_v3(co, vlr->v1->co, vlr->v2->co, vlr->v3->co); @@ -1623,7 +1623,7 @@ static void *exec_strandsurface_sample(void *data) if(face[3]) { co4= mesh->co[face[3]]; - interp_v3_v3v3(co, co1, co3, 0.5f); + mid_v3_v3v3(co, co1, co3); normal_quad_v3( n,co1, co2, co3, co4); } else { -- cgit v1.2.3