Bugfix #17784
authorTon Roosendaal <ton@blender.org>
Wed, 8 Oct 2008 18:35:41 +0000 (18:35 +0000)
committerTon Roosendaal <ton@blender.org>
Wed, 8 Oct 2008 18:35:41 +0000 (18:35 +0000)
Playanim now works for:

- tiff, cineon, dpx, hdr, exr

Only multilayer not, that's too much for a bugfix. Multilayer is a totally
different image format, handled separately.

ALso removed redundant printing for dpx/cineon.
And fixed crash in cineon when G.scene doesnt exist. Bad bad, should
not be there!

source/blender/blenkernel/intern/multires.c
source/blender/imbuf/intern/cineon/cineon_dpx.c
source/blender/imbuf/intern/cineon/cineonlib.c
source/blender/imbuf/intern/cineon/dpxlib.c
source/blender/src/playanim.c

index 259a4e0de0409588b4fb1415d0037f365ab59986..4d312632b1a8645880d57fca706d0d02f9fb0d63 100644 (file)
@@ -642,6 +642,10 @@ static void multires_update_vertices(Mesh *me, EditMesh *em)
        MultiApplyData data;
        int i, j;
 
+       /* XXX added this to prevent crash, but if it works? (ton) */
+       if(me->mr->verts==NULL)
+               return;
+       
        /* Prepare deltas */
        pr_deltas= MEM_callocN(sizeof(vec3f)*last_lvl->totvert, "multires deltas 1");
        cr_deltas= MEM_callocN(sizeof(vec3f)*last_lvl->totvert, "multires deltas 2");
index 2959ed654abe9e1c07f53d367c31b27acd7ffb86..514d6b5522b623d4c07c945e18a944dceb408dc4 100644 (file)
 
 static void cineon_conversion_parameters(LogImageByteConversionParameters *params)
 {
-       params->blackPoint = G.scene->r.cineonblack;
-       params->whitePoint = G.scene->r.cineonwhite;
-       params->gamma = G.scene->r.cineongamma;
-       params->doLogarithm = G.scene->r.subimtype & R_CINEON_LOG;
+       params->blackPoint = G.scene?G.scene->r.cineonblack:95;
+       params->whitePoint = G.scene?G.scene->r.cineonwhite:685;
+       params->gamma = G.scene?G.scene->r.cineongamma:1.7f;
+       params->doLogarithm = G.scene?G.scene->r.subimtype & R_CINEON_LOG:0;
 }
 
 static struct ImBuf *imb_load_dpx_cineon(unsigned char *mem, int use_cineon, int size, int flags)
index ecee3c7d6c0a3ddb23cfa835072f13e44ebd5e14..75516bbf3ae8a28bc9fdd2774ccd6049d054357e 100644 (file)
@@ -617,7 +617,7 @@ cineonOpenFromMem(unsigned char *mem, unsigned int size) {
        
        cineon->file = 0;
        cineon->reading = 1;
-       verbose = 1;
+       verbose = 0;
        if (size < sizeof(CineonGenericHeader)) {
                if (verbose) d_printf("Not enough data for header!\n");
                cineonClose(cineon);
index 1710cdde501fc6cd4e2d005b565cc47812734546..8a9adc73cdc1a1e010caa767b1d086ac79e91c2f 100644 (file)
@@ -199,7 +199,7 @@ dumpDpxMainHeader(DpxMainHeader* header) {
 #endif
 }
 
-static int verbose = 1;
+static int verbose = 0;
 void
 dpxSetVerbose(int verbosity) {
        verbose = verbosity;
index 8421101f66c9f8cf0919ffc2e0db6a79cea7c2ca..8880380700db051cf602db94e9b1f440cae73f6c 100644 (file)
@@ -191,6 +191,12 @@ static void toscreen(Pict *picture, struct ImBuf *ibuf)
                printf("no ibuf !\n");
                return;
        }
+       if (ibuf->rect==NULL && ibuf->rect_float) {
+               IMB_rect_from_float(ibuf);
+               imb_freerectfloatImBuf(ibuf);
+       }
+       if (ibuf->rect==NULL)
+               return;
 
        glRasterPos2f(0.0f, 0.0f);