Hello PluginCafe!
I'm trying to display object points via the tag plugin.
The code worked fine in older versions of C4D but it has no effect in the latest versions.
Am I doing anything wrong?
def Draw(self, tag, op, bd, bh):
bd.SetPen( c4d.Vector(1))
bd.SetPointSize( 3 )
bd.SetMatrix_Screen()
bd.SetDepth(True)
objMg = op.GetMg() #Get the world (global) matrix
ptList = op.GetCache().GetAllPoints()
points = [objMg * p for p in ptList] # Retrieves Global Coordinates
screenPoints = [ bd.WS(p) for p in points ] # From world to screen Coordinates (in another array)
bd.DrawPoints(screenPoints, vc = None, colcnt=1, vn=None)
return c4d.DRAWRESULT_OK