diff options
author | Joshua Leung <aligorith@gmail.com> | 2007-01-04 02:22:58 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2007-01-04 02:22:58 +0300 |
commit | 0b6eb9d2835776e2f873fadb935616ea36985b5e (patch) | |
tree | 86144af04d67af892d9758bd0f423aa952dd8f5d | |
parent | 7356ede09caf77a9b9e6fc21565f688468741f9a (diff) |
== 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)
-rw-r--r-- | source/blender/src/drawarmature.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/source/blender/src/drawarmature.c b/source/blender/src/drawarmature.c index 42ce97f771b..15e94ef2ff2 100644 --- a/source/blender/src/drawarmature.c +++ b/source/blender/src/drawarmature.c @@ -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); + } + } } } |