Export your Blender objects straight to Away3D, Papervision3D and Sandy!Posted by Dennis on Jan 2, 2008 in 3D, ActionScript, Blender, Flash, Flex • 249 comments
This script enables you to export Blender objects to ActionScript 3.0 objects. This way you no longer have to load external (Collada) files. Supported 3D engines are:
Flash & Flash Developer’s Magazine offers a free PDF version of the issue that contains the “Blender to Flash workflow” that was written by me. You can download it here.
Download this zip file and extract it to:
- Windows: /Blender Foundation/Blender/.blender/scripts/ (Blender .2.46: C:\Documents and Settings\<username>\Application Data\Blender Foundation\Blender\.blender\scripts)
- Mac: /Applications/blender/blender.app/Contents/MacOS/.blender/scripts/
Open Blender. The “Export > ActionScript 3.0″ option should appear in the file menu:
How to use the ActionScript exporter
First make sure that the Blender object satisfies the following preconditions:
- Make sure it is triangulated (edit mode > ctrl + t, not necessary if you’re using Sandy 3.1)
- Make sure the object is selected
Go to File > Export > ActionScript 3.0 Class. Fill in the necessary details in the exporter dialogue:
- Sandy 3.0 Example
- Away3D Example
- Away3D Lite 1.0 Example
- Papervision3D 1.7 Example
- Papervision3D 2.0 Example
The Blender file is included.
Please report any bugs, issues or requests by commenting on this post. Thanks!
10-08-2008 UPDATE: This script has been updated and is now compatible with the latest Away3D and Papervision3D versions. It also contains a bugfix for the dropdown menu.
28-05-2009 UPDATE: A comprehensive tutorial about the Blender to Flash workflow was published in Flash & Flex Developer’s magazine. More info here.
11-06-2009 UPDATE: The script can now also export all the objects in the scene at once. Also fixed a positioning bug.
17-06-2009 UPDATE: Added support for multiple selected objects and fixed an error that occurred when a non-mesh object was selected.
23-09-2009 UPDATE: Away3D Lite 1.0 is now supported.
30-09-2009 UPDATE: Tidy up. Externalised the script templates.
28-10-2009 UPDATE: Added support for the haXe Sandy port. Big thanks to Paul Fitzpatrick.