I want to use the image in the addon, but I don’t know how to hide it from the users.
https://docs.blender.org/api/current/gpu.html#d-image
I did not find the information in the documentation. Does anyone have any suggestions about it?
A shader is a program that runs on the GPU (written in GLSL in our case). There are multiple types of shaders. The most important ones are Vertex Shaders and Fragment Shaders . Typically multiple shaders are linked together into a Program . However, in the Blender Python API the term Shader refers to an OpenGL Program. Every
gpu.types.GPUShader
consists of a vertex shader, a fragment shader and an optional geometry shader. For common drawing tasks there are some built-in shaders accessible fromgpu.shader.from_builtin
with an identifier such as 2D_UNIFORM_COLOR or 3D_FLAT_COLOR.
From reading this, I get the impression you can write your own OpenGL Programs and load them in, that might be worth looking into.
Start the name with a dot (e.g .img.png
), this will hide the data-block by default (although it can be disabled in the Save & Load
preferences).