Addons: Clean Up your Bl_info

Hi, I have noticed a growing trend that bl_info in addons is not being used to to their full potential & design.
Lets have a look at the bl_info & I’ll explain why it’s good for you, the addons dev, to use this properly.

You should include a python dictionary named “bl_info” at the top of your addon .py file or init.py if it is a module such as this from the wiki:

bl_info = {
    "name": "My Script",
    "description": "Single line explaining what this script exactly does.",
    "author": "John Doe, Jane Doe",
    "version": (1, 0, 0),
    "blender": (2, 77, 0),
    "location": "View3D > Add > Mesh",
    "warning": "", # used for warning icon and text in addons panel
    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"
                "Scripts/My_Script",
    "tracker_url": "http://developer.blender.org/maniphest/task/create/?project=3&type=Bug",
    "category": "Add Mesh"
    }


Let’s break it down:
“name” : This should be same name or very similar to the py file you distribute.

“description”: “Single line explaining what this script exactly does.” keep it short, if you use Addons Preferences code, here would be a good place to say “See Addons Preferences” and put your information there.

“author”: “Your name here & any major contributors” In order List by Author’s contributions. If “coolscriptguy” wrote an addon & you fixed/updated it, list as:
“author”: “coolscriptguy, yournamehere”,
You can also for scripts with multiple authors, list the authors at the end of the gpl:

# Contributed to by:
# SAYproductions, meta-androcto, jambay, brikbot#

“version”: (1, 0, 0), This is for your addons version number for you & users to know they have the right updated version of your script.

“blender”: (2, 77, 0), This is very important! Whenever you update an Addon you should change this field to represent the Blender Version you made the changes in. As the API ever changes, this is a good representation of "Known to work in/updated to work in this version of Blender.

“location”: “View3D > Add > Mesh”, This is not really the place to write “Everywhere” Be very short & descriptive & point the user to exactly where the ui is. “Search menu” " View3D > Toolshelf > Create Tab" is a good example. If you use multiple hotkeys, here you could use Addons Preferences code, “See Addons Preferences” and put your information there. That way the user could know which hotkeys are being used.

“warning”: “”, # Optionally used for warning icon and text in addons panel, this can be used for things like “Experimental”, “Beta Version”, or as a real warning: “Broken, some functions may return errors” or other appropriate warnings.

“wiki_url”: This is used to provide a link to your documentation, web site or wiki. With a link now in Blender & very popular, creating a page & linking here is recommended: https://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts That said you can link to your own wiki or docs & give your customers, I also recommend using github as this provides versioning for your addon & a stable link.

“tracker_url”:http://developer.blender.org/maniphest/task/create/?project=3&type=Bug”, is standard for addons in Blender or Blender contrib, You can uses this to link the user to your git page or bug report page.

“category”: “Add Mesh”, Please This causes the most complaints! Don’t add your own category just because you can, most addons enthusiasts have several addons enabled & end up with unreadable tabs. (note: tabs are scroll-able) Try to integrate your addon into Blender’s UI where you or your users would expect to find them, it works much better. :slight_smile:

Please, use the bl_info to your best advantage, that’s what it was designed for.
Don’t forget there’s Addons Preferences too, here you can add settings & information & links.
The benefits are for everyone, your users have links your addons, you get more linking in to your addons, there’s less ui clutter. again: I also recommend using github as this provides versioning for your addon & a stable link for future reference for your users. I find I download an addon or 10, start testing & it’s a battle sometimes even to find where it comes from, let alone to find a correct update, it’s easy to fix if everyone follows these practices.

Thanks.

2 Likes

You ahev absolutelly right @Meta-Androcto, i have remarked same thing too and i am very demanding with blender or python rules in add-ons.
Congratulations and thanks for this.

The problem with this is that there’s no guidelines how to do this. No predefined categories. As far as I know?

For example, I have been editing addons manually and adding them to retopo, baking, etc… tabs. How do you add an addon to a category that isn’t managed in any way, or at least the information does not reach the addon developer. Guessing names is a very poor way of doing things.

The best solution for the category would be that the dev addons add code to let users choose where they want to placed their addon in the addon preferences.
As the Name_panel or our Asset_management addon does for example.

hi,
@ Spirou4d, thanks, just trying to help both users & py coders.
@ ambi, Yes, it is problematic that there’s no guidelines per se, however, addons authors can help with this, some use their name as the category, or miss spell an existing category or use a wrong category when a better one can be found. Also for addons devs to work together on this.
@ @pistiwique
Yes, Right away I can fix this to my choosing, good call. However we can have that option & keep things easy for users too.

Addons Categories:
I’ve got most addons from around the web & sorted them into Categories as such:
stc=1
As you can see there’s lot’s of entries!
There was 1/4 more before I adjusted the bl_info’s.
To Break this down:
3D View: Ideally, this would be for BGL drawing & addons that manipulate the 3D View workspace. (not menu’s as “User Interface” is better descriptively.
Add Curve: Anything related to curves goes here. (could do with a name change to “Curve”)
Add Mesh: If it adds mesh geometry, it should be here.
Animation: If it animates, here’s the place.
Camera: Camera related tools.
Development: Tools to help developers & addons developers.
Game Engine: BGE Tools.
Import/Export: I/O & I/O Helper Tools.
Lighting: The Lighting Addons.
Material: Materials addons & library & helpers.
Mesh: Edit mode mesh manipulation & tools.
Node: Tools for the Node Editor.
Object: Tools primarily in Object mode working on objects or multiple objects. (Transforms, Arrays, Constraints, Higher level Add Object with modifier type things.)
Paint: Tools for Painting Modes.
Particle: Tools for Particle Systems.
Pie Menu: Pie Menu’s. (Yes there’s enough of them to have a category, also makes nice separation from traditional menu’s.)
Render: Tools for rendering.
Rigging: Tools for Armatures & rigging.
Scene: Tools for Setting Up, Listing Elements & helpers.
Sculpting: Tools for Sculpting & Retopo.
Sequencer: Vse Tools.
System: Background elements & Addons that offer System Choices.
Text Editor: Tools that operate in the text editor.
Tools: Authors Tools, Joe’s Tools, Moe’s Favorite Tools, Specific Workflow & Collections Tools.
UV: UV/Image Editor tools.
User Interface: Ideally: Tools that add to, change or manipulate the Blender Interface. (imo much of View 3D could go here.)

So there you have it, it’s a bit rough, but I have 100’s of addons all neatly(ish) in these categories already.
With a little work as a collective of addons writers, Addons Categories can be less of a hastle.

Next, I’ll tackle Tabs, which, using a similar approach, can be organized in a more user friendly method.

Enjoy addons, make them easier to find & make yourselves easier to find too.

Note: In 2.77 we have new lnks:
/uploads/default/original/4X/d/1/1/d11a4d911a9a4c0e5248534aefce2dd8ff90989f.jpgstc=1
Online Resources is a good thing, Don’t forget to put your addon page in the wiki catalog! Link it or your git page in your addon too!

Note 2: Also for 2.77 the activate addon & Display Information & Addons Preferences dropdown are now both on the left with the hope that users press the arrow to check the information & view Addons Preferences if they exist.

Attachments