diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/animation/anim_draw.c | 14 | ||||
-rw-r--r-- | source/blender/editors/interface/view2d.c | 14 |
2 files changed, 18 insertions, 10 deletions
diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c index 0474f81754d..c176f20c26b 100644 --- a/source/blender/editors/animation/anim_draw.c +++ b/source/blender/editors/animation/anim_draw.c @@ -83,12 +83,16 @@ static void draw_cfra_number (Scene *scene, View2D *v2d, float cfra, short time) glScalef(1.0f/xscale, 1.0f, 1.0f); if (time) { - /* (Pseudo) SMPTE timecode style: + /* Timecode: * - In general, minutes and seconds should be shown, as most clips will be * within this length. Hours will only be included if relevant. * - Only show frames when zoomed in enough for them to be relevant - * (using separator of '+' for frames). + * (using separator of '!' for frames). * When showing frames, use slightly different display to avoid confusion with mm:ss format + * TODO: factor into reusable function. + * Meanwhile keep in sync: + * source/blender/editors/animation/anim_draw.c + * source/blender/editors/interface/view2d.c */ float val= FRA2TIME(CFRA); int hours=0, minutes=0, seconds=0, frames=0; @@ -124,9 +128,9 @@ static void draw_cfra_number (Scene *scene, View2D *v2d, float cfra, short time) } /* print timecode to temp string buffer */ - if (hours) sprintf(str, " %s%02d:%02d:%02d+%02d", neg, hours, minutes, seconds, frames); - else if (minutes) sprintf(str, " %s%02d:%02d+%02d", neg, minutes, seconds, frames); - else sprintf(str, " %s%d+%02d", neg, seconds, frames); + if (hours) sprintf(str, " %s%02d:%02d:%02d!%02d", neg, hours, minutes, seconds, frames); + else if (minutes) sprintf(str, " %s%02d:%02d!%02d", neg, minutes, seconds, frames); + else sprintf(str, " %s%d!%02d", neg, seconds, frames); } else sprintf(str, " %d", CFRA); diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index b363f1f6272..4621be6eda0 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -1289,12 +1289,16 @@ static void scroll_printstr(View2DScrollers *scrollers, Scene *scene, float x, f /* get string to print */ if (unit == V2D_UNIT_SECONDS) { - /* SMPTE timecode style: + /* Timecode: * - In general, minutes and seconds should be shown, as most clips will be * within this length. Hours will only be included if relevant. * - Only show frames when zoomed in enough for them to be relevant - * (using separator convention of ';' for frames, ala QuickTime). + * (using separator of '!' for frames). * When showing frames, use slightly different display to avoid confusion with mm:ss format + * TODO: factor into reusable function. + * Meanwhile keep in sync: + * source/blender/editors/animation/anim_draw.c + * source/blender/editors/interface/view2d.c */ int hours=0, minutes=0, seconds=0, frames=0; char neg[2]= ""; @@ -1335,9 +1339,9 @@ static void scroll_printstr(View2DScrollers *scrollers, Scene *scene, float x, f /* print timecode to temp string buffer */ if (power <= 0) { /* include "frames" in display */ - if (hours) sprintf(str, "%s%02d:%02d:%02d;%02d", neg, hours, minutes, seconds, frames); - else if (minutes) sprintf(str, "%s%02d:%02d;%02d", neg, minutes, seconds, frames); - else sprintf(str, "%s%d;%02d", neg, seconds, frames); + if (hours) sprintf(str, "%s%02d:%02d:%02d!%02d", neg, hours, minutes, seconds, frames); + else if (minutes) sprintf(str, "%s%02d:%02d!%02d", neg, minutes, seconds, frames); + else sprintf(str, "%s%d!%02d", neg, seconds, frames); } else { /* don't include 'frames' in display */ |