Changeset View
Changeset View
Standalone View
Standalone View
manual/advanced/scripting/addon_tutorial.rst
| Context not available. | |||||
| To give an example, here is the simplest possible add-on:: | To give an example, here is the simplest possible add-on:: | ||||
| bl_info = {"name": "My Test Add-on", "category": "Object"} | bl_info = { | ||||
| "name": "My Test Add-on", | |||||
| "blender": (2, 80, 0), | |||||
| "category": "Object", | |||||
| } | |||||
| def register(): | def register(): | ||||
| print("Hello World") | print("Hello World") | ||||
| def unregister(): | def unregister(): | ||||
| Context not available. | |||||
| ``bl_info`` | ``bl_info`` | ||||
| is a dictionary containing add-on metadata such as the title, | is a dictionary containing add-on metadata such as the title, | ||||
| version and author to be displayed in the Preferences add-on list. | version and author to be displayed in the Preferences add-on list. | ||||
| It also specifies the minimum Blender version required to run the script; | |||||
| older versions won't display the addon in the list. | |||||
| ``register`` | ``register`` | ||||
| is a function which only runs when enabling the add-on, | is a function which only runs when enabling the add-on, | ||||
| this means the module can be loaded without activating the add-on. | this means the module can be loaded without activating the add-on. | ||||
| Context not available. | |||||
| bl_info = { | bl_info = { | ||||
| "name": "Move X Axis", | "name": "Move X Axis", | ||||
| "blender": (2, 80, 0), | |||||
| "category": "Object", | "category": "Object", | ||||
| } | } | ||||
| Context not available. | |||||
| bl_info = { | bl_info = { | ||||
| "name": "Cursor Array", | "name": "Cursor Array", | ||||
| "blender": (2, 80, 0), | |||||
| "category": "Object", | "category": "Object", | ||||
| } | } | ||||
| Context not available. | |||||
| bl_info = { | bl_info = { | ||||
| "name": "Cursor Array", | "name": "Cursor Array", | ||||
| "blender": (2, 80, 0), | |||||
| "category": "Object", | "category": "Object", | ||||
| } | } | ||||
| Context not available. | |||||