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:
authorCampbell Barton <ideasman42@gmail.com>2007-10-20 20:17:27 +0400
committerCampbell Barton <ideasman42@gmail.com>2007-10-20 20:17:27 +0400
commit46deddcc62784dab47b1f14dda0d802f5f341b18 (patch)
treee3542a1b2d10f1c77e4ac5f7078f485d5b4e1006 /source/blender/imbuf/intern/imginfo.c
parente5a9e0b12a6d6aa334561edaf8a839f3f1a8d7d4 (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/imbuf/intern/imginfo.c')
-rw-r--r--source/blender/imbuf/intern/imginfo.c49
1 files changed, 49 insertions, 0 deletions
diff --git a/source/blender/imbuf/intern/imginfo.c b/source/blender/imbuf/intern/imginfo.c
index 59fbd2f7200..37bde9e5ac3 100644
--- a/source/blender/imbuf/intern/imginfo.c
+++ b/source/blender/imbuf/intern/imginfo.c
@@ -107,3 +107,52 @@ int IMB_imginfo_add_field(struct ImBuf* img, const char* key, const char* field)
return 1;
}
+int IMB_imginfo_del_field(struct ImBuf *img, const char *key)
+{
+ ImgInfo *p, *p1;
+
+ if ((!img) || (!img->img_info))
+ return (0);
+
+ p = img->img_info;
+ p1 = NULL;
+ while (p) {
+ if (!strcmp (key, p->key)) {
+ if (p1)
+ p1->next = p->next;
+ else
+ img->img_info = p->next;
+
+ MEM_freeN(p->key);
+ MEM_freeN(p->value);
+ MEM_freeN(p);
+ return (1);
+ }
+ p1 = p;
+ p = p->next;
+ }
+ return (0);
+}
+
+int IMB_imginfo_change_field(struct ImBuf *img, const char *key, const char *field)
+{
+ ImgInfo *p;
+
+ if (!img)
+ return (0);
+
+ if (!img->img_info)
+ return (IMB_imginfo_add_field (img, key, field));
+
+ p = img->img_info;
+ while (p) {
+ if (!strcmp (key, p->key)) {
+ MEM_freeN (p->value);
+ p->value = BLI_strdup (field);
+ return (1);
+ }
+ p = p->next;
+ }
+
+ return (IMB_imginfo_add_field (img, key, field));
+}