BPY exporter is a script that exports selected meshes into a Blender Python format.
It takes all selected meshes from the current scene and generates a script that re-create these meshes. It takes into account:
vertices coordinates
uv coordinates
size, position (relatively to 3D cursor), orientation
mesh and object name
Generated scripts are located into your <blender_dir>.blender\script directory and contain Blender specific header …
After each generation, BPY exporter performs an Update Menu so that newly added primitives are immediatly available from Script–>Add menu of Script windows
BPY exporter can be seen as the easiest way to add primitive mesh to Blender.
Non programmer can use it to increase their Blender productivity.
It can also be used by developpers willing to produce autonomous scripts embedding their own 3D content or dynamically creating 3D content.
BPY exporter is released under Blender Artistic Licence This archive contains the BPY Exporter script itself and its documentation.
Enjoy …
Jean-Baptiste PERIN
Known Bugs:
If no mesh is selected …it crashes on some PC…
If user changes target directory at export time , the newly created script is not added to menu
One feature suggestion, though.
I have installed multiple Blender versions and also use them all. So i have set my python script path to a different folder, that is shared by all Blender versions. (You can set that in the config panel in blender.)
So could you change you script so that it reads out the user-defined python path first, and uses that as default in the file-selector.
The user defined Python path is now properly handled … but I don’t know why … scripts that are generated in this directory don’t appear in the Add menu of the Script Window …