Setting operator parameters features

When you make a button in a custom UI to call the operator with passing the necessary parameters to it, pay attention that only the parameters specified explicitly will be sent to the operator. Other operator parameters will remain with default values.

For example, we need to execute the “transform_apply” operator – applying object transformations with applying just the scale.

If we call the operator as follows:

But all transformation (scale, rotation, and position) will still be applied to the object.

Continue reading “Setting operator parameters features”

Render from console only on the specified GPU devices

Sometimes, to effectively distribute the hardware load it is necessary to make a render from Blender only on certain video cards of several of them.

To do this we can use a simple script in which specify the numbers of devices to be used for rendering.

Continue reading “Render from console only on the specified GPU devices”

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