How to display some text in blender 3Dviewport? like screencast addon display pressed keys?
-
2Why do you not want to use the screencast keys addon? – J Sargent Jan 19 '18 at 15:13
2 Answers
You can draw on the 3D viewport by registering a draw handler and using the bgl and blf modules.
Registering the draw handler is done via bpy.types.SpaceView3D.draw_handler_add(). Just browse through the bundled Blender add-ons to get lots of examples on how this is used in practice.
- 7,139
- 1
- 23
- 52
Due to some simple limitations, the screencast keys add-on was removed from blender builds, you can read about that here . It may be possible to find it somewhere in forums or on github as an addon you can install How do I display what keys I use?, but if that is not an option, you can use some separate software. See lists like http://www.lassanamagassa.com/2014/09/7-apps-that-display-real-time-keystrokes-on-a-windows-pc-screen/, or you might want to try this if your are on linux.
- 81
- 3