Questions tagged [gpu-module]
The gpu-module tag has no usage guidance.
17
questions
0
votes
0
answers
19
views
Why can't I import a specific class from the module?
I'm trying to retrieve a class from the module called draw_op. The problem is in the module, some of classes can be imported normally while some don't.
Error:
<...
0
votes
0
answers
54
views
Create box/rectangle shape based on two points/vector using python
I want to create a box/rectangle shape using two points while aligning to a given normal. The image below shows what I want to achieve. The left side shows the two points supplied by the selected ...
0
votes
0
answers
37
views
How can I generate the look of 3D shaded geometry with GPU module?
https://docs.blender.org/api/current/gpu.html?highlight=batch_for_shader shows some complex things being done with custom shaders, but I have not really been able to find any explanation of how these ...
0
votes
0
answers
25
views
Help highlighting selected faces using Blender's drawing API
I'm currently developing an addon and want to include a feature that when, for example, ⇧ Shift is pressed, the selected faces in Edit Mode are drawn with python. After ⇧ Shift is released, the faces ...
2
votes
0
answers
73
views
Blender 3.0 GPU API and BGR colors
I want to use the new GPU API for Blender 3.0 to copy the content of a texture into a gpu.types.Buffer. Although this works fine with the following small code, I wonder how I can tell the API to copy ...
0
votes
0
answers
102
views
GPU shader module to paint textures?
The blender docs have sample code under the heading
Generate a texture using Offscreen Rendering
https://docs.blender.org/api/current/gpu.html
This whole section of the blender docs is poorly ...
4
votes
1
answer
175
views
Plot grid points on normal vector
I like to create virtual set of 3d grid points plotted/aligned on a normal vector. I'm planning to draw these points or lines using the GPU code. I've been experimenting with ...
0
votes
1
answer
368
views
How to make rounded corners for 2d rectangle?
Does anyone know how to make rounded corners for a 2d rectangle?
...
0
votes
1
answer
70
views
why bgl meshes flip when nothing is selected?
As described in API the following script will create a mesh from active object using bgl module:
...
1
vote
0
answers
117
views
How to remove drawing with gpu module in blender?
I have drawn some points with the GPU module of Blender and I need to draw other things in an empty window without closing Blender. But I don't know how to remove all these points with codes. It seems ...
1
vote
1
answer
186
views
Display series of 2D squares using GPU Shader Module
My addon makes measurements on objects and assign a color to the objects according to the measured value. Now I would like to display a series of stacked coloured squares in the viewport to serve as a ...
2
votes
1
answer
539
views
5
votes
1
answer
1k
views
How do you use the GPU offscreen render API in 2.8?
For a while now in blender there has been this GPU Off-screen renderer; however, I think it has changed a bit in 2.8, and plus, I never even knew how to use it before.
Basically I want to be able to ...
1
vote
1
answer
375
views
How to draw RGBA 2D image in 3d_view with gpu module (or without)?
I just copied and pasted from https://docs.blender.org/api/current/gpu.html#d-image:
...
3
votes
0
answers
314
views
Removing space draw callbacks after losing the handle?
A small edit of test code from GPU Shader Module (gpu) "Mesh with Random Vertex Colors" to save the handle to the driver namespace ...
...
6
votes
1
answer
516
views
Transparency in Blender 2.8 GPU Python Module
I've been messing around with the new GPU python module in Blender 2.8. But I cannot find a way to make my lines and triangles transparent. The alpha channel is completely ignored. I even tried it ...
4
votes
2
answers
5k
views
How to draw geometry in 3d View window with bgl
Since there isn't demo in API docs, so I tried simple script below:
...