From BlenderWiki

Jump to: navigation, search

Script requirements

To have your script show up in the Add-Ons panel, it needs to:

  • be in the addons/ directory
  • contain a dictionary called "bl_info"
  • define register() / unregister() functions.

Script meta informations

You have to include a python dictionary named "bl_info" at the top of your addon .py file or if it is a module.

bl_info = {
    "name": "My Script",
    "description": "Single line explaining what this script exactly does.",
    "author": "John Doe, Jane Doe",
    "version": (1, 0),
    "blender": (2, 65, 0),
    "location": "View3D > Add > Mesh",
    "warning": "", # used for warning icon and text in addons panel
    "wiki_url": ""
    "tracker_url": "",
    "support": "COMMUNITY",
    "category": "Add Mesh"
Name of the script. This will be displayed in the add-ons menu as the main entry.
This short text helps the user to decide if he needs the addon when he reads the addons list. Any further help text should be put in the help page (see wiki_url).
Author name(s).
(tuple of integers)
Script version. Please put any important notes into the warning field, don't use text in the version number.
(tuple of 3 integers)
The minimum Blender version required to run the script. In the add-ons panel this is used to check if the user has a Blender version that is new enough to enable the script. eg.
Blender2.65 -> (2, 65, 0), note that the last value should normally be kept to zero, this is blenders sub-versions which scripts wont normally need to use.
When the version number ends in zero, you need to supply that 0 too, as in (2, 50, 0) and not (2, 5, 0).

Explains where the new functionality can be found. For example: "View3D > Properties > Measure"
Used for warning icon and text in addons panel. If this is empty you will see nothing; if it is non-empty, you will see a warning icon and the text you put here alerts the user about a bug or a problem to be aware of.
Display support level (COMMUNITY by default)
  • OFFICIAL - Officially supported
  • COMMUNITY - Maintained by community developers
  • TESTING - Newly contributed scripts (excluded from release builds)
Link to the wiki page of the script: here you should put the script manual and useful external links (not allowed anymore from 2.5x).
Exclamation mark.png
This url is mandatory for the add-on to be accepted in the Blender Addon repositories (see below).

Optional field to specify a bug tracker other than the default
Defines the group to which the script belongs. Only one value is allowed in this field, multiple categories are not supported. The category is used for filtering in the add-ons panel.
Below is the list of categories currently in use by official add-ons. Please pay attention to their correct spelling and capitalization, as you can also type your own custom categories and they will show in the add-ons panel filtering options.
List of categories
  • 3D View
  • Add Mesh
  • Add Curve
  • Animation
  • Compositing
  • Development
  • Game Engine
  • Import-Export
  • Lighting
  • Material
  • Mesh
  • Node
  • Object
  • Paint
  • Physics
  • Render
  • Rigging
  • Scene
  • Sequencer
  • System
  • Text Editor
  • UV
  • User Interface

Wiki page

Scripts submitted to or distributed in our Blender Addon repositories should always have a wiki page linked in the script itself (in bl_info dictionary). This is very important to be sure people won't be left wondering how to use a script, and to link to release logs in a nice way.

If in doubt: read our wiki guidelines

If you're new to mediawiki, please read Wiki guidelines

Temporary page

If you submit a script to the Blender Addon repositories, but don't have time to format a proper wiki page in the same time, please create the page anyway and add the code {{WikiTask/Todo}}, so that we see it's going to be written.

Page name

Compose the page name like this:

Extensions:2.5/Py/Scripts/ + <script category> + / + <script name>

Release logs page name

If you have a release log, don't add it to the Manual page itself to avoid too many informations; rather, add a new page with the same name as the extension page, but with namespace "Dev", like this:

Dev:2.5/Py/Scripts/ + <script category> + / + <script name>
Script manual page Extensions:2.5/Py/Scripts/Animation/RotoBezier
Script development page Dev:2.5/Py/Scripts/Animation/RotoBezier

Use the ScriptInfo template!

For the add-on wiki page, use the template ScriptInfo.

If you have a release log page, you can link it in the releaselog field.

About external links

To avoid have scripts referring to broken links, since 2.5 we've chosen to ask our script developers to put their homepage in the wikipage and not allow external links right in the script itself. This is easier to manage for everyone that doesn't have access to Git repositories.

Please add your homepage in the link field of the ScriptInfo template, thanks!

Add a manual!

Take your time to write a small manual, explaining how to use the script options. Possibly, add pictures and if you have them, add videos.

When you add features to your addon, don't forget to add the proper documentation in the addon wiki page: this helps users and developers to have a good reference about the addon development.

Link your page in the catalog page

Once you have completed your script manual page, link it in the catalog page.

Publishing a script in Blender

If you want to publish your addon on Blender Foundation servers, please read about the Process to Submit Addons to Blender repositories.

If you want to use custom icons in your addon (available from Blender 2.75), you also need to observe these guidelines:

  • Do not use this for advertising, logos or other non-functional use cases.
  • Use a minimum of custom icons. This helps uncluttering the interface and keeping Blender's interface uniform.
  • Only use these images in a way that is compatible with how rest of Blender works - as if it's a default interface we provide for everyone.
  • Only use the feature within the context and UI of your own Add-on. You cannot rely on other add-ons to have this already preloaded. This feature also does not allow replacing of the default icons.
  • Do not force preview image creation outside of the add-on dir, except when explicitly asked for by the user in the UI.
  • The default icon size in Blender is 32x32 and for previews 256x256. Your images will be scaled to fit these sizes on their maximum side.

See also

Addons usage

Addons manual page
Here we collect informations about general addons usage

Coding style

Style Guide for Python Code
Recomended coding conventions for the Python code
PEP8 Checker
A tool to check your Python code against some of the style conventions in PEP 8 just linked above
Online PEP 8 Python code checker