How Do You Use Blender With Python?

TIME : 2016-01-08
How Do You Use Blender With Python?

Blender and Python go hand in hand, and there are several ways to use them together. In fact, Python is woven right into Blender's core.

Blender's user interface was written in Python, and most of its commands and menus are actually Python functions under the hood. Blender even includes its own Python interpreter and uses it extensively. To start, head to the Scripting view, where you'll find an interactive console. The Python version depends on your Blender version, but newer releases typically use Python 3.x. You can interact with it in command-line mode just like any Python interpreter.

The Scripting view also has a text editor optimized for Python. Turn on syntax highlighting and browse the Templates menu to explore ready-made scripts, many of which you can run directly to control Blender. This lets you build automated scenes through code. Finally, you can use a Python script as a controller in Blender's game engine, taking input from sensors and sending output to actuators. With a bit of coding, you can turn the game engine into a full-fledged 3D game development toolkit.