Automating repetitive tasks in Blender

In this video we show how to automate tasks in Blender:

Written version:

Sometimes you need to repeat the same actions in blender over and over again.

When it’s a simple action like duplicating and then moving an object we can simply hit shift+r to repeat the latest command.

That shortcut however no longer works when we need to perform several different steps together, and then repeat that. Here’s an example where we are creating a drill bit, which requires us to first extrude two blender units on the x axis and then rotate the result 90 degrees.

If we set this to smooth shading and add a subdivision surface modifier, you can see how it starts to resemble a drill bit.

The problem is that if we want to make this drill bit longer, it becomes quite tedious to keep extruding and rotating again and again.

Luckily there is a better way to do this. Let’s just first expand our info window to see all the commands that we are entering.

If we now do these steps one more time, we can see how they are represented here as python code. Now we can simply select those last two steps and copy them to the clipboard with ctrl+c.

We’ll then open up a text editor, create a new text, and paste those lines of code in.

We’ll add the “import bpy” text at the top and let’s also add some line breaks.

Now we can simply hit the run script button, to have blender automatically repeat those steps, or we can simply hit the keyboard shortcut alt + p to make it even faster. Now it’s very easy to create as long a drill bit as we need.

Thanks for watching and see you next time on one minute video!

Thanks to Youtube user BBROSint for the drill bit tutorial from which the technique used in the example was taken from!

Leave a Reply

Your email address will not be published. Required fields are marked *