Commit Graph

21 Commits

Author SHA1 Message Date
Campbell Barton
d987003608 remove rna function convert_to_triface because it uses an internal editmesh function and only the OBJ exporter called this.
Converting to tri's on export isnt very important.
2009-09-23 01:35:45 +00:00
Arystanbek Dyussenov
c8af263e5d Reverted Mesh.verts from dynamic array since it breaks foreach_set used by import scripts.
Did a few fixes in scripts to reflect recent RNA changes.
2009-09-14 14:55:49 +00:00
Arystanbek Dyussenov
675936b42c - ran 2to3 on export_3ds.py, import_3ds.py and export_x3d.py
- added operators and menu items for ^
2009-08-10 13:49:55 +00:00
Arystanbek Dyussenov
01eedc5046 - OBJ importer now reads most of the test files. Had to copy BPyMesh.ngon function to OBJ import code
- added MeshEdge.fgon property, not using it yet
- fixed in bpy_rna.c to correctly read arrays returned from RNA functions
2009-08-06 12:22:50 +00:00
Arystanbek Dyussenov
bf90970eca - OBJ exporter now copies images
- added OBJ, FBX scripts to File -> Export, File -> Import menus
2009-08-05 09:49:59 +00:00
Arystanbek Dyussenov
d63d703842 - added operator for OBJ importer plus some python 3 conversions 2009-07-24 14:26:47 +00:00
Arystanbek Dyussenov
00e219d8e9 FBX exporter:
- made an operator with props for UI. UI is still "raw"
- ran 2to3 on export_fbx.py to make it python 3-compatible

Next: testing/fixing.
2009-07-22 13:35:02 +00:00
Arystanbek Dyussenov
aede14d4e0 - replaced Object.create_mesh body with 2.4x API's Mesh.createFromObject code to also support curves, surfaces and metaballs.
- replaced Object.dag_update with Object.make_display_list, which copies old API's Object.makeDisplayList
2009-07-16 13:19:43 +00:00
Arystanbek Dyussenov
73ad2d320c More FBX exporter conversion.
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.
2009-07-16 08:20:15 +00:00
Arystanbek Dyussenov
3ad64726ee Merge from 2.5 -r 21285:21515. Thanks Joshua! 2009-07-11 09:14:12 +00:00
Arystanbek Dyussenov
797c6a2295 - RNA-wrapped Bone props: head, armature_head, tail, armature_tail.
- more FBX conversion
2009-07-10 14:46:52 +00:00
Arystanbek Dyussenov
f7438ff77a - slowly starting FBX exporter conversion
- added Bone.matrix and Bone.armature_matrix
2009-07-07 19:13:05 +00:00
Arystanbek Dyussenov
ad0b2c87d5 Integrated unit testing framework with scons on Linux.
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
2009-07-07 08:38:18 +00:00
Arystanbek Dyussenov
617851bf21 - added API functions:
- Mesh.calc_normals
 - Object.add_vertex_to_group
 - Main.add_material
 - Main.add_texture
 - Material.add_texture
- OBJ importer conversion in progress
2009-07-02 20:46:35 +00:00
Arystanbek Dyussenov
1557736756 OBJ exporter working (Python 3.0), but needs testing and fixing.
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
2009-06-28 13:29:03 +00:00
Arystanbek Dyussenov
f6267e2a26 Moved struct DupliObject to DNA_object_types.h.
Object.create_dupli_list now works ok.
2009-06-19 12:46:51 +00:00
Brecht Van Lommel
dc7028cee4 Branch soc-2009-kazanbas
Merge with trunk revision 20991, and update scripts for the changes too.
Reload Scripts and Export OBJ still work for me.
2009-06-18 19:59:20 +00:00
Arystanbek Dyussenov
556369fe2f The basic OBJ exporter working. The code is release/io/export_obj.py.
To run it, switch to Scripts Window, click Scripts->Reload Scripts 
menu, it appears under Scripts->Export.
2009-06-16 08:54:38 +00:00
Arystanbek Dyussenov
678417b76c Added copy_applied method on Mesh objects. Uses DerivedMesh funcs to
get a mesh with all modifiers applied.
2009-06-15 13:49:02 +00:00
Arystanbek Dyussenov
c7cdb9cc38 File selector working. For now it is accessed as
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.
2009-06-15 08:12:28 +00:00
Arystanbek Dyussenov
23eecb1e6e Import/export operator registration working. Written in python, it
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.
2009-06-12 09:54:28 +00:00