My Blender scripting blog


I started this month as an intern at the Catholic University of Leuven, and my assignment is to try a write a few UI-panels in Blender 2.5 for the Blender for Robotics project.

Until a few weeks ago I had no experience in Blender scripting, and only a very little in Blender in general. So I thought it would be nice to document my progress through the following weeks in a blog, and maybe there is someone who can use is afterward for her/his own learning process of Blender scripting.

You can find the blog at:
You can always ask me questions, give me new idea’s or let me know what you think. And lets hope I find my way in the Blender scripting maze through the next weeks.

Nice your example!
I wonder where to find ‘all possibilities’ like this:
row.operator(“slctbtn”, text=“Select”)
Meaning, where is row(.operator) to be found in the API?

PKHG: row and operator are both part of UILayout

Xochipilli: interesting blog and nice to see that you take the time to write an analysis of the script example you provide. Very useful for other people. Two minor comments about the script of July 7th:

  • context (one of the two arguments in draw_header) doesn’t give the context that generated the event, but returns the context in which the header is drawn.
  • you could shorten the operator by replacing the content of the invoke function with
context.object.selected = not context.object.selected

Good luck with your project.


Thanks, for the correction and the suggestion. I will update it.

I added a new post to my blog. It describes a very simple script for appending an object from a file.
Let me know what you think.

I made a new post which is a little variation of my previous post.

This post comes with a question:

I hope you like the script, and if anyone knows how to append/link objects with maintaining the parent/child links and without the needing of a group, contact me please. Or If you can explain why appending a group creates a duplicate object, I’m eager to know.

If you know the answer, I would be happy to know ;).

Just gave it a read. Would have been useful to me when I started learning 2.5 scripting had I known about it. Nice work and good luck on your project.

Thanks :slight_smile:

I already made a new post.In this post I wrote a script where you can select an object through a dropdown box.

Very useful blog Xochipilli. Keep up this nice blog :slight_smile:

By the way, in your last drop down box script example, there is something wrong. Object selection isn’t correct. When I want to select Lamp, Cube object is selected instead. What’s the problem here?

My fault, I used the wrong version of my script :rolleyes:, I corrected my blogpost. In line 54: obj =[] had to be changed to bpy.context.scene.objects[], because update uses this to make the EnumProperty. Because the 2 are different collections, the indexes of the different objects can vary. Thanks for noticing.