Interface

Custom Icons for EnumProperty in Blender

We can use custom icons, icons loaded from external files, and not embedded in Blender libraries, for example, to add customization to operator call buttons in UI panels. However, it is not only buttons that may require custom icons. Using the Blender Python API, we can add customization to drop-down list items or switches that are created based on the EnumProperty type.

Changing the number of visible channels in Blender Video Editing

By default, there are 7 lines allocated for displaying channels with strips in the Blender user interface, in the Video Sequencer area. If all of them are not used in video editing, it will not be possible to hide unnecessary ones by simply scaling the area size.

However, this can be done by scaling the entire area interface.

Using math expressions in Blender input

Blender has a very convenient feature – when performing any action, the values for it can be specified in the form of expressions. For example, when rotating a mesh around the Y axis by 36 degrees, we can specify the final, already known value of the degrees of rotation and press the following key combination: R -> Y -> 36. Or, if we need to rotate the mesh by 1/5 of 180 degrees, we can use the expression by entering: R -> Y -> 180 / 5, which will be equivalent to rotating by the same 36 degrees.

Showing custom UI panel in Blender by pressing keycodes

When creating add-ons for Blender, developers almost always create the user UI panel with tools that provide the main functionality of the add-on. Typically, such custom panels are placed in the N-panel block, called by pressing the N key. However, if it is assumed that the user will often call the panel with add-on tools, its call can be bound to a keyboard shortcut and the panel can be called from the keyboard.

Setting an icon from the tools panel to a button in the custom UI panel in Blender

To set an icon to a button when creating the custom user UI panel in Blender, we look for the text identifier of the desired icon (usually using the built-in Icon Viewer add-on) and set its value to the “icon” parameter when binding the desired operator to the button. However, the icons used in the tools panel are not existed in the common Blender icons list.