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!
This commit is contained in:
Ton Roosendaal 2008-10-08 18:35:41 +00:00
parent 9cbb1745c2
commit 4a4f7c802a
5 changed files with 16 additions and 6 deletions

@ -642,6 +642,10 @@ static void multires_update_vertices(Mesh *me, EditMesh *em)
MultiApplyData data; MultiApplyData data;
int i, j; int i, j;
/* XXX added this to prevent crash, but if it works? (ton) */
if(me->mr->verts==NULL)
return;
/* Prepare deltas */ /* Prepare deltas */
pr_deltas= MEM_callocN(sizeof(vec3f)*last_lvl->totvert, "multires deltas 1"); pr_deltas= MEM_callocN(sizeof(vec3f)*last_lvl->totvert, "multires deltas 1");
cr_deltas= MEM_callocN(sizeof(vec3f)*last_lvl->totvert, "multires deltas 2"); cr_deltas= MEM_callocN(sizeof(vec3f)*last_lvl->totvert, "multires deltas 2");

@ -48,10 +48,10 @@
static void cineon_conversion_parameters(LogImageByteConversionParameters *params) static void cineon_conversion_parameters(LogImageByteConversionParameters *params)
{ {
params->blackPoint = G.scene->r.cineonblack; params->blackPoint = G.scene?G.scene->r.cineonblack:95;
params->whitePoint = G.scene->r.cineonwhite; params->whitePoint = G.scene?G.scene->r.cineonwhite:685;
params->gamma = G.scene->r.cineongamma; params->gamma = G.scene?G.scene->r.cineongamma:1.7f;
params->doLogarithm = G.scene->r.subimtype & R_CINEON_LOG; 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) static struct ImBuf *imb_load_dpx_cineon(unsigned char *mem, int use_cineon, int size, int flags)

@ -617,7 +617,7 @@ cineonOpenFromMem(unsigned char *mem, unsigned int size) {
cineon->file = 0; cineon->file = 0;
cineon->reading = 1; cineon->reading = 1;
verbose = 1; verbose = 0;
if (size < sizeof(CineonGenericHeader)) { if (size < sizeof(CineonGenericHeader)) {
if (verbose) d_printf("Not enough data for header!\n"); if (verbose) d_printf("Not enough data for header!\n");
cineonClose(cineon); cineonClose(cineon);

@ -199,7 +199,7 @@ dumpDpxMainHeader(DpxMainHeader* header) {
#endif #endif
} }
static int verbose = 1; static int verbose = 0;
void void
dpxSetVerbose(int verbosity) { dpxSetVerbose(int verbosity) {
verbose = verbosity; verbose = verbosity;

@ -191,6 +191,12 @@ static void toscreen(Pict *picture, struct ImBuf *ibuf)
printf("no ibuf !\n"); printf("no ibuf !\n");
return; 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); glRasterPos2f(0.0f, 0.0f);