Hello,
I'd like to draw a 2D line over the Viewport from a TagDataPlugin while the tag is Enabled. This is my Drawing function below. It worked as an ObjectData plugin when I called it with DRAWPASS_OBJECT
, but I'm not sure how to get this working as a Tag. Can anyone advise me on this? Thank you!
class BaseDrawTest(c4d.plugins.TagData):
def __init__(self, *args):
super(BaseDrawTest, self).__init__(*args)
def Draw(self, tag, op, bd, bh):
bd.SetPen(c4d.Vector(1, 0.7, 0))
v1 = c4d.Vector(0.0,0.0,0.0)
v2 = c4d.Vector(1000.0,1000.0,1000.0)
bd.SetMatrix_Screen()
bd.DrawLine2D(v1, v2)