diff options
author | Joshua Leung <aligorith@gmail.com> | 2007-08-11 13:20:56 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2007-08-11 13:20:56 +0400 |
commit | e8668988a31f700c330a05838ec949662458cc4e (patch) | |
tree | c9e484399427a7ba5b2a2ee36e56ea9dd14b8c55 /source/blender/src/edittime.c | |
parent | 0f3af56e26b134c380a89bf51604893d72ed2510 (diff) |
== Action Editor - Time Stuff for Tools ==
Part 2 of work from yesterday. Now tools in Action Editor are aware of (work well) with time display in seconds as well.
Diffstat (limited to 'source/blender/src/edittime.c')
-rw-r--r-- | source/blender/src/edittime.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/source/blender/src/edittime.c b/source/blender/src/edittime.c index b702b77d6bc..575bc14dcd3 100644 --- a/source/blender/src/edittime.c +++ b/source/blender/src/edittime.c @@ -167,6 +167,7 @@ void transform_markers(int mode, int smode) // mode and smode unused here, for c { SpaceLink *slink= curarea->spacedata.first; SpaceTime *stime= curarea->spacedata.first; + SpaceAction *saction = curarea->spacedata.first; TimeMarker *marker, *selmarker=NULL; float dx, fac; int a, ret_val= 0, totmark=0, *oldframe, offs, firsttime=1; @@ -219,22 +220,34 @@ void transform_markers(int mode, int smode) // mode and smode unused here, for c if(totmark==1) { // we print current marker value if (ELEM(slink->spacetype, SPACE_TIME, SPACE_SOUND)) { - if(stime->flag & TIME_DRAWFRAMES) + if (stime->flag & TIME_DRAWFRAMES) sprintf(str, "Marker %d offset %d", selmarker->frame, offs); else sprintf(str, "Marker %.2f offset %.2f", (selmarker->frame/(float)G.scene->r.frs_sec), (offs/(float)G.scene->r.frs_sec)); } + else if (slink->spacetype == SPACE_ACTION) { + if (saction->flag & SACTION_DRAWTIME) + sprintf(str, "Marker %.2f offset %.2f", (selmarker->frame/(float)G.scene->r.frs_sec), (offs/(float)G.scene->r.frs_sec)); + else + sprintf(str, "Marker %.2f offset %.2f", (double)(selmarker->frame), (double)(offs)); + } else { sprintf(str, "Marker %.2f offset %.2f", (double)(selmarker->frame), (double)(offs)); } } else { if (ELEM(slink->spacetype, SPACE_TIME, SPACE_SOUND)) { - if(stime->flag & TIME_DRAWFRAMES) + if (stime->flag & TIME_DRAWFRAMES) sprintf(str, "Marker offset %d ", offs); else sprintf(str, "Marker offset %.2f ", (offs/(float)G.scene->r.frs_sec)); } + else if (slink->spacetype == SPACE_ACTION) { + if (saction->flag & SACTION_DRAWTIME) + sprintf(str, "Marker offset %.2f ", (offs/(float)G.scene->r.frs_sec)); + else + sprintf(str, "Marker offset %.2f ", (double)(offs)); + } else { sprintf(str, "Marker offset %.2f ", (double)(offs)); } |