Running a python script


A full how-to for people with zero knowledge about python

Home

News

Running a python script

Domical Vault script

Previz Storyboard script

Hotspots script

Miscellaneous scripts

Links

Contact

On this website you will find a large number of python scripts for blender. They are usually in the form of a .py file. To have a look at them you can simply open such files in notepad or a similar programme. When you open them and it starts with #!BPY the script has BPY information and can be integrated into a blender menu.
There are 2 main ways of running python scripts:

Scripts without BPY information

This method can also be used for scripts with BPY information

1.   Copy the text of the script (on windows: ctrl+c)
2.   Open blender
3.   Go to the text editor menu
4.   Create a new file (alt+n)
5.   Paste the script (on windows: ctrl+shift+v)
6.   Run the script (alt+p)

Scripts with BPY information

1.    Place the .py file in the following folder: ***/.blender/scripts
       *** = the basic blender folder where you installed blender
2.    Open blender
3.    Go to the scripts window
4.    Your script can now be found in the "Scripts" menu (to the right         of the snake). If it isn't there, you first need to update the menu 
        by opening the "Scripts" menu and then clicking "Update Menus"

Errors

Once you execute a script several errors can occur.

1.    Some scripts need a full python install. For blender 2.48 on
        windows that would mean python 2.5.x
        Also don't forget to set your python path correctly.
2.    Some scripts needs certain parameters to be set up, before they
        can be executed. This information is normally provided along
        with the script.
3.    The script contains an error. If you suspect this is the case the
        best thing to do is to contact the author of the script. The
        author will probably be very greatful for bugreports and help
        you further.

[Back to top]