Difference between revisions of "HowTo:Use POV-Ray with Blender/Developers page"

From POV-Wiki
Jump to navigation Jump to search
(Created page with "The Blender to POV-Ray add-on and vice versa (aka "POV Converter") started out as a single Python file. To be compliant with blender add-on packaging system this add-on has t...")
 
m
Line 27: Line 27:
  
 
The general information about the add-on is defined in a [https://docs.python.org/3/tutorial/datastructures.html#dictionaries dictionary] with the name <source lang="py">bl_info</source>
 
The general information about the add-on is defined in a [https://docs.python.org/3/tutorial/datastructures.html#dictionaries dictionary] with the name <source lang="py">bl_info</source>
Each 'key' provides Blender with specific information about the add-on although not all are equally important. Most of the information is used in the user preferences dialog and helps the user to find and select an add-on.
+
Each ''key'' of this dictionary provides Blender with specific information about the add-on although not all are equally important. Most of the information is used in the user preferences dialog and helps the user to find and select an add-on.
  
 
<source lang="py">name</source>
 
<source lang="py">name</source>

Revision as of 19:05, 18 July 2020

The Blender to POV-Ray add-on and vice versa (aka "POV Converter") started out as a single Python file. To be compliant with blender add-on packaging system this add-on has to

  • provide some general information about the add-on: its name and version,
  • define some code to perform actions, mostly through 'operators' or 'functions'
  • and make sure these are registered so that they can be used.

bl_info

bl_info = {
    "name": "Persistence of Vision",
    "author": "Campbell Barton, "
    "Maurice Raybaud, "
    "Leonid Desyatkov, "
    "Bastien Montagne, "
    "Constantin Rahn, "
    "Silvio Falcinelli",
    "version": (0, 1, 1),
    "blender": (2, 81, 0),
    "location": "Render Properties > Render Engine > Persistence of Vision",
    "description": "Persistence of Vision integration for blender",
    "doc_url": "{BLENDER_MANUAL_URL}/addons/render/povray.html",
    "category": "Render",
    "warning": "Under active development, seeking co-maintainer(s)",
}


The general information about the add-on is defined in a dictionary with the name

bl_info

Each key of this dictionary provides Blender with specific information about the add-on although not all are equally important. Most of the information is used in the user preferences dialog and helps the user to find and select an add-on.

name

Kind of a code name for the addon, by which it is referenced in the Blender source... (UI name can show something else)

author

If you contribute you will be credited here !

version

The version of the add-on. Any numbering scheme is valid, as long as it is a tuple of three integers. Preferably only move the last position but we might choose for a more structured scheme later on.

blender

The minimal Blender version needed by this add-on. Again a tuple of three integers. Even if you expect things to work with older and nnewer versions it might be a good idea to list the earliest version that you actually tested your add-on with! Developing with something stable enough is important, and then test with latest version just before commit but don't generally update compatible version number then, only when something breaks at that stage.

category

The category in the user preferences our add-on is grouped under. It operates POV compatible engines which are renderers so it made sense to add it to the Render category historically. Unfortunately it doesnt reflect the multipurpose nature it ended up growing (such as shipped in importer, text editor syntax highlighting etc...) If several categories are possible maybe we should add them.

location

Where to find the add-on once it is enabled. This might a reference to a specific panel or inout case, a description of its location in a menu.

description

A concise description of what the add-on does.

warning

If this is not an empty string, the add-on will show up with a warning sign in the user preferences. You might use this to mark an add-on as experimental for example.

doc_url

the public on-line documentation, it is a derivative of the work happening here. It will be a click-able item in the user preferences.

tracker_url

The POV add-on being a bundled part of Blender it does have its own bug tracker entry associated with it and this key will provide a pointer to it.