4.0

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.

Enabling and disabling collections using the Blender Python API

We can enable and disable a collection from interaction with the scene by switching the checkbox located in the Outliner opposite the name of the desired collection. In order to do this using the Blender Python API, we need to access the collection through the View Layer of the scene on which the desired collection is located.

Getting a list of data from object properties using list comprehension

Most objects in Blender have multiple lists of data in their structure. For example, inside a “mesh” object there are list with vertices of this mesh, the list of mesh edges, and the list of mesh polygons. And in the structure of each mesh vertex there is, for example, a list with its coordinates along the X, Y and Z axes.