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:
authorTon Roosendaal <ton@blender.org>2006-01-11 00:41:37 +0300
committerTon Roosendaal <ton@blender.org>2006-01-11 00:41:37 +0300
commitd594594cbe9c9eb3bc3c8a7708601e68693d324d (patch)
treef8d7156197e1d5d5e27156d0dbe11a8b94671bf0 /source/blender/src/header_image.c
parenta0a3597b8b0d5be7a9161046cb1f8b4a60f44a35 (diff)
Orange: more work on float/exr buffers;
- EXR now saves and reads Zbuffers correctly - EXR reading didn't set alpha to 1 yet when no alpha buffer was present - ImageWindow: the "black point" only checked for the r value... now is OK - ImageWindow: Curves panal has button "reset" - ImageWindow: hold LMB drag shows rgba and z values. With SHIFT or CTRL it applies black/white point whilte dragging too - ImageWindow: saving file copied the entire buffer... removed that. Also made the header print clear; this save only saves in own file type. - Curves: zoom and drag now gets clamped by the Clipping value - Imbuf: duplicate buffer only copied one quarter of to new buffer
Diffstat (limited to 'source/blender/src/header_image.c')
-rw-r--r--source/blender/src/header_image.c28
1 files changed, 9 insertions, 19 deletions
diff --git a/source/blender/src/header_image.c b/source/blender/src/header_image.c
index 2e8608332a6..38e8938b052 100644
--- a/source/blender/src/header_image.c
+++ b/source/blender/src/header_image.c
@@ -185,19 +185,13 @@ static void save_paint(char *name)
BLI_convertstringcode(str, G.sce, G.scene->r.cfra);
if (saveover(str)) {
- ibuf = IMB_dupImBuf(ima->ibuf);
-
- if (ibuf) {
- if (BIF_write_ibuf(ibuf, str)) {
- BLI_strncpy(ima->name, name, sizeof(ima->name));
- ima->ibuf->userflags &= ~IB_BITMAPDIRTY;
- allqueue(REDRAWHEADERS, 0);
- allqueue(REDRAWBUTSSHADING, 0);
- } else {
- error("Couldn't write image: %s", str);
- }
-
- IMB_freeImBuf(ibuf);
+ if (BIF_write_ibuf(ibuf, str)) {
+ BLI_strncpy(ima->name, name, sizeof(ima->name));
+ ima->ibuf->userflags &= ~IB_BITMAPDIRTY;
+ allqueue(REDRAWHEADERS, 0);
+ allqueue(REDRAWBUTSSHADING, 0);
+ } else {
+ error("Couldn't write image: %s", str);
}
}
}
@@ -335,9 +329,7 @@ void do_image_buttons(unsigned short event)
if (ima) {
strcpy(name, ima->name);
if (ima->ibuf) {
- char str[32]; // sufficient for message
- save_image_filesel_str(str);
- activate_fileselect(FILE_SPECIAL, str, name, save_paint);
+ activate_fileselect(FILE_SPECIAL, "Save in own image type", name, save_paint);
}
}
break;
@@ -706,9 +698,7 @@ static void do_image_imagemenu(void *arg, int event)
if (ima) {
strcpy(name, ima->name);
if (ima->ibuf) {
- char str[32]; // sufficient for message
- save_image_filesel_str(str);
- activate_fileselect(FILE_SPECIAL, str, name, save_paint);
+ activate_fileselect(FILE_SPECIAL, "Save in own image type", name, save_paint);
}
}
break;