Blender how to install addons
Blender how to install addons
Add-onsпѓЃ
The Add-ons section lets you manage secondary scripts, called “Add-ons” that extends Blender’s functionality. In this section you can search, install, enable and disable Add-ons.
Blender Preferences Add-ons section. пѓЃ
Finding Add-onsпѓЃ
Blender comes with some pre-installed Add-ons already, ready to be enabled. But you can also add your own, or any interesting ones you find on the web.
Blender’s add-ons are split into two groups depending on who writes/supports them:
Official: Add-ons that are written by Blender developers.
Community: Add-ons that are written by people in the Blender community.
Enabled Add-ons Only
Shows only enabled add-ons for the current Category.
Add-ons are divided into categories by what areas of Blender they affect.
Installing Add-onsпѓЃ
There are hundreds of add-ons that are not distributed with Blender and are developed by others. To add them to the list of other add-ons, they must be installed into Blender.
Now the add-on will be installed, however not automatically enabled. The search field will be set to the add-on’s name (to avoid having to look for it), Enable the add-on by checking the enable checkbox.
Scans the Add-on Directory for new add-ons.
User-Defined Add-on Path
You can also create a personal directory containing new add-ons and configure your files path in the File Paths section of the Preferences. To create a personal script directory:
Create an empty directory in a location of your choice (e.g. my_scripts ).
Add a subdirectory under my_scripts called addons (it must have this name for Blender to recognize it).
Open the File Paths section of the Preferences.
Set the Scripts file path to point to your script directory (e.g. my_scripts ).
Save the preferences and restart Blender for it to recognize the new add-on location.
Now when you install add-ons you can select the Target Path when installing 3rd party scripts. Blender will copy newly installed add-ons under the directory selected in your Preferences.
Enabling & Disabling Add-onsпѓЃ
To enable or disable an add-on check or uncheck the box to the right of the add-ons shown in the figure below.
Enabling an add-on. пѓЃ
The add-on functionality should be immediately available.
Add-ons that activate or change multiple hotkeys have a special system of activation. For example, with the 3D Viewport Pie Menus add-on for each menu there is a selection box to activate the menu and its hotkey.
If the Add-on does not activate when enabled, check the Console window for any errors that may have occurred.
Add-on InformationпѓЃ
You can click the arrow at the left of the add-on box to see more information, such as its location, a description and a link to the documentation. Here you can also find a button to report a bug specific of this add-on.
Add-on PreferencesпѓЃ
Some add-ons may have their own preferences which can be found in the Preferences section of the add-on information box.
Some add-ons use this section for example to enable/disable certain functions of the add-on. Sometimes these might even all default to off. So it is important to check if the enabled add-on has any particular preferences.
© Copyright : This page is licensed under a CC-BY-SA 4.0 Int. License. Last updated on 08/13/2022.
Add-onsВ¶
The Add-ons tab lets you manage secondary scripts, called «Add-ons» that extends Blender’s functionality. In this tab you can search, install, enable and disable Add-ons.
Add-ons tab in the User Preferences.
SearchingВ¶
Blender comes with some useful Add-ons already, ready to be enabled. But you can also add your own, or any interesting ones you find on the web.
FilteringВ¶
Blender’s add-ons are split into two groups depending on who writes/supports them:
Enabling and DisablingВ¶
Enable and disable an add-on by checking or unchecking the box on the right of the add-on you chose, as shown in the figure.
Enabling an add-on.
The add-on functionality should be immediately available. If the Add-on does not activate when enabled, check the Console window for any errors, that may have occurred.
Add-on InformationВ¶
You can click the arrow at the left of the add-on box to see more information, such as its location, a description and a link to the documentation. Here you can also find a button to report a bug specific of this add-on.
Saving Add-on Preferences
If you want an Add-on to be enabled every time you start Blender, you will need to Save User Settings.
Add-on PreferencesВ¶
Individual ActivationВ¶
Add-ons that activate or change multiple hotkeys now have a special system of activation. For example, with the «UI: Pie Menu Official» add-on for each menu there’s a selection box to activate the menu and its hotkey.
With Pie menus, First you activate the add-on. This activates the «Add-ons Preferences Submodule Activation». You then need to expand the Add-ons Preferences, then you will see the list of Pie Menu types you can choose from. From here you can individually activate the menus you like to use. If the menu conflicts with another favorite, there’s no need to activate it. You can activate any combination and save as user settings so your activations are available next time you start Blender.
HeaderВ¶
Now the add-on will be installed, not automatically enabled. The search field will be set to the add-on’s name (to avoid having to look for it). Enable the add-on by turning on the checkbox.
Refresh Scans the Add-on Directory for new add-ons. Online Resources
This menu contains a list of helpful links for both users and people who are interested in writing their own add-on.
Scripts Catalog Provides an index of Add-ons that are included with Blender as well as listing a number of external Add-ons. How to share your add-on Information on how to get your add-on into Blender. Add-ons development guidelines Guidelines on writing new add-on that you might want to get into Blender. API Concepts A quick introduction to Blender’s API. Add-on Tutorial A quick tutorial on the essentials of writing an add-on.
User-Defined Add-on Path
You can also create a personal directory containing new add-ons and configure your files path in the File tab of the User Preferences. To create a personal script directory:
Now when you install add-ons you can select the Target Path option to User Pref (from the File tab).
Blender will copy newly installed add-ons under the directory selected in your User Preferences.
© Copyright : This page is licensed under a CC-BY-SA 4.0 Int. License.
Add-on TutorialпѓЃ
Intended AudienceпѓЃ
This tutorial is designed to help technical artists or developers learn to extend Blender. An understanding of the basics of Python is expected for those working through this tutorial.
PrerequisitesпѓЃ
Before going through the tutorial you should…
Be familiar with the basics of working in Blender.
Know how to run a script in Blender’s Text editor.
Have an understanding of Python primitive types (integer, Boolean, string, list, tuple, dictionary, and set).
Be familiar with the concept of Python modules.
Have a basic understanding of classes (object orientation) in Python.
Suggested reading before starting this tutorial.
Dive Into Python sections (1, 2, 3, 4, and 7).
Blender API Quickstart to help become familiar with Blender/Python basics.
To best troubleshoot any error message Python prints while writing scripts, you run Blender from a terminal. See Use The Terminal.
You can enable Developer Extras in the preferences to enable features that make developing add-ons easier.
Documentation LinksпѓЃ
While going through the tutorial, you may want to look into our reference documentation.
Blender API Overview: This document is rather detailed but helpful if you want to know more on a topic.
bpy.context API reference – Handy to have a list of available items your script may operate on.
bpy.types.Operator – The following add-ons define operators, these docs give details and more examples of operators.
What is an Add-on?пѓЃ
An add-on is simply a Python module with some additional requirements so Blender can display it in a list with useful information.
To give an example, here is the simplest possible add-on:
is a dictionary containing add-on metadata such as the title, 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 add-on in the list.
is a function which only runs when enabling the add-on, this means the module can be loaded without activating the add-on.
Notice this add-on does not do anything related to Blender (the blender_api:bpy module is not imported for example).
This is a contrived example of an add-on that serves to illustrate the point that the base requirements of an add-on are simple.
An add-on will typically register operators, panels, menu items, etc, but it’s worth noting that any script can do this, when executed from the Text editor or even the interactive console – there is nothing inherently different about an add-on that allows it to integrate with Blender, such functionality is just provided by the blender_api:bpy module for any script to access.
So an add-on is just a way to encapsulate a Python module in a way a user can easily utilize.
Running this script within the Text editor won’t print anything, to see the output it must be installed through the Preferences. Messages will be printed when enabling and disabling.
Your First Add-onпѓЃ
The simplest possible add-on above is useful as an example but not much else. This next add-on is simple but shows how to integrate a script into Blender using an Operator which is the typical way to define a tool accessed from menus, buttons and keyboard shortcuts.
For the first example we will make a script that simply moves all objects in a scene.
Write the ScriptпѓЃ
Add the following script to the Text editor in Blender:
Write the Add-on (Simple)пѓЃ
This add-on takes the body of the script above, and adds it to an operator’s execute() function.
bl_info is split across multiple lines, this is just a style convention used to more easily add items.
To test the script, you can copy and paste it into Blender’s Text editor and run it. This will execute the script directly and call register immediately.
However running the script won’t move any objects. For this, you need to execute the newly registered operator.
Operator Search menu. пѓЃ
The objects should move as before.
Install the Add-onпѓЃ
Once you have your add-on within in Blender’s Text editor, you will want to be able to install it so it can be enabled in the Preferences to load on startup.
Even though the add-on above is a test, let’s go through the steps anyway so you know how to do it for later.
Once the file is on drive, you can install it as you would for an add-on downloaded online.
Open the Preferences ‣ Add-ons ‣ Install… and select the file.
When the add-on is enabled, Blender executes the code and runs the register() function. When the add-on is disabled, Blender runs the unregister() function.
The destination of the add-on depends on your Blender configuration. When installing an add-on the source and destination paths are printed in the console. You can also find add-on path locations by running this in the Python Console:
Your Second Add-onпѓЃ
For our second add-on, we will focus on object instancing – this is – to make linked copies of an object in a similar way to what you may have seen with the Array modifier.
Write the ScriptпѓЃ
As before, first we will start with a script, develop it, then convert it into an add-on.
Now try copying this script into Blender and run it on the default Cube. Make sure you click to move the 3D cursor before running as the duplicate will appear at the cursor’s location.
After running, notice that when you go into Edit Mode to change the Cube – all of the copies change. In Blender, this is known as Linked Duplicates.
Next, we’re going to do this in a loop, to make an array of objects between the active object and the cursor.
Try running this script with the active object and the cursor spaced apart to see the result.
With this script you’ll notice we’re doing some math with the object location and cursor, this works because both are 3D mathutils.Vector instances, a convenient class provided by the mathutils module which allows vectors to be multiplied by numbers and matrices.
If you are interested in this area, read into mathutils.Vector – there are many handy utility functions such as getting the angle between vectors, cross product, dot products as well as more advanced functions in mathutils.geometry such as Bézier spline interpolation and ray-triangle intersection.
For now we will focus on making this script an add-on, but it’s good to know that this 3D math module is available and can help you with more advanced functionality later on.
Write the Add-onпѓЃ
The first step is to convert the script as-is into an add-on:
Everything here has been covered in the previous steps, you may want to try run the add-on still and consider what could be done to make it more useful.
The two of the most obvious missing things are – having the total fixed at 10, and having to access the operator with Search is not very convenient.
Both these additions are explained next, with the final script afterwards.
Operator PropertyпѓЃ
There are a variety of property types that are used for tool settings, common property types include: int, float, vector, color, Boolean and string.
These properties are handled differently to typical Python class attributes because Blender needs to display them in the interface, store their settings in keymaps and keep settings for reuse.
While this is handled in a fairly Pythonic way, be mindful that you are in fact defining tool settings that are loaded into Blender and accessed by other parts of Blender, outside of Python.
These properties from bpy.props are handled specially by Blender when the class is registered so they display as buttons in the user interface. There are many arguments you can pass to properties to set limits, change the default and display a tooltip.
This document doesn’t go into details about using other property types. However, the link above includes examples of more advanced property usage.
Menu ItemпѓЃ
Add-ons can add to the user interface of existing panels, headers and menus defined in Python.
For this example we’ll add to an existing menu.
To find the identifier of a menu, first enable Python Tooltips in the preferences. Then you can hover your mouse over the menu item and the identifier is displayed.
The method used for adding a menu item is to append a draw function into an existing class:
KeymapпѓЃ
In Blender, add-ons have their own keymaps so as not to interfere with Blender’s built-in keymaps.
Notice how the keymap item can have a total setting different than the default set by the operator, this allows you to have multiple keys accessing the same operator with different settings.
For API documentation on the functions listed above, see:
Bringing It All TogetherпѓЃ
Run the script (or save it and add it through the Preferences like before) and it will appear in the Object menu.
After selecting it from the menu, you can choose how many instances of the cube you want create.
Directly executing the script multiple times will add the menu each time too. While not useful behavior, there is nothing to worry about since add-ons will not register themselves multiple times when enabled through the Preferences.
ConclusionsпѓЃ
Add-ons can encapsulate certain functionality neatly for writing tools to improve your workflow or for writing utilities for others to use.
While there are limits to what Python can do within Blender, there is certainly a lot that can be achieved without having to dive into Blender’s C/C++ code.
The example given in the tutorial is limited, but shows the Blender API used for common tasks that you can expand on to write your own tools.
Further ReadingпѓЃ
Blender comes with commented templates which are accessible from the Text editor’s header. If you have specific areas you want to see example code for, this is a good place to start.
Here are some sites you might like to check on after completing this tutorial.
Blender/Python API Overview – For more background details on Blender/Python integration.
How to Think Like a Computer Scientist – Great info for those who are still learning Python.
Blender Development (Wiki) – Blender Development, general information and helpful links.
DevTalk – Forum where people ask Python development questions.
© Copyright : This page is licensed under a CC-BY-SA 4.0 Int. License. Last updated on 08/13/2022.
Addon TutorialВ¶
IntroductionВ¶
Intended AudienceВ¶
This tutorial is designed to help technical artists or developers learn to extend Blender. An understanding of the basics of Python is expected for those working through this tutorial.
PrerequisitesВ¶
Before going through the tutorial you should.
Suggested reading before starting this tutorial.
To best troubleshoot any error message Python prints while writing scripts you run blender with from a terminal, see Use The Terminal.
Documentation LinksВ¶
While going through the tutorial you may want to look into our reference documentation.
AddonsВ¶
What is an Addon?В¶
An addon is simply a Python module with some additional requirements so Blender can display it in a list with useful information.
To give an example, here is the simplest possible addon.
This is a contrived example of an addon that serves to illustrate the point that the base requirements of an addon are simple.
So an addon is just a way to encapsulate a Python module in a way a user can easily utilize.
Running this script within the text editor won’t print anything, to see the output it must be installed through the user preferences. Messages will be printed when enabling and disabling.
Your First AddonВ¶
The simplest possible addon above was useful as an example but not much else. This next addon is simple but shows how to integrate a script into Blender using an Operator which is the typical way to define a tool accessed from menus, buttons and keyboard shortcuts.
For the first example we’ll make a script that simply moves all objects in a scene.
Write The ScriptВ¶
Add the following script to the text editor in Blender.
Click the Run Script button, all objects in the active scene are moved by 1.0 Blender unit. Next we’ll make this script into an addon.
Write the Addon (Simple)В¶
This addon takes the body of the script above, and adds them to an operator’s execute() function.
bl_info is split across multiple lines, this is just a style convention used to more easily add items.
To test the script you can copy and paste this into Blender text editor and run it, this will execute the script directly and call register immediately.
However running the script wont move any objects, for this you need to execute the newly registered operator.
The objects should move as before.
Install The AddonВ¶
Once you have your addon within in Blender’s text editor, you will want to be able to install it so it can be enabled in the user preferences to load on startup.
Even though the addon above is a test, lets go through the steps anyway so you know how to do it for later.
Once the file is on disk, you can install it as you would for an addon downloaded online.
Now the addon will be listed and you can enable it by pressing the check-box, if you want it to be enabled on restart, press Save as Default.
The destination of the addon depends on your Blender configuration. When installing an addon the source and destination path are printed in the console. You can also find addon path locations by running this in the Python console.
More is written on this topic here: Directory Layout
Your Second AddonВ¶
Write The ScriptВ¶
As before, first we will start with a script, develop it, then convert into an addon.
Now try copy this script into Blender and run it on the default cube. Make sure you click to move the 3D cursor before running as the duplicate will appear at the cursor’s location.
Next, we’re going to do this in a loop, to make an array of objects between the active object and the cursor.
Try run this script with with the active object and the cursor spaced apart to see the result.
For now we’ll focus on making this script an addon, but its good to know that this 3D math module is available and can help you with more advanced functionality later on.
Write the AddonВ¶
The first step is to convert the script as-is into an addon.
Everything here has been covered in the previous steps, you may want to try run the addon still and consider what could be done to make it more useful.
Both these additions are explained next, with the final script afterwards.
Operator PropertyВ¶
There are a variety of property types that are used for tool settings, common property types include: int, float, vector, color, boolean and string.
These properties are handled differently to typical Python class attributes because Blender needs to be display them in the interface, store their settings in key-maps and keep settings for re-use.
While this is handled in a fairly Pythonic way, be mindful that you are in fact defining tool settings that are loaded into Blender and accessed by other parts of Blender, outside of Python.
This document doesn’t go into details about using other property types, however the link above includes examples of more advanced property usage.
Menu ItemВ¶
Addons can add to the user interface of existing panels, headers and menus defined in Python.
For this example we’ll add to an existing menu.
To find the identifier of a menu you can hover your mouse over the menu item and the identifier is displayed.
The method used for adding a menu item is to append a draw function into an existing class.
For docs on extending menus see: Menu(bpy_struct).
KeymapВ¶
In Blender addons have their own key-maps so as not to interfere with Blenders built in key-maps.
Notice how the key-map item can have a different total setting then the default set by the operator, this allows you to have multiple keys accessing the same operator with different settings.
While Ctrl-Shift-Space isn’t a default Blender key shortcut, its hard to make sure addons won’t overwrite each others keymaps, At least take care when assigning keys that they don’t conflict with important functionality within Blender.
Bringing it all togetherВ¶
Run the script (or save it and add it through the Preferences like before) and it will appear in the menu.
After selecting it from the menu, you can choose how many instance of the cube you want created.
Directly executing the script multiple times will add the menu each time too. While not useful behavior, theres nothing to worry about since addons won’t register them selves multiple times when enabled through the user preferences.
ConclusionsВ¶
Addons can encapsulate certain functionality neatly for writing tools to improve your work-flow or for writing utilities for others to use.
While there are limits to what Python can do within Blender, there is certainly a lot that can be achieved without having to dive into Blender’s C/C++ code.
The example given in the tutorial is limited, but shows the Blender API used for common tasks that you can expand on to write your own tools.
Further ReadingВ¶
Blender comes commented templates which are accessible from the text editor header, if you have specific areas you want to see example code for, this is a good place to start.
Here are some sites you might like to check on after completing this tutorial.
Уроки от Хаки
Как установить аддон в Blender’е (2.8х)
Всем привет! Дошли наконец-таки руки перевести основные уроки в небольшие статьи. Видео можете посмотреть здесь (желательно на ютубе, конечно):
Быстрый способ
Заходим в Edit > Preferences или жмём Ctrl + Alt + U (старайтесь сразу запоминать горячие клавиши!)
Изменить тип окна на «Info» Теперь вы хотя бы знаете, где искать ошибки.
Но если всё прошло хорошо, но у вас не стоит Auto-Save Preferences (а я советую не ставить авто-сохранение для большего контроля), то при закрытие и последующем открытие блендера наш установленный аддон будет снова выключен. Если вы уверены, что этот аддон должен быть включен всегда (что замедлит загрузку программы), то нажмите Save Preferences слева внизу окна.
Ctrl + Alt + U > Add-ons > Install… > Выбрать файл > Install Add-on > Поставить галочку (включить аддон) > При желании сохранить настройки
Перемещение в папку с аддонами
В этом способе также нет ничего сложного, разве что найти нужную папку может быть муторно. А то, что их ещё и как минимум две существует, делу как-то не помогает.
Итак, первая папка находится непосредственно там же, где и установлен ваш блендер:
*Путь к Блендеру* \Blender Foundation\Blender 2.81 (или другая версия) \2.81 (или другая версия) \scripts\addons
Именно в папку «addons» и нужно перемещать наши файлы.
Другая же директория отличается именно той частью, которая «Путь к Блендеру», а если точнее, то находится в папке «Roamig». Именно в эту папку устанавливаются аддоны с помощью предыдущего способа.
Путь выглядит похоже, самое сложное — найти папку «Blender Foundation», остальное всё идентично.
C:Users\Username (ваше имя пользователя) \AppData\Roamig\Blender Foundation\Blender 2.81 (или другая версия) \2.81 (или другая версия) \scripts\addons
Вы можете посмотреть точный путь в графе «File» в установленном первыс способом аддоне.