Revision: 39812
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39812
Author:   campbellbarton
Date:     2011-08-30 23:37:46 +0000 (Tue, 30 Aug 2011)
Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_image/image_ops.c

Modified: trunk/blender/source/blender/editors/space_image/image_ops.c
===================================================================
--- trunk/blender/source/blender/editors/space_image/image_ops.c        
2011-08-30 23:09:07 UTC (rev 39811)
+++ trunk/blender/source/blender/editors/space_image/image_ops.c        
2011-08-30 23:37:46 UTC (rev 39812)
@@ -960,20 +960,19 @@
 
        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 @@
                        }
                        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 @@
        // 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)

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to