Blender 2.5 Python Code Snippets

ThomasL writes:

With the arrival of the Blender 2.5x versions of Blender, Python scripting is taken to a new level. Whereas the Python API up to Blender 2.49 was quite incomplete and ad hoc, the API in Blender 2.5x promises to allow for python access to all Blender features, in a complete and systematic way.

However, the learning curve for this amazing tool can be quite steep. The purpose of these notes is to simplify the learning process, by providing example scripts that illustrate various aspects of Python scripting in Blender.

The focus is on data creation and manipulation. Here is a list of the topics covered:

  • Meshes.
  • Vertex groups and shapekeys.
  • Armatures.
  • Rigged mesh.
  • Applying an array modifier.
  • Three ways to construct objects.
  • Materials.
  • Textures.
  • Multiple materials on a single mesh.
  • UV texture.
  • Object actions.
  • Posebone actions.
  • Parenting.
  • Drivers.
  • Particles.
  • Hair.
  • Editable hair.
  • Texts.
  • Lattices.
  • Curves.
  • Paths.
  • Camera and lights.
  • Layers.
  • Groups.
  • Worlds.
  • Render settings and viewports.
  • Batch run.

Some of the things that you will not find in these notes, at least not in the present revision:

  • User interfaces, button layouts, etc.
  • Macros, acting on what is currently selected.
  • Nodes, for materials, compositing, etc.
  • Game engine stuff.
  • Brushes and sculpting.
  • Advanced rendering, video compositing, …

Links

Advertisement