Blender: Running Python Scripts

How to run scripts in Blender

Summary

This page will show you how to run Python scripts in Blender. It's not strictly speaking part of the Blender plugin, but I had to put this somewhere, and it's least out of place here.

The Scripting perspective

To run scripts, you need to switch to the scripting perspective. Click the corresponding entry on the perspective toolbar at the very top:

The script panel looks like this:

Running a script

  1. Click into the Text Editor panel directly below it

  2. Paste the contents of whatever script you want to run (Hotkey: Ctrl+V)

  3. Hit the Play button above the editor panel to run the script (Hotkey: Alt+P)

  4. Optional: Look at the Python Console below the 3d viewport to see feedback

Troubleshooting

If your script doesn't work, Blender will have generated an . To look at it, toggle Blender's System Console:

Copy the contents of the console window, or pull it as big as your screen allows and take a screenshot. Give this information to the Netrunner who told you to run the script and watch as they fix it.

If you don't have a Netrunner (or if you are that person), this is where you hit up Google or ChatGPT (you can skip the steps 1-5 in the linked guide).

While you have text selected in the Blender System console, your Blender will be completely unresponsive.

Last updated