I'm developing blender exporter for CryEngine - CryBlend.
I need to convert an image to tiff, and then pass it to cryengine resource compiled. The thing is while saving image with blender python console, then it works:
Code: Select all
image2 = bpy.data.images.copy()
image2.filepath_raw = 'new_path.tif'
image2.file_format = 'TIFF'
but the same code placed in addon throws an exception at save()
"RuntimeError: Error: Image "my image" does not have any image data."
What's more, while debugging that code with pydev then it works as expected.
I'm totally puzzled with it.
here is the code.