description |
---|
How to run scripts in Blender |
Published: Feb 08 2024 by manavortex
Last documented edit: Feb 08 2024 by manavortex
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.
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:
- Click on the "New Text" button to create a new document:
- Click into the
Text Editor
panel directly below it - Paste the contents of whatever script you want to run (Hotkey:
Ctrl+V
) - Hit the Play button above the editor panel to run the script (Hotkey:
Alt+P
) - Optional: Look at the Python Console below the 3d viewport to see feedback
If your script doesn't work, Blender will have generated an exception1. 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).
{% hint style="danger" %} While you have text selected in the Blender System console, your Blender will be completely unresponsive. {% endhint %}
Footnotes
-
The technical term for "thing go brr". Give it to a Netrunner and he can use it to fix things. ↩