Experimenting with cross-compiling my branch with MinGW on Linux:
- tweaked config/linuxcross.py, source/blender/makesdna/intern/SConscript and tools/Blender.py
So far linking fails.
I needed this to make sure that BKE_copy_images works properly,
probably will be useful in future.
Using Check framework (http://check.sourceforge.net/doc/check.html/index.html).
WITH_BF_UNIT_TEST option builds 'alltest' program under [BUILDDIR]/bin,
which, when executed, runs unit tests, currently only 1.
Example output:
----------------------------------------------------------------------
Running suite(s): Image
0%: Checks: 1, Failures: 1, Errors: 0
tests/alltest.c:74:F:Core:test_copy_images:0: Expected //bar/image.png to be translated to /tmp/bar/image.png, got /tmp/bar/image.pn.
----------------------------------------------------------------------
Spent lots of time (a couple of days actually :) to figure out how to
link the test program with Blender libraries. As it turned out there
are circular dependencies among Blender libraries. GCC by default
doesn't expect circular dependencies - dependant libs should precede
libs they depend on.
The magical --start-group linker option helped to solve this
(http://stephane.carrez.free.fr/doc/ld_2.html#IDX122).
Also:
- added bpy.util module. bpy.sys.* functions will move here later
- added bpy.util.copy_images that uses BKE_copy_images
- export_obj.py uses bpy.util.copy_images
Current issues:
- NURBS - needs API additions
- "all scenes" export - cannot switch scene in bpy
- normal calculation, disabled
- duplis - need testing, only dupliverts tested
- matrix problem
- UI, 18 options currently don't fit into filesel panel, will do manual lay out once it's available
- probably others...
BPY:
- made operator "execute" method required to avoid crash
- added bpy.sys module which replicates old "sys" module
API:
- replaced create_*_mesh with a single create_mesh accepting type parameter
- added Mesh.create_copy to create a copy of a mesh with 0 users
Ran `dos2unix` on source/blender/python/SConscript
context.add_fileselect(self.__operator__).
To allow file selector, I made the following changes:
- moved property definition funcs (FloatProperty, etc.) to "bpy.props"
to make them accessible from io scripts. Previously they were only
accessible in scripts running from Text Editor.
- added the "__operator__" instance attribute to py operators. The value
is RNA operator pointer.
Note that "context.add_fileselect" changes were mistakenly committed
with my last merge.
traverses scripts in .blender/io extracting and registering Operator
subclasses, and binding to menu items under Scripts->Export in Scripts
Window.
release/io dir has to be copied to .blender manually for now.