Patch provided by Alfredo de Greef

This adds Radiance HDR image file support. So now at least we can save
the 'fbuf' (4x32 bits float colors) in Blender.
It doesn't change anything for internal support in imbuf for floa colors,
so when reading .hdr files it still converts it to 32 bits RGBA.

As an extra I've added that saving images with F3 now also adds the
optional extension, when the F10 "Extensions" option is set.

One important note; I don't know the proper license for the code, it was
provided without... will await feedback from Alfredo about it. For now
I've added the standard Blender GPL header.
This commit is contained in:
2005-11-20 14:32:07 +00:00
parent 36a9ae9415
commit c52170b4ed
15 changed files with 519 additions and 34 deletions

View File

@@ -545,6 +545,7 @@ PyObject *Render_Init( void )
PyModule_AddIntConstant( submodule, "QUICKTIME", R_QUICKTIME );
PyModule_AddIntConstant( submodule, "TARGA", R_TARGA );
PyModule_AddIntConstant( submodule, "RAWTGA", R_RAWTGA );
PyModule_AddIntConstant( submodule, "HDR", R_RADHDR );
PyModule_AddIntConstant( submodule, "PNG", R_PNG );
PyModule_AddIntConstant( submodule, "BMP", R_BMP );
PyModule_AddIntConstant( submodule, "JPEG", R_JPEG90 );
@@ -1528,6 +1529,8 @@ PyObject *RenderData_SetImageType( BPy_RenderData * self, PyObject * args )
self->renderContext->imtype = R_TARGA;
else if( type == R_RAWTGA )
self->renderContext->imtype = R_RAWTGA;
else if( type == R_RADHDR )
self->renderContext->imtype = R_RADHDR;
else if( type == R_PNG )
self->renderContext->imtype = R_PNG;
else if( type == R_BMP )