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>2011-08-31 03:37:46 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-08-31 03:37:46 +0400
commit2883e035c87a4236629d9a89ea0a6e80b525e7d3 (patch)
treef816e174c52edadada6e0893ef1ffc2f61c47403 /source/blender
parentc58a0c5eb814db1be08c0e8a4353ad5606a23d30 (diff)
fix for error in my recent change to image save.
- relative path wasn't being made absolute. - saving renders was always defaulting to multilayer exr, now use the output format set.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/space_image/image_ops.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index f96a8ea4d84..68f9e4d033e 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -960,20 +960,19 @@ static int save_image_options_init(SaveImageOptions *simopts, SpaceImage *sima,
if(ibuf) {
Image *ima= sima->image;
- RenderResult *rr= BKE_image_acquire_renderresult(scene, ima);
simopts->planes= ibuf->depth;
- /* cant save multilayer sequence, ima->rr isn't valid for a specific frame */
- if(rr && !(ima->source==IMA_SRC_SEQUENCE && ima->type==IMA_TYPE_MULTILAYER))
- simopts->imtype= R_MULTILAYER;
- else if(ima->type==IMA_TYPE_R_RESULT)
+ if(ELEM(ima->type, IMA_TYPE_R_RESULT, IMA_TYPE_COMPOSITE)) {
simopts->imtype= scene->r.imtype;
- else if (ima->source == IMA_SRC_GENERATED)
+ simopts->planes= scene->r.planes;
+ }
+ else if (ima->source == IMA_SRC_GENERATED) {
simopts->imtype= R_PNG;
- else
+ }
+ else {
simopts->imtype= BKE_ftype_to_imtype(ibuf->ftype);
-
+ }
simopts->subimtype= scene->r.subimtype; /* XXX - this is lame, we need to make these available too! */
simopts->quality= ibuf->ftype & 0xff;
@@ -1000,8 +999,6 @@ static int save_image_options_init(SaveImageOptions *simopts, SpaceImage *sima,
}
BLI_path_abs(simopts->filepath, G.main->name);
}
- /* cleanup */
- BKE_image_release_renderresult(scene, ima);
}
ED_space_image_release_buffer(sima, lock);
@@ -1016,7 +1013,10 @@ static void save_image_options_from_op(SaveImageOptions *simopts, wmOperator *op
// if (RNA_property_is_set(op->ptr, "subimtype")) simopts->subimtype= RNA_enum_get(op->ptr, "subimtype"); // XXX
if (RNA_property_is_set(op->ptr, "file_quality")) simopts->quality= RNA_int_get(op->ptr, "file_quality");
- if (RNA_property_is_set(op->ptr, "filepath")) RNA_string_get(op->ptr, "filepath", simopts->filepath);
+ if (RNA_property_is_set(op->ptr, "filepath")) {
+ RNA_string_get(op->ptr, "filepath", simopts->filepath);
+ BLI_path_abs(simopts->filepath, G.main->name);
+ }
}
static void save_image_options_to_op(SaveImageOptions *simopts, wmOperator *op)