Free e-book about writing Python scripts for Blender 2.5

This is a booklet (135 pages) for those, who are familiar with the basic Python programming concepts, and have some knowledge in Blender (but they may know nothing about Python in Blender):
(Click this picture, to go to the page with this e-book -

I am presenting here a complete IDE for writing Blender add-ons. It is based solely on the Open Source, multi-platform software: Eclipse and its PyDev plugin. It offers an user-friendly, graphical remote debugger, intelligent Blender Python API code autocompletion, and other features, which make the writing of a longer script easier.

The best way to present such a tool is to show it in the real work. Hence you will find here a step-by-step description of creating a Blender add-on.
It is simple, but non-trivial plugin, implementing the “destructive” Bevel command. I am showing here not the ready solution, but the whole process - from the problem to solve (the lack of the Bevel command in Blender 2.5) to the ultimate Blender plugin. In this book you will learn how to deal with the Big Unknown - the Blender Python API, with its thousand classes and properties, and its quirks. I am showing here how to find the solution, not wasting the time for the other aspects of its endless possibilites :).

If you want contribute to this work, just let me know about any grammar/style or any other error, which you can find in this book. I did my best to write this publication, but I still want to improve my English - to write my next books even better!

Thanks for sharing. But, please you could share also a non-PDF version? I mean PDF is for printers, but I prefer to read the books in ePub or .xhtml format and is a pain in the ass to convert a PDF to ePub. A .html or .doc or something that is more ePub friendly? Much appreciated the effort to make this. Thanks again. its free and can convert from pdf to epub or a ton of other formats.

wow, this looks great
in the past I wanted to fool around with python scripting but the lack of debugger support in the blender text editor made it look like a lot of trouble. I haven’t actually worked through this yet but it looks like you have hooked eclipse into blender to supply a modern IDE environment to work in. I’ll definitely be digging through your e-book. thanks for producing such a nice resource


Converting pdf to .epub with calibre is generally a pretty poor solution. I’ve tried it many times and the results vary from very poor to unreadable. PDF simply isn’t meant to easily convert to other readable/searchable formats.

It’s a pretty good bet that a heavily graphic intensive, complex layout .pdf like this one would not convert well.

Thanks Witold Jaworski I will have a read in the evening and let you know if I find thing that needs corrections. By the way, just providing this sort of resource is appreciated by the community. Thanks you.

Thank you, I am happy that you have found it useful.

grafixsuz, let me know what I should correct.

artisanicview: Yes, the source of this book is just a Word *.doc file. But, as a typical author, I would like to give the Reader “the polished product”, not something that looks like “work in progress”. The automatic conversion tools are just like “meat grinders” (this term is used by one of the most popular e-book service: They are good at “chopping” of a classic book that contains just “words, words, words” (as Hamlet said :D). My book contains plenty of mixed graphics: vector (the callouts) and raster (the print screens). It also contains internal hypertext links in each reference to another page. I am afraid, that a standard conversion tool will greatly degrade these features, in the best case.
Currently it was easier for me to prepare the “traditional” PDF book, because I am used to it. I have learned about the e-pub format a few months ago. I have just checked its documentation, to have an idea about the input that I should prepare, to obtain the good result. (I have to prepare my own “pipeline” for creating the e-pub versions of my books). On the other hand, I am curious how many of the e-book readers have the color, 1024px wide screen? The pictures in my books are in color, and the shades of gray would degrade them greatly… It seems that the IPad is the #1 on this list, there is also the Nook color reader, but is there something else?

… On the other hand, I am curious how many of the e-book readers have the color, 1024px wide screen? The pictures in my books are in color, and the shades of gray would degrade them greatly… It seems that the IPad is the #1 on this list, there is also the Nook color reader, but is there something else?

I think any single decent Android tablet have at least 1024px wide screen in landcape mode. Also this days you can find HP Touchpat tablet for just 99$. Unfortunately HP is closing his mobile business so they are selling the stock.

I skimmed over this early this morning and so far it looks like it’s going to be an invaluable resource for learning Python with Blender.

Thank you for taking the time to write and produce this. I’m not sure what your plans are, but I personally would talk to Ton about perhaps getting this featured on the store, or on the main site as it’s incredibly insightful and in-depth about the procedures.

So once again, thanks! :slight_smile:

Very cool and useful! Thanks for this =-D

Thank you!
Yesterday I updated it, according to the reader’s comments and suggestions, collected during last two weeks.

Hi Withold

Do you know if SPE will be/ever updated for Python 3+ and Blender 2.5+? SVN shows some recent activity. I asked on Stani’s site, but no response yet. I remember seeing a commit ages ago to the Blender site about SPE from you, or am I mistaken? I would have though SPE a better fit than Eclipse and PyDev? Thanks!

Dorro, as I wrote in the introduction to this book:

  • I think that Eclipse + PyDev is better solution than the previously proposed SPE + WinPdb, at least because of the code autocompletion feature;
  • SPE and Winpdb are tied to Python 2.x because of the window library, they use. As long as it is not compliant with Python 3.x, there is just one solution: rewrite both programs for any other window library. It means, in fact, to write them again (as Blender 2.5 has been rewritten!).

Thanks Witold! I have downloaded your e-book, gave it a quick scan and it looks very useful. I will have a go at setting PyDev and Eclipse up at home on Ubuntu 11.04 this weekend.

thanks for work, very verry helpful.

Hey, this looks exciting. I’ve been pretty frustrated with google searches for blender + python always leading me to great tutorials in blender < 2.5 which means most scripts are broken because of all the interface changes.

I’d love to join the editing team to help with clarity and grammar.
I downloaded the pdf from the link on the first post. There is mention of another edition including some corrections made by some people on this forum. Is there a “head” version that we can download in a format easy for us to collaborate together?

My first suggestion
From page 4… refering to the text editor:
“It is enough to create simple scripts, but begins to interfere when you create a larger program.”

It’s easy to understand what you are saying, but the second half of the sentence seems a bit strange.
I would suggest replacing “but begins to interfere when you create a larger program” with
positive approach: “but much better tools are avaiable and necessary for creating a larger program.”
negative approach: “but it is inadequate if you want to create a larger program.”

If someone can point me to the “head” revision and the current toolset being used by the helpers, i’d like to join in.


Good for converting docs into various formats

Thanks for this awesome resource. It is exactly what I was looking for and serves as a great intro to writing Blender scripts, too.