Drawing Text/Widgets in the Viewport

   1615   2   1
User Avatar
Member
86 posts
Joined: 1月 2015
Offline
So in setting up a python view state, I've been running into a couple snags when it comes to drawing text using hou.TextDrawable:
  • First, the text is not anti-aliased so scaling using the params gets ugly real fast.
  • Secondly, when viewing through a camera, the text is drawn behind the View Mask, so if a user has the opacity real high, the text is hard to read or obscured entirely.

So I was wondering, are there other methods of drawing text and simple shapes in the viewport? Is there a way to draw on top of everything else, like for example could I make an interface that looks and feels like the camera dropdown menu, or the select-by-group/name widget (see attached image).

Attachments:
snapshot4.png (162.6 KB)

User Avatar
スタッフ
422 posts
Joined: 2月 2018
Offline
hou.TextDrawable is the only way for python states to draw text in the viewport. Could you please file a bug for the text issues you encountered with your test scene attached ? That would be great, thanks!
User Avatar
Member
86 posts
Joined: 1月 2015
Offline
Submitted - https://www.sidefx.com/bugs/#/bug/105872 [www.sidefx.com]
  • Quick Links