2.93

Converting mouse cursor coordinates from area to texture coordinates in Blender Image Editor

In some tools, for example, “eyedropper” or “selection by color”, it is necessary to get the value of the texture pixel that is currently under the mouse cursor. To get pixels data we need to know its coordinates in the texture space.

Locking the mouse cursor within the area in Blender

Sometimes it may be necessary to prevent the mouse cursor from going beyond the boundaries of a particular Blender area. For example, when grabbing and dragging a mesh with the mouse, the captured mesh should not leave the 3D Viewport area, not to be above another type of area, for example, above the Node Editor or Text Editor areas.

Working with PostgreSQL databases from Blender

Remote data storage is becoming more and more useful. Various online libraries of models, materials, textures and assets are becoming more and more popular. Databases are most often used to store data in such libraries. PostgreSQL is one of the most advanced and functional open source databases that we can connect to and work with through the Blender Python API.

Dynamically setting the Max and Min values ​​for a custom property in the Blender Python API

Custom properties in the Blender Python API can be limited to setting with maximum and minimum values. In this case, the user, entering the desired value to the property field, will not be able to set a value that goes beyond the specified limits.

To set the minimum and maximum limits, we can specify the “min” and “max” parameters in our custom property and assign them the necessary limiting values.