Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [gpu-module]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
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: <...
user avatar
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 ...
user avatar
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 ...
user avatar
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 ...
user avatar
  • 1
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 ...
user avatar
  • 448
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 ...
user avatar
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 ...
user avatar
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? ...
user avatar
  • 506
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: ...
user avatar
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 ...
user avatar
  • 111
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 ...
user avatar
  • 127
2 votes
1 answer
539 views

How can I make a 2d gpu polygon and text follow the cursor?

The code: ...
user avatar
  • 1,420
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 ...
user avatar
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: ...
user avatar
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 ... ...
user avatar
  • 77.7k
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 ...
user avatar
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: ...
user avatar
  • 337