HUD elements and buttons?

On 21/08/2016 at 14:27, xxxxxxxx wrote:

So I was wondering. Is it possible to make a plugin that creates HUD-like buttons that overlay on the viewport but still behave as buttons and sliders?

See here:

I've never done any viewport drawing type stuff, so if it is possible, does anyone have some examples for getting started with it they could point me to?

Much appreciated.


On 22/08/2016 at 02:38, xxxxxxxx wrote:

Hi Bret,

unfortunately it is not possible in Python, yet.
Internally the HUD elements are realized via a SceneHook, which is not available in Python. Other plugin types do have the Draw() function in Python, but are lacking any way of receiving the needed input events.

So you'd have to do it in C++...

On the other hand... it looks like some kind of timeline controls you are trying to achieve. Something like this could already be achieved with the build in tools. The buttons for play, fast forward etc. can be dragged directly into the viewport (and configured to display just an icon) from the "Customize Palettes" dialog or from the commander (Shift-c). And while there is no way to get the timeline slider into the viewport, it actually is not needed. While hovering the mouse over the viewport, simply press and hold the j key (for jog) then click and drag, you are directly moving through the timeline back and forth.