Updation autocomplete modules fake-bpy-modules for Blender Python API

Blender Python API autocomplete modules by Nutti update – added branch for Blender 2.81a.

Last release: 2020.01.11.

Author GitHub: https://github.com/nutti/fake-bpy-module

Only files (without pip installation) https://github.com/Korchy/blender_autocomplete

Vertex selection fine tuning in Blender 2.8x

In Blender 2.79, mesh vertices were highlighted in the “tweak” selection mode by holding down the “shift” key and a slight cursor movement with the right mouse button pressed. This allows quickly add vertexes to the selection without aiming each vertex with sniper accuracy.

In Blender 2.8x, this method has become unavailable due to the left click selection change. For those users who remained on “the right click select”, nothing has changed, everything works as before. The “tweak” selection was broken only for those who switched to the left click selection.

To use the “tweak” selection with the left click select, you need to make the following changes into the keyboard shortcut settings:

Continue reading “Vertex selection fine tuning in Blender 2.8x”

Assigning custom properties to vertexes

Working with mesh geometry, it may be necessary to assign each vertex some custom properties or data that must be written to the blend-file when saved, and which must be accessed later.

However, an attempt to assign the necessary data to the vertexes through the creation of custom properties fails. Instead of the custom vertex property, only a tuple with reference to the type of the property is created.

Continue reading “Assigning custom properties to vertexes”

How to split and join Blender interface windows thruough the python API

A set of operators is provided in Blender for manipulating with the location of its interface windows.

To split the current window (using the current context) into two in a specified ratio, we need to execute the following operator:

With:

  • direction – set the splitting direction (‘HORIZONTAL’ or ‘VERTICAL’)
  • factor – percentage ratio of splitting windows

Continue reading “How to split and join Blender interface windows thruough the python API”

How to save mesh data to text

Sometimes it is necessary to save data for creating a mesh (its vertices and polygon indices arrays) to text, for example, for further use in a script or addon.

We can export the mesh to one of the open formats, for example, to *.obj, but if we need only its vertexes and polygons data, we can use the following simple script:

Continue reading “How to save mesh data to text”

Custom property

The Blender API provides a set of simple property types described in bpy.props (IntProperty, BoolProperty, etc.). But the basic types are not always enough, sometimes we need more complex ones. The Blender API allows to group simple properties to make complex properties.

Let’s consider such complex property creation and make the 3×3 matrix property as an example.

Continue reading “Custom property”

How to get current Blender version number through the Python API

To get current Blender version number through the Python API we need to execute the following command:

or

Continue reading “How to get current Blender version number through the Python API”

How to start render in the main window in Blender 2.81

Render starts in a new window in Blender 2.81 by default. And there is no more render display mode settings in the “Render” menu. These settings were moved into the “Preferences”. To configure render execution window – open the “Preferences” window, press the “Interface” button and in the “Temporary Windows” configure the “Render In” parameter as you need.