Getting all classes for menus in Blender UI
To make changes to menus in Blender UI, for example, add new items or overriding the menu completely, we first need to know the class of the menu which we need to change.
To make changes to menus in Blender UI, for example, add new items or overriding the menu completely, we first need to know the class of the menu which we need to change.
Mostly often Blender add-on developers use icons from Blender built-in library to personalize UI buttons. However, absolutely any external images can be uploaded and used as icons in the UI.
By default, all objects in Blender are sized in the same units. However, for convenience, we can use the adaptive metric – small objects will show sizes in centimeters and millimeters, large objects – in meters and kilometers.
We can display data in a table-like form in the Blender UI with the row() and column() functions of the layout element in the Panel class, from which we inherit the custom UI panel classes.
The bl_context parameter is used for placing custom UI panels on the desired tab in the Properties area. The value specified in this parameter is responsible for which tab the user panel will be placed on.
All possible values for the bl_context parameter in UI panel classesRead More »
Blender is developing intensively and new versions of the program are released quite quickly. In this case, compatibility often suffers – when we open a project created in earlier versions of Blender, it can be opened not correctly. Sometimes this happens because Blender stores all user interface (UI) settings and options in every .blend file. Opening a project with the Load UI option unchecked can help.
In this case, Blender only loads the project itself, without any UI settings that may have changed in the current version.
When writing add-ons for Blender, it is important to place UI elements – buttons, fields, switches, etc., so that the user can easily find them and have convenient access to them. Blender provides to add-on developers the following areas to place their custom UI:
When creating custom properties, the values of which the user can choose from a list, it is often necessary to filter the list of values offered for selection. We can use the poll function to shorten the proposed list of values by removing unwanted elements.
Filtering values available for selection through the UILayout.prop()Read More »
Pressing the “Purge” button cleans the current open scene – removes all unused objects from it (mesh, nodes, materials, textures, etc.). However, this button is located very inconveniently, in the Outliner header and is visible only in the “Orphan Data” Outliner mode. For quick access to this button we can move it to the header of the 3D Viewport.
Adding the “Purge” button to the 3D Viewport header in BlenderRead More »
With the Python API we can customize Blender interface as we need. For example, we can place the most frequently used operators to the header (top menu) of any workspace area. This way we can assemble our own ribbon with “quick favorite” buttons.