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"
Generated scripts recreate meshes taking into account:
- vertices coordinates
- vertex group
- face mode, transp and mat
- uv coordinates
- material and procedural textures (allmost well and no image texture yet)
- 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
BPY Exporter can also be used by developpers willing to make script
that dynamically generate content.
into the ".blender/scripts"
directory of your Blender installation.
In a Script window, go to the "Script" menu
and click on "Update
Now, still in a Script window, go to Menu "Script->Export".
You should see a "Blender Python (.py).."
TO USE THIS SCRIPT ?
- Create one or several meshes
- Select these meshes (RMB click on them while keeping Shift key
- Open a Script Window
- Go to menu Script-->Export-->Blender
- 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
- 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
- (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
TO REMOVE GENERATED SCRIPTS ?
Created scripts can be found into your .blender/scripts
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
TO UPDATE GENERATED SCRIPTS ?
The name of the script generated by python_export.py
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.