Commit Graph

18 Commits

Author SHA1 Message Date
Arystanbek Dyussenov
7c786e28c4 Merge with 2.5 -r 22173:22620. 2009-08-19 09:04:49 +00:00
Arystanbek Dyussenov
8fa528cef8 Added Object.find_armature() to find armature connected to object. Previously this was BPyObject.getObjectArmature() 2009-08-08 11:33:34 +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
7586990ace - modified BKE_get_image_export_path so that it writes relative path if src file = dest file returning 2 in this case
- modified unit tests for ^ firstly
- incorporated Image.get_export_path into FBX exporter script
2009-08-05 07:59:49 +00:00
Arystanbek Dyussenov
2065c5cf60 Merge with 2.5 -r 21756:22173. 2009-08-03 14:06:47 +00:00
Arystanbek Dyussenov
d8f4ab2d59 API:
- freeing strings returned by RNA struct functions in RNA_parameter_list_free

Unit tests:
- check that BKE_export_image actually creates a file. This test is becoming dangerous: it creates and deletes files under /tmp.

Having written this complicated test function I now realize it's much easier to write tests in a scripted language, which gives more 
freedom in expressions and need not be compiled.
2009-07-23 15:57:30 +00:00
Arystanbek Dyussenov
c96041628e API:
- 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
2009-07-23 12:55:26 +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
122d392fef Merge with 2.5 -r 21619:21756. 2009-07-21 12:13:56 +00:00
Arystanbek Dyussenov
122104b3bb FBX exporter conversion almost done.
Unit tests:
- add a check that BKE_copy_images produces NULL filepath for images having type other than IMA_TYPE_IMAGE
- also expect NULL filepath for images having empty filename

Enhanced BKE_copy_images so the tests pass.
2009-07-17 10:09:07 +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
fb150e12c5 - FBX exporter conversion continued
- added (uncommented actually) PoseChannel.pose_matrix
- added Object.dag_update that calls DAG_object_flush_update. I'm not sure if it's needed, but FBX exporter uses it.
2009-07-13 11:04:18 +00:00
Arystanbek Dyussenov
11a47a02c7 Added Action.get_frame_range returning a (min, max) pair or (0, 0) if there are no keys. 2009-07-12 06:59:57 +00:00
Arystanbek Dyussenov
f221d9128d Added Scene.set_frame RNA function to get immediate scene update.
Changing Scene.current_frame doesn't work in this case because it adds 
a notifier.

Also added RNA_property_update call in pyrna_struct_setattro so that 
notifiers are added when a property changes.
2009-07-11 11:58:50 +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