- replaced BKE_copy_images with BKE_export_image, now it handles only one image at a time, this is better since for exporters it is 
easier to export one image at a time writing new image path to a file
- exposing BKE_export_image in RNA as Image.export, interestingly, RNA allowed me to define a function with PROP_STRING return type 
although it doesn't free memory, will fix that in the next commit
- removed bpy.util.copy_images

Unit tests:
- re-wrote a test for BKE_export_image, it's more compact now
- moved unit tests to the creator module to avoid another executable, now running tests with `blender --test`
- as before, unit tests are built only if WITH_BF_UNIT_TEST is non 0
This commit is contained in:
Arystanbek Dyussenov
2009-07-23 12:55:26 +00:00
parent 00e219d8e9
commit c96041628e
13 changed files with 225 additions and 227 deletions

View File

@@ -1,7 +1,10 @@
#!/usr/bin/python
Import ('env')
sources = 'creator.c'
sources = ['creator.c']
if env['WITH_BF_UNIT_TEST']:
sources += env.Glob('tests/*.c')
incs = '#/intern/guardedalloc ../blender/blenlib ../blender/blenkernel'
incs += ' ../blender/editors/include ../blender/blenloader ../blender/imbuf'
@@ -11,6 +14,10 @@ incs += ' ../kernel/gen_system #/extern/glew/include ../blender/gpu'
incs += ' ' + env['BF_OPENGL_INC']
defs = []
if env['WITH_BF_UNIT_TEST']:
defs.append('WITH_UNIT_TEST')
if env['WITH_BF_QUICKTIME']:
incs += ' ' + env['BF_QUICKTIME_INC']
defs.append('WITH_QUICKTIME')
@@ -32,4 +39,4 @@ if env['WITH_BF_PYTHON']:
else:
defs.append('DISABLE_PYTHON')
env.BlenderLib ( libname = 'bf_creator', sources = Split(sources), includes = Split(incs), defines = defs, libtype='core', priority = 0 )
env.BlenderLib ( libname = 'bf_creator', sources = sources, includes = Split(incs), defines = defs, libtype='core', priority = 0 )