Best way to display a bitmap in the viewport background
-
I would like to create an Object plugin and I would like the code to be able to show a bitmap, with optional alpha (transparency) adjustment, in the background of the viewports (perspective and orthogonal views).
What is the best way do do it?
I don't need actual code. Just what methods to override and what must I make to be sure it displays below all viewport objects.
Thank you very much in advance for any reply.Rui Batista
-
You can draw into the viewport using a scene hook and render a quad containing a bitmap texture. These may help you get started.
[URL-REMOVED]
[URL-REMOVED]
[URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.
-
@kbar, thank you for the reply.
The problem with the Scene Hook is that it requires C++.
I'm coding in python. -
Hi sorry for the late reply, I overlooked your topic.
You will need to override the Draw method of your ObjectData and then use BaseDraw.DrawTexture.
Cheers,
Maxime. -
Hello @rui_mac,
without any further questions or replies, we will consider this thread as solved by Monday the 20th and flag it accordingly.
Thank you for your understanding,
Ferdinand