Saturday, March 6, 2010

Python 3, Part 1 (Expressions)

The goal of this tutorial is to introduce Blender users, whether or not they are programmers, to Python 3. Blender 2.5 supports Python 3 scripts, which can let you program Blender behavioer very precisely. Of course, before you can create Blender scripts, you need to know Python 3. We will use the Blender 2.5 Scripting environment, which includes a Python console that supports most (but not all) of Python 3, as well as a fully featured text editor, with advanced features such as autocomplete and automatic indenting of code. I will point out where Blender's Python implementation differs from the standard Python 3 distribution. There are minor differences, none that should prevent you from writing fully featured scripts in Blender 2.5.