On 16/12/2013 at 04:05, xxxxxxxx wrote:

ok, i'm doing and object plugin.
Everything that i draw which is 2D, like DrawPoint2D and other objects that are drawn in screen space, are drawn behind/overlapped by the objects in the scene. I'm drawing in the c4d.DRAWPASS_OBJECT pass.

for example:

def Draw(self, op, drawpass, bd, bh) :  
      if drawpass==c4d.DRAWPASS_HIGHLIGHTS:  
          return c4d.DRAWRESULT_SKIP  
      elif drawpass == c4d.DRAWPASS_OBJECT:  
          posList = [Vector(500,500,500),  
          for point in posList:  

On 16/12/2013 at 07:39, xxxxxxxx wrote:

If you use a SceneHook plugin to draw 2D stuff to the screen it won't get hidden by the objects.
Take a look at this:

I found another way to get around the problem (I call it a bug) by creating a dummy 2d object at the top of my code where I'm drawing things.
The dummy object I use is just a 2D line with no length.
This pushes the drawn 2D stuff out one layer and prevents objects from covering it up.


On 16/12/2013 at 12:19, xxxxxxxx wrote:

Hm, I can't get to exploit your bug suggestion :) The result is the same, and if i don't fix the matrix after that it messes up the 3d draws following in the code. I found that post with the scene hook before posting here, but I have no C++ experience at all. Looking at that code, i can't understand how to register a scene hook plugin via pythoh. Any hints ?

On 16/12/2013 at 13:25, xxxxxxxx wrote:

I don't happen to have a Python example of drawing 2D things to the screen in an Object plugin.
But I do have one for a Tag type of plugin.

If you like.
Send an e-mail to: [email protected] with your e-mail address. And I'll send you the plugin and the code.