Linked Questions

3 votes
2 answers
2k views

How to draw shapes in the node editor with python bgl

I want to draw a diagram using shapes such as triangles and squares in the node editor. How can I do this?
John Roper's user avatar
3 votes
1 answer
3k views

draw_handler_add() and draw_handler_remove()

The bpy.types.Space class has two methods draw_handler_add() and draw_handler_remove(). ...
David's user avatar
  • 48.9k
4 votes
2 answers
4k views

Floating UI window in 3D view

One can show the modifier stack inside the tool shelve. But would it be possible to show this inside a floating window? F6 opens a window with options of the last command but the window always goes ...
Claas Kuhnen's user avatar
  • 1,727
1 vote
3 answers
2k views

Draw a 2d box using Bgl in viewport

I have been trying read up a lot on opengl drawing using python and have been trying to create a script which display a text and a 2d shape on the viewport (a rectangle or square). From reading the ...
Retrax's user avatar
  • 1,480
1 vote
1 answer
1k views

How do I display a property in the viewport without using a modal operator? [duplicate]

I want to display a property in the viewport without using a modal operator. is it possible? I found this, but I did not understand how I can use (I started with python).
logiquefloue's user avatar
4 votes
0 answers
646 views

Viewport widgets with draw handler

Is it possible to create viewport widgets with draw handler? I have an operator which produces simple mesh geometry, I use operator redo properties panel to edit the result as shown in animation ...
Mikhail Rachinskiy's user avatar
1 vote
0 answers
693 views

Global variable visibility during script/operator execution?

I wanted to have some global variables in an addon. But doing so, some parts of the script were not able to access these variables. I had an error message saying I can not use them as they are not ...
lemon's user avatar
  • 53.5k
0 votes
0 answers
251 views

Preselection highlight object?

iam currently creating a GUI for a kind of "rig" in the 3D Viewport (Not in the Blender Game Engine!) and it would be an treat for the eyes to have highlighting while hovering over a button. So how ...
froggyman's user avatar
  • 493
0 votes
1 answer
79 views

need to display speed on my ship while keyframing (view3d)

animating a plane(keyframe or may be path), ideally want ship to display its speed just like it can display its name (if checked true from object display settings) or at screen bottom(view3d) where ...
haseeb's user avatar
  • 265
1 vote
0 answers
79 views

My blf-text appears in all 3d viewports after specific actions (ex selecting)

I noticed that the moment I select or deselect an object my blf text appears in all 3d viewports: is there something wrong with he way I use drawback handler? Here's a gif with the issue: Here's my ...
Sergey Kritskiy's user avatar
1 vote
0 answers
76 views

How to handle drawing with multiple views

I want to draw in the screen space of each ImageEditor. The drawing itself works pretty good, each space has its own draw handle registerd with the correct "view_to_region" functions passed ...
kio's user avatar
  • 41