Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2009-06-10 07:36:28 +0400
committerJoshua Leung <aligorith@gmail.com>2009-06-10 07:36:28 +0400
commit7dbc21ae3cfe54db4ad1e0d68cde44667533eaef (patch)
tree17a6355aea11e6f36147efcc29f8ad26594d0b91 /source/blender/editors/interface/view2d.c
parentabdb8fd94d90a1b9fb262c94dac1ccb52cfee36f (diff)
parentb9ef34b6e5c8455638d1e88211e536d0009b3bfa (diff)
NLA SoC: Merge from 2.5
20669 to 20771 (sheesh, that took an hour, not including having to restart the whole process after TortoiseSVN bailed out midway through the first try)
Diffstat (limited to 'source/blender/editors/interface/view2d.c')
-rw-r--r--source/blender/editors/interface/view2d.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c
index 19c95ce7ce0..aa1cc5790ef 100644
--- a/source/blender/editors/interface/view2d.c
+++ b/source/blender/editors/interface/view2d.c
@@ -1306,12 +1306,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]= "";
@@ -1352,9 +1356,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 */