Getting started with python and Blender

Project wiki:Blender wiki
Related pages:#1161: Python

Create a simple tutorial on how to animate object properties with python...




Category:feature request» task




Related pages:+1161: Python


I am not sure how the API documentation is organized.

For example, in
I see:"MyMaterial")

but where is documented?
The following page does not tell much:
but leads to bpy.types.BlendData:
which leads to BlendDataMaterials
which has the property new()


Ok, that's a bit twisted, but I guess it's just a question of getting used to it.


Another example:

// blender-2.62-linux-glibc27-x86_64/2.62/scripts/presets/keyconfig/
wm = bpy.context.window_manager
kc ='maya')

Where is bpy.context.window_manager documented?
I go to bpy.context:
where there is nothing related to 'window' nor 'manager'.
I go to
which leads to bpy.types.BlendData:
where I find:

Window manager datablocks
Type : BlendDataWindowManagers bpy_prop_collection of WindowManager, (readonly)

but I don't find window_manager without an s and in this case (lower case with an underscore).


Ah! I found Context(bpy_struct)
which does list window_manager.... but I am not sure how I got there!

from there on, it's easier....: I window_manager is of type WindowManager, which has a keyconfigs property, etc.

but why isn't window_manager listed here:
Is this a bug in the documentation??


Title:Animation with python» Getting started with python and Blender
What's an operator?
It's nowhere defined.

I looked through Python operators in the Python docs, but it doesn't seem related to Blender operators.


Scripting examples for 2.5 - update: Mar 26th 2010