BPY Exporter : User Guide
by Jean-Baptiste PERIN
BPY Exporter is a script that allows to quickly and easily add new
primitive meshes to Blender.
BPY Exporter is a script that takes all selected meshes and generates a
python script that automaticaly re-build these meshes.
Generated scripts are placed into your <blender_install_dir>/.blender/scripts
directory so that they become reachable from your "Script-->Add
"
menu.
Generated scripts recreate meshes taking into account:
- vertices coordinates
- uv coordinates
- size, position, orientation
- mesh name and object name
BPY Exporter is the easiest way to add primitive to your Blender.
Thanks to ExportPython, even non-programmer can add they own menus to
Blender.
BPY Exporter can also be used by developpers willing to make script
that dynamically generate content.
HOW TO INSTALL THIS SCRIPT ?
Copy python_export.py
into the ".blender/scripts
"
directory of your Blender installation.
In a Script window, go to the "Script
" menu and click on "Update
Script
" entry
Now, still in a Script window, go to Menu "Script->Export
".
You should see a "Blender Python (.py)..
" entry.
HOW TO USE THIS SCRIPT ?
- Create one or several meshes
- Select these meshes (RMB click on them while keeping Shift key
pressed)
- Open a Script Window
- Go to menu Script-->Export-->Blender Python (.py)

- A file selector window appears with the filename field prefilled (the
file name is made with your mesh name ("WeirdSphere" in our exemple) if
only one mesh is selected .. and is made with your blender file name if
several meshes are selected). The directory used to store the file is
automatically set to your <blender_install_dir>\.blender\scripts
directory.
- Click on Export Python

- A script is then generated and is made available from the Add
menu of your Script window
.
- Click on a new location into your 3D view window to change cursor
position.
- (Re-)Open a Script Window
- Go to Add
menu
- Click on the newly created entry (your mesh name)

- A new mesh is created with the same name as the model with the
appropriate ".xxx
" according to mesh configuration in your
scene.
HOW TO REMOVE GENERATED SCRIPTS ?
Created scripts can be found into your .blender/scripts
directory.
Naming convention is "add<ObjectName>.py
"
To remove generated scripts and associated menu entries, just delete "add*.py
"
files and perform a Script--> Update Menu
.
HOW TO UPDATE GENERATED SCRIPTS ?
The name of the script generated by python_export.py
is
bound to your object's name (or file name).
If you run the BPY exporter script on an homonym object (or file), the
previous script will be overwritten by the new one.
You don't even have to perform a "Script->Update Menu
"
for this new script to be taken into account.
ANYTHING ELSE ?
ExportPython is released under Blender Artistic Licence
read the LICENCE file or visit:
http://download.blender.org/documentation/html/appendix_licenses_bal.html
Futur releases will be made available on:
http://www.zoo-logique.org/3D.Blender/index.php3?zoo=dld&rep=zip
Bug report, evolution requirements, remarks and comments can be posted
here:
http://www.zoo-logique.org/3D.Blender/newsportal/post.php?newsgroups=3D.Blender&type=new
Put [PythonExport] in front of the "Sujet:" field
(C) 2005 Jean-Baptiste PERIN -
released under Blender Artistic License - www.blender.org