Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2008-01-14 13:41:36 +0300
committerCampbell Barton <ideasman42@gmail.com>2008-01-14 13:41:36 +0300
commitf8ec163076c237ff06bd34092163bc915c2f0427 (patch)
treeac14b50e357803af9f09dc1f1e0a296b0ed091a5 /source
parent2262d0a45a83dc7fc04017907352ed745aeb8d1e (diff)
menu generation read and wrote to the same memory with sprintf(), use INIT_MINMAX in a few more places and centerview didnt take into account some bone tips in editmode.
Diffstat (limited to 'source')
-rw-r--r--source/blender/radiosity/intern/source/radfactors.c6
-rw-r--r--source/blender/src/buttons_editing.c5
-rw-r--r--source/blender/src/edit.c4
-rw-r--r--source/blender/src/view.c10
4 files changed, 10 insertions, 15 deletions
diff --git a/source/blender/radiosity/intern/source/radfactors.c b/source/blender/radiosity/intern/source/radfactors.c
index b6411522179..d2d1b581ae8 100644
--- a/source/blender/radiosity/intern/source/radfactors.c
+++ b/source/blender/radiosity/intern/source/radfactors.c
@@ -744,11 +744,9 @@ void subdivideshootElements(int it)
}
}
if(rn) {
- min[0]= min[1]= min[2]= 1.0e10;
- max[0]= max[1]= max[2]= -1.0e10;
+ INIT_MINMAX(min, max);
/* errmin and max are the filtered colors */
- errmin[0]= errmin[1]= errmin[2]= 1.0e10;
- errmax[0]= errmax[1]= errmax[2]= -1.0e10;
+ INIT_MINMAX(errmin, errmax);
minmaxradelemfilt(rp->first, min, max, errmin, errmax);
/* if small difference between colors: no subdiv */
diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c
index ff12c9526c7..8db7f36d504 100644
--- a/source/blender/src/buttons_editing.c
+++ b/source/blender/src/buttons_editing.c
@@ -3920,9 +3920,10 @@ static void build_bonestring (char *string, EditBone *bone)
int skip=0;
int index, numbones, i;
char (*qsort_ptr)[32] = NULL;
+ char *s = string;
/* That space is there for a reason - for no parent */
- sprintf (string, "Parent%%t| %%x%d", -1);
+ s += sprintf (string, "Parent%%t| %%x%d", -1);
numbones = BLI_countlist(&G.edbo);
@@ -3963,7 +3964,7 @@ static void build_bonestring (char *string, EditBone *bone)
( int (*)(const void *, const void *) ) strcmp);
for (i=0; i < numbones; ++i) {
- sprintf (string, "%s%s", string, qsort_ptr[i]);
+ strcat(s, qsort_ptr[i]);
}
if (qsort_ptr)
diff --git a/source/blender/src/edit.c b/source/blender/src/edit.c
index fcd38ef16a7..138f0a438fd 100644
--- a/source/blender/src/edit.c
+++ b/source/blender/src/edit.c
@@ -952,7 +952,7 @@ static void make_trans_verts(float *min, float *max, int mode)
/* I skip it for editmesh now (ton) */
if(G.obedit->type!=OB_MESH) {
countall();
- if(mode) tottrans= G.totvert;
+ if(mode) tottrans= G.totvert;
else tottrans= G.totvertsel;
if(G.totvertsel==0) {
@@ -1915,7 +1915,7 @@ int minmax_verts(float *min, float *max)
tottrans=0;
if ELEM5(G.obedit->type, OB_ARMATURE, OB_LATTICE, OB_MESH, OB_SURF, OB_CURVE)
- make_trans_verts(bmat[0], bmat[1], 0);
+ make_trans_verts(bmat[0], bmat[1], 2);
if(tottrans==0) return 0;
Mat3CpyMat4(bmat, G.obedit->obmat);
diff --git a/source/blender/src/view.c b/source/blender/src/view.c
index 52f9ff06227..655fa59a4c1 100644
--- a/source/blender/src/view.c
+++ b/source/blender/src/view.c
@@ -1300,8 +1300,7 @@ void initlocalview()
if(G.vd->localvd) return;
- min[0]= min[1]= min[2]= 1.0e10;
- max[0]= max[1]= max[2]= -1.0e10;
+ INIT_MINMAX(min, max);
locallay= free_localbit();
@@ -1396,9 +1395,7 @@ void centerview() /* like a localview without local! */
float new_ofs[3];
float new_dist;
-
- min[0]= min[1]= min[2]= 1.0e10;
- max[0]= max[1]= max[2]= -1.0e10;
+ INIT_MINMAX(min, max);
if (G.f & G_WEIGHTPAINT) {
/* hardcoded exception, we look for the one selected armature */
@@ -1577,8 +1574,7 @@ void view3d_home(int center)
max[0]= max[1]= max[2]= 0.0;
}
else {
- min[0]= min[1]= min[2]= 1.0e10;
- max[0]= max[1]= max[2]= -1.0e10;
+ INIT_MINMAX(min, max);
}
for(base= FIRSTBASE; base; base= base->next) {