9
$\begingroup$

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.

$\endgroup$
1
  • $\begingroup$ If you hate the blender Python Text Editor, there is this new tool Bacutor, has intellisense, bacutor.freeiz.com $\endgroup$
    – Ray Zee
    Dec 12, 2018 at 7:10

5 Answers 5

10
$\begingroup$

Python is useful in three ways:

  • Scripting and addons

  • Drivers

  • The Game Engine

Scripting and addons:

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:

$\endgroup$
4
$\begingroup$

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()
$\endgroup$
3
$\begingroup$

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.

$\endgroup$
3
$\begingroup$

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.

$\endgroup$
1
$\begingroup$

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

$\endgroup$
1
  • 2
    $\begingroup$ 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? $\endgroup$
    – CharlesL
    Mar 12, 2014 at 13:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .