blenderpycontalk

Table of Contents

1 Brief introduction to Blender

Explain Blender as a fully featured 3d suite: modeling, animation, compositing, etc.

1.1 Show a couple of render stills

1.2 Possibly show a couple seconds of a python-generated animation

2 Brief demo of UI

2.1 Open a new file

2.2 Add a cube

2.3 Show the cube being animated from point A to point B

This should be pretty quick to demonstrate. Will be necessary for explaining the Blender's datastructure next.

3 Introduction to bpy

3.1 What is it?

  • bpy is Blender's new Python API
  • Pretty much a complete overhaul of the Python API in 2.5X from the 2.4X and previous API
  • A lot of it is "automatic" thanks to the RNA and operator designs of Blender 2.5X

3.2 bpy.data: Exploring Blender's datastructure

3.3 bpy.ops: Operators

3.3.1 Discovering operators for your scripts: Blender 2.5 is self-documenting

  • Grab and move a cube, look at the logging
  • All key commands are bound to operators, all buttons are operators.
  • We can find a python equivalent by doing an action and checking the logging or

3.3.2 bpy.types.Operator.execute(): operators as actions

Demonstrate some hello-world type examples

3.3.3 bpy.types.Operator.draw(): operators as UI elements

  • Demonstrate some hello-world type examples
  • Also demonstrate properties-as-ui-elements

3.4 Panels in the UI

Scripting the UI is pretty much the same as scripting the operator, but it goes to a separate location..

4 Some real-world examples

4.1 The simple "library loader" panel we're using in Tube

4.2 Making tools for the wargames-esque animation from Patent Absurdity

Author: Christopher Allan Webber

Date: 2010-12-06 11:35:17 CST

HTML generated by org-mode 7.02trans in emacs 23