Merging r48538 through r48544 from trunk into soc-2011-tomato
[blender.git] / source / blender / blenkernel / intern / image.c
index d2a2412843a0087df7bfd0cf85254ac637f6895c..a5e424edbf9d4b70b5c5a17e01fabd5fa6afc5ce 100644 (file)
@@ -1011,6 +1011,20 @@ int BKE_imtype_supports_quality(const char imtype)
        return 0;
 }
 
+int BKE_imtype_supports_float(const char imtype)
+{
+       switch (imtype) {
+               case R_IMF_IMTYPE_CINEON:
+               case R_IMF_IMTYPE_DPX:
+               case R_IMF_IMTYPE_RADHDR:
+               case R_IMF_IMTYPE_OPENEXR:
+               case R_IMF_IMTYPE_MULTILAYER:
+               case R_IMF_IMTYPE_JP2:
+                       return TRUE;
+       }
+       return 0;
+}
+
 char BKE_imtype_valid_channels(const char imtype)
 {
        char chan_flag = IMA_CHAN_FLAG_RGB; /* assume all support rgb */
@@ -2542,7 +2556,11 @@ static ImBuf *image_get_render_result(Image *ima, ImageUser *iuser, void **lock_
        /* free rect buffer if float buffer changes, so it can be recreated with
         * the updated result, and also in case we got byte buffer from sequencer,
         * so we don't keep reference to freed buffer */
-       if (ibuf->rect_float != rectf || rect || !rectf)
+       
+       /* todo: this fix breaks save buffers render progress 
+          if (ibuf->rect_float != rectf || rect || !rectf) */
+
+       if (ibuf->rect_float != rectf || rect)
                imb_freerectImBuf(ibuf);
 
        if (rect)