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 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.

Calling functions by pressing buttons in Blender custom UI

Button click in basically connected with the operator calling in Blender user interface. However, some times actions, that need to be performed when a button is pressed, are quite simple and do not require a separate operator for them. And it makes no sense to fill a registered operators stack with a multitude of specific operators designed to perform one highly specialized function. It would be much more convenient to associate a button press with a separate function call but the Blender API allows to associate buttons only with an operator call.

To solve the problem of creating a separate operator for each button we can use the fact that the operator can be called with the input parameters.

Continue reading “Calling functions by pressing buttons in Blender custom UI”

How to get a list with all possible values of an EnumProperty

To correctly set values to an EnumProperty type we need to know all its possible entries.

If we try to set a value to an EnumProperty that is out of its available variants, Blender will throw an error:

TypeError: bpy_struct: item.attr = val: enum “xxx” not found in (‘value_001′, value_002’, …)

where:

xxx – the value we tried to set to an EnumProperty

value_001, value_002, … – possible EnumProperty values

Continue reading “How to get a list with all possible values of an EnumProperty”

How to move cursor to vertex

To translate cursor to the desired mesh vertex execute the following code:

Attention to the multiplication order – world matrix should be left.