[Bf-python] comments on writing an exporter

Peter Amstutz tetron at interreality.org
Wed May 28 10:25:43 CEST 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Greetings.  I'm glad to see an active mailing list for Blender Python
development has finally appeared!

I am working on a open source multiuser virtual reality project
(http://interreality.org) and I have been interested in making Blender one
of our primary content creation tools.  I have written a python script
that exports from blender to my own file format, and I have some comments.
These only apply to 2.26, so please tell me if something has/has not
changed in 2.27:

* There is no way to access texture data.  I need either the filenames of
the images used for textures, or the texture data itself (preferably
already packaged in jpeg or png format).  The 2.26 doesn't support this at
all.  The best I could do was look at the name of the texture node and
deduce that it was a filename, but that's a total hack ;-)

* No file dialog for getting a filename from the user.  I understand this
has already been fixed?  I'd also like to be able to prompt for arbitrary
text and/or numerical entry.

* To export the camera orientation I am calling obj.getMatrix() on the
camera object.  This matrix seems to be garbage, as the exported
orientation simply does not match up with the way the camera was oriented
in blender.

* Is there a way to find out how a texture is applied to a polygon other
than in terms UV coordinates?  I would like to support all the various
ways of applying textures supported by blender but to do so I need to get
the raw texture matrix from blender.

* The documentation is terrible, but we all knew that already :-)  I've
been grepping through blender/intern/python/modules/Blender to figure out
how to do anything

* From a convenience point of view, I'd like to be able to bind the python
script to a menu item so that I don't need to open the text editor and
type alt-p every time in order to run the export script.j

Overall I have found the Python API to be fairly reasonable (once I
figured out how to do what I needed) and I'm very glad to be using Blender
- -- there's just a few things that need to happen before using my export
script is seamless :-)

[   Peter Amstutz   ][ amstutz at cs.umass.edu ][ tetron at interreality.org  ]
[Lead Programmer][Interreality Project][Virtual Reality for the Internet]
[ VOS: Next Generation Internet Communication][ http://interreality.org ]
[ http://interreality.org/~tetron ][ pgpkey:  pgpkeys.mit.edu  18C21DF7 ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+1HKMaeHUyhjCHfcRArGNAJ44eXRZYgY4F3ZPVmIGdyWDKioVNwCePY2A
s2HYKqCFy6CN+EZ0B7uAPfQ=
=Dils
-----END PGP SIGNATURE-----




More information about the Bf-python mailing list