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.
This commit is contained in:
@@ -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 */
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user