diff options
author | Joshua Leung <aligorith@gmail.com> | 2010-01-30 07:43:36 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2010-01-30 07:43:36 +0300 |
commit | e1fdf7fc58573de84fba5514bcdef1749bb61d16 (patch) | |
tree | 301a9bfee9018170f18327e86f6a1e460123c335 /source/blender/makesdna/DNA_userdef_types.h | |
parent | d86a9da07ca7901c1984c79b420cb87b363cbafa (diff) |
View2D/TimeCode Drawing:
This commit introduces a few cleanups and tweaks to the way that timecodes (i.e. the timing indications used instead of frame numbers) get displayed.
1. Custom Spacing of TimeCodes/Gridlines
Made the minimum number of pixels between gridlines/timecode indications a user-preference, instead of being a hardcoded constant. This allows to set the spacing tighter/looser than the defaults, and is also used for the other changes.
2. Default timecode display style, (now named 'minimal') uses '+' as the delimeter for the sub-second frames. This hopefully makes it a bit clearer what those values represent, as opposed to the '!', which can sometimes look too much like a colon.
3. Added various timecode display styles as user-preference. - These include always displaying full SMPTE, to showing milliseconds instead of frams for sub-second times, and also an option to just show the times as seconds only.
- When changing the timecode style, the spacing setting is automatically modified so that the timecodes are spaced far apart enough so that they won't clash (under most circumstances). This automatic modification is only done if the spacing is too tight for the style being set.
4. Unified the code for generating timecode strings between the View2D scrollbar drawing and the current frame indicator drawing.
Diffstat (limited to 'source/blender/makesdna/DNA_userdef_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 55eba879865..40de15ac012 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -291,7 +291,9 @@ typedef struct UserDef { char sounddir[160]; char anim_player[240]; // FILE_MAX length int anim_player_preset; - int pad; + + short v2d_min_gridsize; /* minimum spacing between gridlines in View2D grids */ + short timecode_style; /* style of timecode display */ short versions; short dbl_click_time; @@ -496,6 +498,21 @@ extern UserDef U; /* from blenkernel blender.c */ #define USER_CP_SQUARE_HS 2 #define USER_CP_SQUARE_HV 3 +/* timecode display styles */ + /* as little info as is necessary to show relevant info + * with '+' to denote the frames + * i.e. HH:MM:SS+FF, MM:SS+FF, SS+FF, or MM:SS + */ +#define USER_TIMECODE_MINIMAL 0 + /* reduced SMPTE - (HH:)MM:SS:FF */ +#define USER_TIMECODE_SMPTE_MSF 1 + /* full SMPTE - HH:MM:SS:FF */ +#define USER_TIMECODE_SMPTE_FULL 2 + /* milliseconds for sub-frames - HH:MM:SS.sss */ +#define USER_TIMECODE_MILLISECONDS 3 + /* seconds only */ +#define USER_TIMECODE_SECONDS_ONLY 4 + /* theme drawtypes */ #define TH_MINIMAL 0 #define TH_ROUNDSHADED 1 |