This is the amazing Python script for exporting blender models to XML
that can be loaded by the standard java.beans.XMLDecoder class (since
1.4) and cast to the standard Java3D Shape3D object. All clear now?

This allows you to take your amazing Blender models, and bring them
across into your Java3D game / app / whatever.

To use it, you must first select an object you would like to export (in
blender)
then load the script export.py, then run it. A file is created for each
different Material the mesh has. This is because a Shape3D object can
only have a single Appearance node. (But you already knew that)

To load the XML into Java, the following does nicely; XMLDecoder e =
new XMLDecoder(
new BufferedInputStream(
new
FileInputStream(filename))); Shape3D fred =
(Shape3D) e.readObject();

You can see this in action in the demo. To run the demo, go to the demo
folder and run

java Viewer

Under windows I think you can just double click on the Viewer.class
file, and it will start up, not sure.
There's also a Java3D demo using keyframes, it's bundled in a jar file.

java -jar moo.jar

ithink you can probably double click on that one in windows too.

If you get a class not found "java.beans.XMLDecoder" it probably means
you don't have a new enough java runtime, you'll need atleast 1.4.

If you get a class not found "GraphicsConfiguration" or the like,
there's a problem with your Java3D installation (did you do one?).

ChangeLog

1.1
- Gasdia Roberto has added support for textures!!!
His work is truly awesome, he's responsible for the funny two legged
dinosaur demo too.
- Added demo of keyframe animation (moo.jar)

1.0.1
- Added a warning about blend2java not exporting a
mesh without atleast one material assigned to it, to this document
- Added a recent changes section to the
documentation.
- The code hasn't changed at all.