From BlenderWiki
[edit] Scripts User Manual
Using a script is very easy: just select it from a menu. If the script has a user interface, a window will change to a Scripts window (look for the little green python/snake) and the interface will be shown there. An interface is used by the script to allow you to set options and enter parameters that guide the script in performing its function, just like all the buttons and fields in Blender. If it does not have an interface, it just does its thing and exits. All scripts may put out messages in the Blender Console window to let you know status or about errors it encountered.
[edit] About Python
- Python is an object-oriented programming language.
- Python is Blender's Scripting Language.
- The Python program is a separate Download from Blender.
The Python program is used to run many scripts, it is not needed to run all scripts or write scripts, but if you use scripts it is much better to install it. Some scripts will not work without Python.
The Official website for Python is here: http://www.python.org/
It is Important to download & install the Version of Python that Blender was compiled with.
For Blender 2.48a: Windows OS: Python 2.5.2 http://www.python.org/download/releases/2.5.2/
For other OS types please check on the Blender Download Page.
[edit] Tips and Tricks
Python can be a very dense language, with embedded functions and such. Here are some handy one-liners and other trivia:
- to get a list of children for a parent object myparent: obList = [ob for ob in scn.objects if ob.parent is myparent]
- a syntax error on an apparently good line of code may be caused by a missing ) or " on the line above it
[edit] Installing Scripts
Comprehensive Script Use/Install Tutorial
Quick Tutorial
[edit] Running Scripts
There are two places to find and use Scripts in Blender. Commonly used scripts are accessed by the specific window menu for convenience. For example, the UV/Image Editor window has, under its Image menu item, a Fix Broken Paths script available. Clicking on that menu item runs that script.
The second and all-encompassing way to find and run a script is through the ScriptWindow. If you select the Scripts menu item, a popup menu lists functional groups of scripts. Hovering or selecting a function pops up the list of available scripts within that group. These functions relate to the workflow of CG animation and rendering.
[edit] Refreshing the List of Available Scripts
An additional menu item, Update Menu, causes Blender to go out to the Scripts directory and scan all the python files to refresh the list of available scripts within each group. Use this menu item if you have added any .py files to the Scripts directory during your Blender session.
[edit] Trouble Shooting Scripts
Sometimes when you run a script it will not work or produce an error. The reason for these errors is printed as a message in the Blender Console. (Black Box) Read the error in the Console. It is then best to open the script in the Blender Text Editor. You can read the console, then check the corresponding line number in the text to read the script line causing the error. Some errors are the result of incorrect selection or wrong object type. Some due to incorrect script installation.
- Scripts should be in the .blender/scripts folder.
- Modules should be in the .blender/scripts/bpymodules folder.
Other errors are caused by changes to the Blender Python API. Sometimes this can be easily fixed, or you may need help. Always check for updates to the script you are using if it produces errors. If you are having problems, the forum at Blender Artists can be very helpful. http://blenderartists.org/forum/forumdisplay.php?f=11
[edit] Python Reference
'Links From The Manual
[edit] Blender Python API
The Full Python Application Programmer Interface of Blender has a reference documentation which is a book by itself. For space reason it is not included here. Here it is :)
- Daily Updated Blender Python API Reference. (Blender 2.48)
- The Blender Python API Reference (Blender 2.48)
- The Blender Python API Reference (Blender 2.46)
- The Blender Python API Release_Notes (Blender 2.46)
- The Blender Python API Reference (Blender 2.45)
- The Blender Python API Reference (Blender 2.44)
- The Blender Python API Reference (Blender 2.43) out-dated
- The Blender Python API Reference (Blender 2.42) out-dated
[edit] Development Pages
[edit] links to the Scripts/Catalog sections
- Add: scripts that generate geometry and AddMesh Scripts
- Animation: scripts related to Animation, Armatures & Camera Animation
- Export: scripts related to Exporting from Blender
- Image: scripts related to the Image Menu
- Import: scripts related to Importing to Blender
- Materials: scripts related to Materials & Textures
- Mesh: scripts related to Modifying Mesh in Edit Mode
- Misc: scripts related to various tools and functions
- Object: scripts related to Modifying Mesh in Object Mode
- Render: scripts related to Rendering a Scene
- System: scripts related to the System Functions, Info/Helper scripts and Tools
- Themes: scripts related to UI-Themes
- UV: scripts related to UV projection & mapping
- Wizards: scripts related to Landscapes, Tree generators, City Generators and Complex Objects.
Select one of the above groups to find out more about the scripts available in that group. Press the link for the script to get more information on the script.







![[]](/skins/blender/open.png)
