The Blender Cookie with a two part tutorial for Blender 3D covering the creation of meshes using python scripting and from that Python data, creating a basic mesh exporter. Cool stuff!

Creating a Mesh from Python Data – part 01 from CG Cookie on Vimeo.

In this first segment of our 2-part Blender 2.5 video tutorial, we will be covering the creation of Meshes using Python. First we will be creating a simple script that will generate an object. We will create arrays of vertices & faces and use these to create Mesh Data for our object. We’ll then take a look at how to turn this into an add-on so it will appear in our ‘Add Mesh’ (Shift+A) menu. This will effectively allow you to have a sub-menu with custom meshes, ready to be used in any project!

Exporting Mesh Data To A TXT-File from CG Cookie on Vimeo.

In this followup of our Blender 2.5 video tutorial on Creating a Mesh from Python Data, we will be writing a very basic mesh exporter to accommodate for our ‘custom objects’ add-on we wrote in the previous part. We will also be updating our previous add-on, as there has been another API update. We will first be going over how Blender handles faces and vertices internally, as well as how to present them in a usable manner. We will then go ahead and write this data to a simple txt-file from which we can easily copy-paste what we want for use in our previous script.