# Advantages of using Python in Blender for Animation?

How can it help aid animation? I'm learning Blender and want to know what reasons there are for using Python. I've seen some videos on YouTube of people using it.

• If you hate the blender Python Text Editor, there is this new tool Bacutor, has intellisense, bacutor.freeiz.com – Ray Zee Dec 12 '18 at 7:10

Python is useful in three ways:

• Drivers

• The Game Engine

Python allows you to automate actions with blenders existing tools to speed up workflow and add functionality that would be (practically speaking) impossible to do manually.

Here are some nice examples of what can be done with python addons:

# Drivers:

Drivers can be used to set properties from other properties, e.g. a python function, the location of an object, or another setting.

This can be very useful for animation, among other things/

From the wiki:

Drivers can use properties, numbers, transformations, and scripts, to control the values of properties.

Here are some nice examples of what can be done with drivers:

# Game Engine:

Python can be used in the game engine to control the behavior of objects (e.g. AI), the way the view looks (e.g. custom shaders), and interactions with the user (e.g. menus).

Here are some nice examples of the BGE in action:

Its hard to answer your question since you just say Help with animation, For any kind of detail you would need to say what problems you have with existing tolls tools that you imagine Python may be able to help you with.

Blender's tools might do everything you need, in that case theres probably not so much use for Python.

However when you start doing larger, more involved projects - inevitably you start having to solve problems outside the scope of the default toolset.

Some times you can find pre-made extensions, other times you may want to start scripting a little yourself.

However this applies to any area of Blender, not just animation.

As has been mentioned, drivers are the obvious area you may want to learn at least basic Python for.

Another thing that was not mentioned, you may want to write one-liners in the Python console, these can speedup your workflow with some quick automation, without you having to become a Python expert.

eg, rename selected bones to add a prefix and lowercase the name:

for b in C.selected_editable_bones: b.name = "prefix_" + b.name.lower()


While the other answers are good, one of the most common uses for scripting in any animation package is writing scripted rigs. Scripting a rig often makes the rig a great deal more flexible, reusable, and easier to edit. E.g. adding a bone to an IK chain becomes really easy when you can rebuild the entire rig from scratch by just executing a single command.

There are other uses like this muscle sim, which are covered by "adding functionality," from the other answers.

You can use python for automating recurring tasks which would boring or too time consuming. In short for automation like: Mapping an algorithm to an animation.

Or to add new functions like the ones you know from the add-ons: to grow trees (sapling), create landscapes, create full rigs (rigify) and much more.

python is also useful to create scenes/animations based on external data (e.g. large lists of coordinates of objects to be displayed)

• Can you list a few examples where it helps, so the person who asked the question can have a better idea of why python is useful with lists? – CharlesL Mar 12 '14 at 13:12