== Armatures - Path Drawing Bugfix ==

Now, when several highlighted points on the path occur at the same place
(i.e. when there is a pause) only the first frame number when this is the case
is drawn. This results in less overlapping frame numbers (causing an unreadable
blob of digits)
This commit is contained in:
Joshua Leung 2007-01-03 23:22:58 +00:00
parent 7356ede09c
commit 0b6eb9d283

@ -1768,7 +1768,9 @@ static void draw_pose_paths(Object *ob)
glPointSize(1.0);
/* draw little black point at each frame */
/* draw little black point at each frame
* NOTE: this is not really visible/noticable
*/
glBegin(GL_POINTS);
for(a=0, fp= pchan->path; a<pchan->pathlen; a++, fp+=3)
glVertex3fv(fp);
@ -1786,9 +1788,19 @@ static void draw_pose_paths(Object *ob)
for(a=0, fp= pchan->path; a<pchan->pathlen; a+=stepsize, fp+=(stepsize*3)) {
char str[32];
glRasterPos3fv(fp);
sprintf(str, " %d\n", (a+sfra));
BMF_DrawString(G.font, str);
/* only draw framenum if several consecutive highlighted points occur on same point */
if (a == 0) {
glRasterPos3fv(fp);
sprintf(str, " %d\n", (a+sfra));
BMF_DrawString(G.font, str);
}
else if ((a > stepsize) && (a < pchan->pathlen-stepsize)) {
if ((VecEqual(fp, fp-(stepsize*3))==0) || (VecEqual(fp, fp+(stepsize*3))==0)) {
glRasterPos3fv(fp);
sprintf(str, " %d\n", (a+sfra));
BMF_DrawString(G.font, str);
}
}
}
}