diff options
author | Campbell Barton <ideasman42@gmail.com> | 2007-10-20 20:17:27 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2007-10-20 20:17:27 +0400 |
commit | 46deddcc62784dab47b1f14dda0d802f5f341b18 (patch) | |
tree | e3542a1b2d10f1c77e4ac5f7078f485d5b4e1006 /source/blender/src/edittime.c | |
parent | e5a9e0b12a6d6aa334561edaf8a839f3f1a8d7d4 (diff) |
Image Stamping patch by Diego (and peach request)- stamps image info into metadata and optionally
draws into the
frame.
This patch includes some changes I made...
* use blenders bitmap fonts (rather then own fonts)
* select font size
* user interface layout changes
* Marker as another image stamp option
Also added some new API calls
BMF_GetFontHeight(font);
BMF_DrawStringBuf(...); - so we can draw text into an imbuf's image buffer.
get_frame_marker(frame) - get the last marker from the frame.
IMB_rectfill_area(...) - fill in an image buffer with a rectangle area of color.
TODO - draw stamp info in 3d view, at the moment it just displays in the animation.
Diffstat (limited to 'source/blender/src/edittime.c')
-rw-r--r-- | source/blender/src/edittime.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/source/blender/src/edittime.c b/source/blender/src/edittime.c index d9981f58ac2..280c69e2719 100644 --- a/source/blender/src/edittime.c +++ b/source/blender/src/edittime.c @@ -103,6 +103,8 @@ void add_marker(int frame) BIF_undo_push("Add Marker"); } + + /* remove selected TimeMarkers */ void remove_marker(void) { @@ -733,6 +735,27 @@ void nextprev_timeline_key(short dir) } } +/* return the current marker for this frame, +we can have more then 1 marker per frame, this just returns the first :/ */ +TimeMarker *get_frame_marker(int frame) +{ + TimeMarker *marker, *best_marker = NULL; + int best_frame = -MAXFRAME*2; + for (marker= G.scene->markers.first; marker; marker= marker->next) { + if (marker->frame==frame) { + return marker; + } + + if ( marker->frame > best_frame && marker->frame < frame) { + best_marker = marker; + best_frame = marker->frame; + } + } + + return best_marker; +} + + void timeline_frame_to_center(void) { float dtime; |