Hi,
I'm trying to attach a simple GeUserArea with just a bunch of Draw Methods (i.e. DrawText etc) but it appears blank when I execute the script. There are also no errors on the console.
You can check the wip code here:
import c4d
from c4d import bitmaps, documents, gui, plugins, threading, utils
class UserArea(c4d.gui.GeUserArea):
color = c4d.Vector(1, 0, 0)
def DrawMsg(self, x1, y1, x2, y2, msg):
self.DrawText("Test Text Area", 10, 10)
self.DrawSetPen(self.color)
self.DrawRectangle(x1, y1, x2, y2)
return super(UserArea, self).Message(msg, result)
return True
class MyDialog(c4d.gui.GeDialog):
def CreateLayout(self):
paramid = 10002
self.AddUserArea(paramid, c4d.BFH_SCALEFIT | c4d.BFV_SCALEFIT, 100, 100)
self.AttachUserArea(UserArea(), paramid)
return True
def Command(self, id, msg):
return True
def CoreMessage(self, id, data):
return True
if __name__ == "__main__":
dlg = MyDialog()
dlg.Open(dlgtype=c4d.DLG_TYPE_MODAL_RESIZEABLE)
Thank you for looking at my problem