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) {
|
if(rn) {
|
||||||
min[0]= min[1]= min[2]= 1.0e10;
|
INIT_MINMAX(min, max);
|
||||||
max[0]= max[1]= max[2]= -1.0e10;
|
|
||||||
/* errmin and max are the filtered colors */
|
/* errmin and max are the filtered colors */
|
||||||
errmin[0]= errmin[1]= errmin[2]= 1.0e10;
|
INIT_MINMAX(errmin, errmax);
|
||||||
errmax[0]= errmax[1]= errmax[2]= -1.0e10;
|
|
||||||
minmaxradelemfilt(rp->first, min, max, errmin, errmax);
|
minmaxradelemfilt(rp->first, min, max, errmin, errmax);
|
||||||
|
|
||||||
/* if small difference between colors: no subdiv */
|
/* if small difference between colors: no subdiv */
|
||||||
|
|||||||
@@ -3920,9 +3920,10 @@ static void build_bonestring (char *string, EditBone *bone)
|
|||||||
int skip=0;
|
int skip=0;
|
||||||
int index, numbones, i;
|
int index, numbones, i;
|
||||||
char (*qsort_ptr)[32] = NULL;
|
char (*qsort_ptr)[32] = NULL;
|
||||||
|
char *s = string;
|
||||||
|
|
||||||
/* That space is there for a reason - for no parent */
|
/* 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);
|
numbones = BLI_countlist(&G.edbo);
|
||||||
|
|
||||||
@@ -3963,7 +3964,7 @@ static void build_bonestring (char *string, EditBone *bone)
|
|||||||
( int (*)(const void *, const void *) ) strcmp);
|
( int (*)(const void *, const void *) ) strcmp);
|
||||||
|
|
||||||
for (i=0; i < numbones; ++i) {
|
for (i=0; i < numbones; ++i) {
|
||||||
sprintf (string, "%s%s", string, qsort_ptr[i]);
|
strcat(s, qsort_ptr[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (qsort_ptr)
|
if (qsort_ptr)
|
||||||
|
|||||||
@@ -952,7 +952,7 @@ static void make_trans_verts(float *min, float *max, int mode)
|
|||||||
/* I skip it for editmesh now (ton) */
|
/* I skip it for editmesh now (ton) */
|
||||||
if(G.obedit->type!=OB_MESH) {
|
if(G.obedit->type!=OB_MESH) {
|
||||||
countall();
|
countall();
|
||||||
if(mode) tottrans= G.totvert;
|
if(mode) tottrans= G.totvert;
|
||||||
else tottrans= G.totvertsel;
|
else tottrans= G.totvertsel;
|
||||||
|
|
||||||
if(G.totvertsel==0) {
|
if(G.totvertsel==0) {
|
||||||
@@ -1915,7 +1915,7 @@ int minmax_verts(float *min, float *max)
|
|||||||
|
|
||||||
tottrans=0;
|
tottrans=0;
|
||||||
if ELEM5(G.obedit->type, OB_ARMATURE, OB_LATTICE, OB_MESH, OB_SURF, OB_CURVE)
|
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;
|
if(tottrans==0) return 0;
|
||||||
|
|
||||||
Mat3CpyMat4(bmat, G.obedit->obmat);
|
Mat3CpyMat4(bmat, G.obedit->obmat);
|
||||||
|
|||||||
@@ -1300,8 +1300,7 @@ void initlocalview()
|
|||||||
|
|
||||||
if(G.vd->localvd) return;
|
if(G.vd->localvd) return;
|
||||||
|
|
||||||
min[0]= min[1]= min[2]= 1.0e10;
|
INIT_MINMAX(min, max);
|
||||||
max[0]= max[1]= max[2]= -1.0e10;
|
|
||||||
|
|
||||||
locallay= free_localbit();
|
locallay= free_localbit();
|
||||||
|
|
||||||
@@ -1396,9 +1395,7 @@ void centerview() /* like a localview without local! */
|
|||||||
float new_ofs[3];
|
float new_ofs[3];
|
||||||
float new_dist;
|
float new_dist;
|
||||||
|
|
||||||
|
INIT_MINMAX(min, max);
|
||||||
min[0]= min[1]= min[2]= 1.0e10;
|
|
||||||
max[0]= max[1]= max[2]= -1.0e10;
|
|
||||||
|
|
||||||
if (G.f & G_WEIGHTPAINT) {
|
if (G.f & G_WEIGHTPAINT) {
|
||||||
/* hardcoded exception, we look for the one selected armature */
|
/* 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;
|
max[0]= max[1]= max[2]= 0.0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
min[0]= min[1]= min[2]= 1.0e10;
|
INIT_MINMAX(min, max);
|
||||||
max[0]= max[1]= max[2]= -1.0e10;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for(base= FIRSTBASE; base; base= base->next) {
|
for(base= FIRSTBASE; base; base= base->next) {
|
||||||
|
|||||||
Reference in New Issue
Block a user