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”

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 link a new object to a scene in Blender 2.80 Python API

In Blender 2.79 Python API we can add a new object to a scene with:

If we try to do this in Blender 2.80, it throws an error:

‘bpy_prop_collection’ object has no attribute ‘link’

In Blender 2.80 API new objects mast be linked not to the scene, but to the scene collections:

To link a new object to the active scene collection:

To link a new object to the collection by its name:

 

How to move the cursor to the active strip start/end position in Blender VSE

To move the cursor to the start position of the active strip in Blender VSE:

To move the cursor to the end position of the active strip:

 

How to correctly set parameters using mathematical expressions

Blender has a very convenient ability to set the desired values ​​through mathematical expressions. If we don’t know the exact value, instead of manually calculating it, we can simply enter an expression that will calculate the desired value.

Continue reading “How to correctly set parameters using mathematical expressions”

Transfer selection from the UV-map to mesh

The UV-map is directly linked to the mesh through meshloops. We can use that to transfer the selection from the UV-map to the mesh.

To transfer the selection from the UV-map to the mesh, we need to cycle through the mesh polygons, check which meshloops are selected and select the corresponding vertices on the mesh itself.

Continue reading “Transfer selection from the UV-map to mesh”

How to get vertices from Vertex Group by its name

To get a list of vertices from the vertex group by its name we can use the following code:

 

Fluid simulation in Blender 2.80

By Pavel_Blend

What is this article about?

In this article, I will talk about the fluid simulator in Blender 2.80. This simulator was first added to the blender at the end of 2005, in version 2.40. Since then, it has not changed significantly (the changes were mainly in the beginning, after the introduction of the blender). The simulator code was written by a third-party developer Nils Thuerey. He wrote a fluid simulation library and named it El’Beem. The engine is voxel-based on the method of lattice Boltzmann equations. It is best suited for creating water, but it has the ability to create viscous liquids (honey, chocolate …) that are not very well implemented. Soon, a new Mantaflow simulator will be introduced into the blender (by the way, Nils Thuerey is taking part in its development).

Continue reading “Fluid simulation in Blender 2.80”

How to make the panel with system disks expanded by default in Blender 2.80 File Browser window

The panel with system disks list is collapsed in the “File Browser” window by default. But some times it is not convenient.

Not to expand it manually every time we can make a simple modification:

Continue reading “How to make the panel with system disks expanded by default in Blender 2.80 File Browser window”

Get Specular reflections from IOR

The official Blender documentation provides a method to get the “Specular” value for the PBR-material reflections if the “IOR” value is known. To get the “Specular” value from the “IOR” value, we can use the following equation:

It is not difficult to create it with nodes:

Continue reading “Get Specular reflections from IOR”