Custom icons in Blender UI
Mostly often Blender add-on developers use icons from Blender built-in library to personalize UI buttons. However, absolutely any external images can be uploaded and used as icons in the UI.
Mostly often Blender add-on developers use icons from Blender built-in library to personalize UI buttons. However, absolutely any external images can be uploaded and used as icons in the UI.
If we need to find and select all objects in the scene whose UV-Map map name matches the specified one, we can do this using the Blender Python API.
When working with a complex scene with many objects, the synchronization of meshes visibility could be lost between the scene in the viewport area and the render. With just a few lines of code, we can quickly synchronize objects visibility in the viewport and on the final render.
Fast synchronization objects visibility in the viewport and for renderingRead More »
The position of the point from which we look at the scene in the 3D viewport area can be controlled through the Blender Python API. We can read the coordinates of this point and the direction of view from the viewport, and also set the values we need for them.
Not all actions made with the Blender Python API cause Blender to immediately redraw the screen. Therefore, quite often it is necessary to force a screen refresh so that the user immediately sees all the changes.
To resolve conflicts between add-ons in Blender, it may be necessary to know if Blender base system operator has been overridden with a custom operator in some third-party add-on.
Checking if system operator was overridden with customRead More »
Using the gpu module from the Blender Python API, we can draw not only images on the 3D viewport area, but also print arbitrary text. Printing text is carried out using the blf module – a wrapper over OpenGL.
Information about the mesh vertices colors is stored in its vertex_colors property, as well as in its color_attributes property. To remove vertex color data from the mesh, we need to clear these mesh properties.
To execute an operator from a context that was not intended for it correctly, it is necessary to override the context for it using bpy.context.temp_override.() selected objects. However, using temp_override, we can override not only the context of the operator call, but also, for example, the stack of selected objects.
Overriding the selected objects list for the transform.translate operatorRead More »
Mesh vertices don’t have a “color” property. Vertex colors specified by coloring in Vertex Paint mode or any other way are stored in an attribute – a separate list of values. To select a vertex by the color assigned to it in an attribute, we need to associate the attribute’s index with the vertex index.