How to implement custom info overlay in 3D View panel?

Can you guys help with this - I’m trying to find out how I can pass some custom text over 3D View panel content, for example same as viewport name. I attached image to demo this concept. p.s.: Blender carver add-on is another example of using such functionality. Thanks!


That is a pretty complex topic, it took me a lot to grasp this. You can study an old practice version of an addon i made. It is quite smaller than the actual version and the code for writing on the screen is obvious:

NP_point_distance_010.py.zip (1.57 KB)

When you manage this, you can check the current version in the Released scripts forum. After that, there is Carver, Snap Utilities, etc…

Blender comes with some Text Editor Templates for common scripting tasks. “Operator Modal Draw” (operator_modal_draw.py) shows how to draw custom elements in 3d view. Maybe that is what you are looking for.

You can find more on this topic here:

Font Drawing (blf)
OpenGL Wrapper (bgl)