Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
Hi, There seems to be a problem with DrawEllipseFill() and DrawEllipseLine().
Here is a simple script that opens a dialog that draws two different circles in the UserArea. Both circles are supposed to be a circle with 10px radius at different positions, but the second argument "radius" does not seem to work.
Please let me know if I am doing it wrong or if there is another way to draw a circle in UserArea. Thanks!
import c4d class MyUserArea(c4d.gui.GeUserArea): def DrawMsg(self, x1, y1, x2, y2, msg_ref): # Initializes draw region self.OffScreenOn() self.SetClippingRegion(x1, y1, x2, y2) self.DrawRectangle(x1, y1, x2, y2) # Draws Circles self.DrawSetPen(color=c4d.Vector(1,1,1)) # White self.DrawEllipseFill(centerPoint=[100, 50], radius=10) # Filled Circle self.DrawSetPen(color=c4d.Vector(1,0,0)) # Red self.DrawEllipseLine(centerPoint=[50, 100], radius=10) # Line Circle class MyDialog(c4d.gui.GeDialog): ua = MyUserArea() def CreateLayout(self): area = self.AddUserArea(id=0, flags=c4d.BFH_SCALEFIT|c4d.BFV_SCALEFIT) self.AttachUserArea(ua=self.ua, id=area) return True def main(): dialog = MyDialog() dialog.Open(dlgtype=c4d.DLG_TYPE_MODAL, defaulth=400, defaultw=400) if __name__ == '__main__': main()
Result:
Hi thanks for the report, there is sadly a bug in the python layer, nothing you can fix.
The fix will be available in the next Cinema 4D update. Cheers, Maxime.
Great, thank you!
Hi this bug was fixed with release 2023.0 of Cinema 4D.
Cheers, Maxime.